diff options
-rw-r--r-- | examples/Example01.elm | 35 | ||||
-rw-r--r-- | generate-elm.js | 325 | ||||
-rw-r--r-- | package-lock.json | 2923 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | src/Mapbox/Element.elm | 45 | ||||
-rw-r--r-- | src/Mapbox/Expression.elm | 191 | ||||
-rw-r--r-- | src/Mapbox/Helpers.elm | 11 | ||||
-rw-r--r-- | src/Mapbox/Layer.elm | 175 | ||||
-rw-r--r-- | src/Mapbox/Source.elm | 25 | ||||
-rw-r--r-- | src/Mapbox/Style.elm | 11 |
10 files changed, 605 insertions, 3138 deletions
diff --git a/examples/Example01.elm b/examples/Example01.elm index 91a5dee..6214223 100644 --- a/examples/Example01.elm +++ b/examples/Example01.elm @@ -36,7 +36,7 @@ type Msg update msg model = case msg of Hover { lngLat, renderedFeatures } -> - ( { model | position = lngLat }, Cmd.none ) + ( { model | position = lngLat, features = renderedFeatures }, Cmd.none ) Click { lngLat, renderedFeatures } -> ( { model | position = lngLat, features = renderedFeatures }, MapCommands.fitBounds [ Opt.linear True, Opt.maxZoom 10 ] ( LngLat.map (\a -> a - 0.2) lngLat, LngLat.map (\a -> a + 0.2) lngLat ) ) @@ -49,7 +49,7 @@ geojson = "features": [ { "type": "Feature", - "id": 0, + "id": 1, "properties": { "name": "Bermuda Triangle", "area": 1150180 @@ -71,6 +71,12 @@ geojson = """ |> Result.withDefault (Json.Encode.object []) +hoveredFeatures : List Json.Encode.Value -> MapboxAttr msg +hoveredFeatures = + List.map (\feat -> ( feat, [ ( "hover", Json.Encode.bool True ) ] )) + >> featureState + + view model = { title = "Mapbox Example" , body = @@ -82,6 +88,7 @@ view model = , onClick Click , id "my-map" , eventFeaturesLayers [ "changes" ] + , hoveredFeatures model.features ] (Style { transition = Style.defaultTransition @@ -114,9 +121,31 @@ view model = , Layer.fillColor (E.rgba 227 227 227 1) , Layer.fillOpacity (float 0.6) ] + , Layer.symbol "place-city-lg-n" + "composite" + [ Layer.sourceLayer "place_label" + , Layer.minzoom 1 + , Layer.maxzoom 14 + , Layer.filter <| + E.all + [ E.getProperty (str "scalerank") |> E.greaterThan (int 2) + , E.getProperty (str "type") |> E.isEqual (str "city") + ] + , Layer.textField <| + E.format + [ E.getProperty (str "name_en") + |> E.formatted + |> E.fontScaledBy (float 1.2) + , E.formatted (str "\n") + , E.getProperty (str "name") + |> E.formatted + |> E.fontScaledBy (float 0.8) + |> E.withFont (E.strings [ "DIN Offc Pro Medium" ]) + ] + ] , Layer.fill "changes" "changes" - [ Layer.fillOpacity (E.ifElse (E.toBool (E.featureState (str "hover"))) (float 1) (float 0.3)) + [ Layer.fillOpacity (E.ifElse (E.toBool (E.featureState (str "hover"))) (float 0.9) (float 0.1)) ] ] } diff --git a/generate-elm.js b/generate-elm.js index 1643428..7207f4e 100644 --- a/generate-elm.js +++ b/generate-elm.js @@ -5,39 +5,44 @@ function generateProperties(spec) { var docs = {}; var enums = {}; layouts.forEach(l => { - const layerType = titleCase(l.split('_')[1]) + const layerType = titleCase(l.split("_")[1]); docs[layerType] = []; codes[layerType] = []; Object.entries(spec[l]).forEach(([name, prop]) => { - if (name == 'visibility') return ''; - if (prop.type === 'enum') { - enums[name] = Object.keys(prop.values).join(' | '); + if (name == "visibility") return ""; + if (prop.type === "enum") { + enums[name] = Object.keys(prop.values).join(" | "); } - codes[layerType].push(generateElmProperty(name, prop, layerType, 'Layout')); + codes[layerType].push( + generateElmProperty(name, prop, layerType, "Layout") + ); docs[layerType].push(camelCase(name)); - }) - }) + }); + }); paints.forEach(l => { - const layerType = titleCase(l.split('_')[1]) + const layerType = titleCase(l.split("_")[1]); Object.entries(spec[l]).forEach(([name, prop]) => { - if (name == 'visibility') return ''; - if (prop.type === 'enum') { - enums[name] = Object.keys(prop.values).join(' | '); + if (name == "visibility") return ""; + if (prop.type === "enum") { + enums[name] = Object.keys(prop.values).join(" | "); } - codes[layerType].push(generateElmProperty(name, prop, layerType, 'Paint')) + codes[layerType].push( + generateElmProperty(name, prop, layerType, "Paint") + ); docs[layerType].push(camelCase(name)); - }) - }) - Object.values(docs).forEach(d => d.sort()) + }); + }); + Object.values(docs).forEach(d => d.sort()); Object.values(codes).forEach(d => d.sort()); - console.log(enums); return ` module Mapbox.Layer exposing ( Layer, SourceId, Background, Fill, Symbol, Line, Raster, Circle, FillExtrusion, Heatmap, Hillshade, LayerAttr, encode, background, fill, symbol, line, raster, circle, fillExtrusion, heatmap, hillshade, - metadata, source, sourceLayer, minzoom, maxzoom, filter, visible, - ${Object.values(docs).map(d => d.join(', ')).join(',\n ')}) + metadata, sourceLayer, minzoom, maxzoom, filter, visible, + ${Object.values(docs) + .map(d => d.join(", ")) + .join(",\n ")}) {-| Layers specify what is actually rendered on the map and are rendered in order. @@ -62,15 +67,19 @@ Paint properties are applied later in the rendering process. Changes to a paint ### General Attributes @docs LayerAttr -@docs metadata, source, sourceLayer, minzoom, maxzoom, filter, visible - -${Object.entries(docs).map(([section, docs]) => `### ${section} Attributes\n\n@docs ${docs.join(', ')}`).join('\n\n')} +@docs metadata, sourceLayer, minzoom, maxzoom, filter, visible + +${Object.entries(docs) + .map( + ([section, docs]) => + `### ${section} Attributes\n\n@docs ${docs.join(", ")}` + ) + .join("\n\n")} -} import Array exposing (Array) -import Json.Decode import Json.Encode as Encode exposing (Value) -import Mapbox.Expression as Expression exposing (Anchor, CameraExpression, Color, DataExpression, Expression, LineJoin) +import Mapbox.Expression as Expression exposing (Anchor, Auto, CameraExpression, Color, DataExpression, Expression, LineCap, LineJoin, Position, RasterResampling, SymbolPlacement, TextFit, TextJustify, TextTransform, FormattedText) {-| Represents a layer. -} type Layer @@ -121,9 +130,7 @@ encode (Layer value) = value - - -layerImpl tipe source id attrs = +layerImpl tipe id source attrs = [ ( "type", Encode.string tipe ) , ( "id", Encode.string id ) , ( "source", Encode.string source) @@ -137,16 +144,16 @@ encodeAttrs attrs = let { top, layout, paint } = List.foldl - (\\attr ({ top, layout, paint } as lists) -> + (\\attr lists -> case attr of Top key val -> - { lists | top = ( key, val ) :: top } + { lists | top = ( key, val ) :: lists.top } Paint key val -> - { lists | paint = ( key, val ) :: paint } + { lists | paint = ( key, val ) :: lists.paint } Layout key val -> - { lists | layout = ( key, val ) :: layout } + { lists | layout = ( key, val ) :: lists.layout } ) { top = [], layout = [], paint = [] } attrs @@ -155,7 +162,7 @@ encodeAttrs attrs = {-| The background color or pattern of the map. -} background : String -> List (LayerAttr Background) -> Layer -background tipe id attrs = +background id attrs = [ ( "type", Encode.string "background" ) , ( "id", Encode.string id ) ] @@ -244,116 +251,210 @@ visible : Expression CameraExpression Bool -> LayerAttr any visible vis = Layout "visibility" <| Expression.encode <| Expression.ifElse vis (Expression.str "visible") (Expression.str "none") -${Object.entries(codes).map(([section, codes]) => `-- ${section}\n\n${codes.join('\n')}`).join('\n\n')} -` +${Object.entries(codes) + .map(([section, codes]) => `-- ${section}\n\n${codes.join("\n")}`) + .join("\n\n")} +`; +} + +function codeSnippet(name, type) { + return "`" + camelCase(name, type) + "`"; } function requires(req) { - if (typeof req === 'string') { - return `Requires \`${camelCase(req)}\`.`; - } else if (req['!']) { - return `Disabled by \`${camelCase(req['!'])}\`.`; - } else if (req['<=']) { - return `Must be less than or equal to \`${camelCase(req['<='])}\`.`; + if (typeof req === "string") { + return `Requires ${codeSnippet(req)}.`; + } else if (req["!"]) { + return `Disabled by ${codeSnippet(req["!"])}.`; + } else if (req["<="]) { + return `Must be less than or equal to \`${camelCase(req["<="])}\`.`; } else { - const [name, value] = Object.entries(req)[0]; - if (Array.isArray(value)) { - return `Requires \`${camelCase(name)}\` to be ${ - value - .reduce((prev, curr) => [prev, ', or ', curr])}.`; - } else { - return `Requires \`${camelCase(name)}\` to be \`${value}\`.`; - } + const [name, value] = Object.entries(req)[0]; + if (Array.isArray(value)) { + return `Requires ${codeSnippet(name)} to be ${value.slice(1).reduce( + (prev, curr) => prev + ", or " + codeSnippet(curr), codeSnippet(value[0]) + )}.`; + } else { + return `Requires ${codeSnippet(name)} to be \`${value}\`.`; + } } } function generateElmProperty(name, prop, layerType, position) { - if (name == 'visibility') return '' - if (prop['property-type'] === 'constant') throw "Constant property type not supported"; + if (name == "visibility") return ""; + if (prop["property-type"] === "constant") + throw "Constant property type not supported"; const elmName = camelCase(name); - const exprKind = prop['sdk-support']['data-driven styling'] && prop['sdk-support']['data-driven styling'].js ? 'any' : 'CameraExpression'; + const exprKind = + prop["sdk-support"]["data-driven styling"] && + prop["sdk-support"]["data-driven styling"].js + ? "any" + : "CameraExpression"; const exprType = getElmType(prop); - let bounds = ''; - if ('minimum' in prop && 'maximum' in prop) { - bounds = `\n\nShould be between \`${prop.minimum}\` and \`${prop.maximum}\` inclusive. ` - } else if ('minimum' in prop) { - bounds = `\n\nShould be greater than or equal to \`${prop.minimum}\`. ` - } else if ('maximum' in prop) { - bounds = `\n\nShould be less than or equal to \`${prop.maximum}\`. ` + let bounds = ""; + if ("minimum" in prop && "maximum" in prop) { + bounds = `\n\nShould be between \`${prop.minimum}\` and \`${ + prop.maximum + }\` inclusive. `; + } else if ("minimum" in prop) { + bounds = `\n\nShould be greater than or equal to \`${prop.minimum}\`. `; + } else if ("maximum" in prop) { + bounds = `\n\nShould be less than or equal to \`${prop.maximum}\`. `; + } + let valueHelp = ""; + if (exprType == "(Anchor Never)" || exprType == "(Anchor Auto)") { + valueHelp = Object.entries(prop.values) + .map( + ([value, { doc }]) => + `\n- ${codeSnippet(value, exprType)}: ${docify(doc)}` + ) + .join(""); } return ` -{-| ${prop.doc.replace(/`(\w+\-.+?)`/g, str => '`' + camelCase(str.substr(1)))} ${position} property. ${bounds}${prop.units ? `\nUnits in ${prop.units}. ` : ''}${prop.default !== undefined ? 'Defaults to `' + prop.default + '`. ' : ''}${prop.requires ? prop.requires.map(requires).join(' ') : ''} +{-| ${docify(prop.doc, elmName)} ${position} property. ${bounds}${ + prop.units ? `\nUnits in ${prop.units}. ` : "" + }${prop.default !== undefined && elmName !== 'heatmapColor' && elmName !== 'textFont' ? "Defaults to `" + camelCase(prop.default.toString(), exprType) + "`. " : ""}${ + prop.requires ? prop.requires.map(requires).join(" ") : "" + }${valueHelp} -} ${elmName} : Expression ${exprKind} ${exprType} -> LayerAttr ${layerType} ${elmName} = - Expression.encode >> ${position} "${name}"` + Expression.encode >> ${position} "${name}"`; +} + +const enumMap = { + "map | viewport | auto": "(Anchor Auto)", + "map | viewport": "(Anchor Never)", + "left | center | right": "TextJustify", + "center | left | right | top | bottom | top-left | top-right | bottom-left | bottom-right": + "Position", + "none | width | height | both": "TextFit", + "butt | round | square": "LineCap", + "bevel | round | miter": "LineJoin", + "point | line | line-center": "SymbolPlacement", + "none | uppercase | lowercase": "TextTransform", + "linear | nearest": "RasterResampling" +}; + +const flatEnumMap = Object.assign(Object.entries(enumMap).reduce((res, [values, tipe]) => values.split(' | ').reduce((obj, value) => Object.assign({}, obj, {[value]: tipe}), res), {}), { + map: 'Anchor', + viewport: 'Anchor', + auto: "Anchor" +}); + +const reverseEnumMap = Object.entries(enumMap).reduce((res, [values, tipe]) => tipe ==="(Anchor Auto)" || tipe === "(Anchor Never)" ? res : Object.assign({}, res, {[tipe]: values.split(' | ')}), {}) + +console.error(reverseEnumMap) + +function docify(str, name) { + switch (name) { + case "lineGradient": + case "lineDasharray": + return str; + case "heatmapColor": + return `Defines the color of each pixel based on its density value in a heatmap. The value should be an Expression that uses \`heatmapDensity\` as input. Defaults to: + + E.heatmapDensity + |> E.interpolate E.Linear + [ (0.0, rgba 0 0 255 0) + , (0.1, rgba 65 105 225 1) + , (0.3, rgba 0 255 255 1) + , (0.5, rgba 0 255 0 1) + , (0.7, rgba 255 255 0 1) + , (1.0, rgba 255 0 0 1)]` + case "textField": + return `Value to use for a text label.`; + } + ///`(\w+\-.+?)`/g + return str.replace( + /`(.+?)`/g, + (str, match) => "`" + camelCase(match) + "`" + ) } -function getElmType({type, value, values}) { - switch(type) { - case 'number': - return 'Float'; - case 'boolean': +function getElmType({ type, value, values }) { + switch (type) { + case "number": + return "Float"; + case "boolean": return "Bool"; - case 'string': - return 'String'; - case 'color': - return 'Color'; - case 'array': - switch(value) { - case 'number': - return '(Array Float)'; - case 'string': - return '(Array String)'; - } - case 'enum': - switch(Object.keys(values).join(' | ')) { - case "map | viewport": - return 'Anchor'; - case "map | viewport | auto": - return 'AnchorAuto'; - case "center | left | right | top | bottom | top-left | top-right | bottom-left | bottom-right": - return 'Position'; - case 'none | width | height | both': - return 'TextFit'; - case 'butt | round | square': - return 'LineCap'; - case 'bevel | round | miter': - return 'LineJoin'; - case 'point | line': - return 'SymbolPlacement'; - case 'left | center | right': - return 'TextJustify'; - case 'none | uppercase | lowercase': - return 'TextTransform'; + case "string": + return "String"; + case "color": + return "Color"; + case "array": + switch (value) { + case "number": + return "(Array Float)"; + case "string": + return "(Array String)"; } + case "formatted": + return "FormattedText"; + case "enum": + const res = enumMap[Object.keys(values).join(" | ")]; + if (res) return res; } - throw `Unknown type ${type}` + throw `Unknown type ${type}, ${value}, ${values && Object.keys(values)}`; } function titleCase(str) { - return str.replace(/\-/, ' ').replace( - /\w\S*/g, - function(txt) { - return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); - } - ).replace(/\s/, ''); - } - -function camelCase(str) { - return str.replace(/(?:^\w|[A-Z]|\b\w|\-\w)/g, function(letter, index) { - return index == 0 ? letter.toLowerCase() : letter.toUpperCase(); - }).replace(/(?:\s|\-)+/g, ''); + return str + .replace(/\-/, " ") + .replace(/\w\S*/g, function(txt) { + return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); + }) + .replace(/\s/, ""); } +function camelCase(str, type) { + if (type && reverseEnumMap[type]) { + str = type + ' ' + str; + } else if (flatEnumMap[str]) { + str = flatEnumMap[str] + ' ' + str; + } else if (str === "rgba(0, 0, 0, 0)") { + return "rgba 0 0 0 0" + } + return str + .replace(/(?:^\w|[A-Z]|\b\w|\-\w)/g, function(letter, index) { + return index == 0 ? letter.toLowerCase() : letter.toUpperCase(); + }) + .replace(/(?:\s|\-)+/g, ""); +} function makeSignatures(name, constants) { return `{-| -} type ${name} = ${name} - ${constants.split(' | ').map(c => ` + ${constants + .split(" | ") + .map( + c => ` {-| -} -${camelCase(name + ' ' + c)} : Expression exprType ${name} -${camelCase(name + ' ' + c)} = Expression (Json.Encode.string "${c}") -`).join('\n')}` +${camelCase(name + " " + c)} : Expression exprType ${name} +${camelCase(name + " " + c)} = Expression (Json.Encode.string "${c}") +` + ) + .join("\n")}`; } + +/// --- NODEJS STUFF + +var stdin = process.stdin, + stdout = process.stdout, + inputChunks = []; + +stdin.resume(); +stdin.setEncoding("utf8"); + +stdin.on("data", function(chunk) { + inputChunks.push(chunk); +}); + +stdin.on("end", function() { + var inputJSON = inputChunks.join(""), + parsedData = JSON.parse(inputJSON), + output = generateProperties(parsedData); + stdout.write(output); + stdout.write("\n"); +}); diff --git a/package-lock.json b/package-lock.json index d8240b4..2ceaa05 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "elm-mapbox", - "version": "1.0.0", + "version": "1.0.0-rc1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -12,10 +12,15 @@ "wgs84": "0.0.0" } }, + "@mapbox/geojson-types": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@mapbox/geojson-types/-/geojson-types-1.0.2.tgz", + "integrity": "sha512-e9EBqHHv3EORHrSfbR9DqecPNn+AmuAoQxV6aL8Xu30bJMJR1o8PZLZzpk1Wq7/NfCbuhmakHTPYRhoqLsXRnw==" + }, "@mapbox/jsonlint-lines-primitives": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.1.tgz", - "integrity": "sha512-LGegvJq+ks4UFnEAvtAhygFRZxaNg2vw7PsvLOAXY8ziJLv5aFDSdHDEMJA/Q8PG5dNhMioUvo0kNqb7U5dPoQ==" + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz", + "integrity": "sha1-zlblOfg1UrWNENZy6k1vya3HsjQ=" }, "@mapbox/mapbox-gl-supported": { "version": "1.4.0", @@ -104,14 +109,6 @@ "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.2.1.tgz", "integrity": "sha1-vgiVmQl7dKXJxKhKDNvNtivYeu8=" }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { - "sprintf-js": "1.0.3" - } - }, "arr-diff": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", @@ -177,9 +174,9 @@ "integrity": "sha1-kbx0sR6kBbyRa8aqkI+q+ltKrEs=" }, "buffer-from": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", - "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" }, "builtin-modules": { "version": "2.0.0", @@ -227,7 +224,7 @@ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "requires": { - "buffer-from": "1.1.0", + "buffer-from": "1.1.1", "inherits": "2.0.3", "readable-stream": "2.3.6", "typedarray": "0.0.6" @@ -328,14 +325,6 @@ "resolved": "https://registry.npmjs.org/expect.js/-/expect.js-0.2.0.tgz", "integrity": "sha1-EChTPSwcNj90pnlv9X7AUg3tK+E=" }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "0.1.1" - } - }, "extglob": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", @@ -424,17 +413,14 @@ } }, "geojson-vt": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/geojson-vt/-/geojson-vt-3.1.4.tgz", - "integrity": "sha512-aDcwFnYlLvUoLEZSVOjI3SPAkoA3ENNprsnYkJAp7C/1Phk+kuwp8spDF6HGYFPg6RqpXhlmY9rxg4z/0DPL1g==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/geojson-vt/-/geojson-vt-3.2.0.tgz", + "integrity": "sha512-qk7sEv7dMfuGzflwClsgtO1fWPut/TqCInWEEUJc/Ofn4tmqBGznnPv3eUdxtwMkulMaAwSL3osHiyN03XJd/w==" }, "gl-matrix": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-2.7.0.tgz", - "integrity": "sha512-3cq5b2aPfSkcBG48IlrG8ILvFm1BE8RFdE82anKSlTYaHEVXNPGB+ScGbV22k+23sbmVZr+vRuIni4LKHyU3OQ==", - "requires": { - "npm": "6.2.0" - } + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-2.7.1.tgz", + "integrity": "sha512-22I6q7aO2oKNahNV0+9JavVNUhQXRTvR5jP2s8U1l93TkjcQe8RK6MeMYpM7+66R0sCVUgSdO97BL439vePyzQ==" }, "glob-base": { "version": "0.3.0", @@ -455,24 +441,6 @@ "is-glob": "2.0.1" } }, - "gray-matter": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-3.1.1.tgz", - "integrity": "sha512-nZ1qjLmayEv0/wt3sHig7I0s3/sJO0dkAaKYQ5YAOApUtYEOonXSFdWvL1khvnZMTvov4UufkqlFsilPnejEXA==", - "requires": { - "extend-shallow": "2.0.1", - "js-yaml": "3.12.0", - "kind-of": "5.1.0", - "strip-bom-string": "1.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, "grid-index": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/grid-index/-/grid-index-1.0.0.tgz", @@ -526,7 +494,8 @@ "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true }, "is-extglob": { "version": "1.0.0", @@ -584,22 +553,6 @@ "isarray": "1.0.0" } }, - "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", - "requires": { - "argparse": "1.0.10", - "esprima": "4.0.1" - }, - "dependencies": { - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" - } - } - }, "kdbush": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-2.0.1.tgz", @@ -639,11 +592,12 @@ } }, "mapbox-gl": { - "version": "0.47.0", - "resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.47.0.tgz", - "integrity": "sha512-y1AlNYMAKaqEtaqni0zOMYj9gTc1gZ0lqLkxXK9iFg5+ZBITc5DL9AcrXhpEXNxUzXKFa7dZkSULyNaqXFQ8yQ==", + "version": "0.48.0", + "resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.48.0.tgz", + "integrity": "sha512-ck50tWMVkcxJzo43I9veqaox5xJBkx7h0EzS393DGGFFWs6IEhEGLvpybwTtw2if2V66tT2S02sYZy2zrmpJ9g==", "requires": { - "@mapbox/jsonlint-lines-primitives": "2.0.1", + "@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", @@ -655,18 +609,14 @@ "csscolorparser": "1.0.3", "earcut": "2.1.3", "geojson-rewind": "0.3.1", - "geojson-vt": "3.1.4", - "gl-matrix": "2.7.0", - "gray-matter": "3.1.1", + "geojson-vt": "3.2.0", + "gl-matrix": "2.7.1", "grid-index": "1.0.0", "minimist": "0.0.8", "pbf": "3.1.0", "quickselect": "1.1.1", "rw": "1.3.3", - "shuffle-seed": "1.1.6", - "sort-object": "0.3.2", - "supercluster": "4.0.1", - "through2": "2.0.3", + "supercluster": "4.1.1", "tinyqueue": "1.2.3", "vt-pbf": "3.1.1" }, @@ -734,2757 +684,6 @@ "remove-trailing-separator": "1.1.0" } }, - "npm": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/npm/-/npm-6.2.0.tgz", - "integrity": "sha512-GnlNsOnxwVJX4WSfyQY0gY3LnUX2cc46XU0eu1g+WSuZgDRUGmw8tuptitJu6byp0RWGT8ZEAKajblwdhQHN8A==", - "requires": { - "JSONStream": "1.3.3", - "abbrev": "1.1.1", - "ansicolors": "0.3.2", - "ansistyles": "0.1.3", - "aproba": "1.2.0", - "archy": "1.0.0", - "bin-links": "1.1.2", - "bluebird": "3.5.1", - "byte-size": "4.0.3", - "cacache": "11.0.2", - "call-limit": "1.1.0", - "chownr": "1.0.1", - "cli-columns": "3.1.2", - "cli-table3": "0.5.0", - "cmd-shim": "2.0.2", - "columnify": "1.5.4", - "config-chain": "1.1.11", - "debuglog": "1.0.1", - "detect-indent": "5.0.0", - "detect-newline": "2.1.0", - "dezalgo": "1.0.3", - "editor": "1.0.0", - "figgy-pudding": "3.1.0", - "find-npm-prefix": "1.0.2", - "fs-vacuum": "1.2.10", - "fs-write-stream-atomic": "1.0.10", - "gentle-fs": "2.0.1", - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "has-unicode": "2.0.1", - "hosted-git-info": "2.6.0", - "iferr": "1.0.0", - "imurmurhash": "0.1.4", - "inflight": "1.0.6", - "inherits": "2.0.3", - "ini": "1.3.5", - "init-package-json": "1.10.3", - "is-cidr": "2.0.6", - "json-parse-better-errors": "1.0.2", - "lazy-property": "1.0.0", - "libcipm": "2.0.0", - "libnpmhook": "4.0.1", - "libnpx": "10.2.0", - "lock-verify": "2.0.2", - "lockfile": "1.0.4", - "lodash._baseindexof": "3.1.0", - "lodash._baseuniq": "4.6.0", - "lodash._bindcallback": "3.0.1", - "lodash._cacheindexof": "3.0.2", - "lodash._createcache": "3.1.2", - "lodash._getnative": "3.9.1", - "lodash.clonedeep": "4.5.0", - "lodash.restparam": "3.6.1", - "lodash.union": "4.6.0", - "lodash.uniq": "4.5.0", - "lodash.without": "4.4.0", - "lru-cache": "4.1.3", - "meant": "1.0.1", - "mississippi": "3.0.0", - "mkdirp": "0.5.1", - "move-concurrently": "1.0.1", - "node-gyp": "3.7.0", - "nopt": "4.0.1", - "normalize-package-data": "2.4.0", - "npm-audit-report": "1.3.1", - "npm-cache-filename": "1.0.2", - "npm-install-checks": "3.0.0", - "npm-lifecycle": "2.0.3", - "npm-package-arg": "6.1.0", - "npm-packlist": "1.1.10", - "npm-pick-manifest": "2.1.0", - "npm-profile": "3.0.2", - "npm-registry-client": "8.5.1", - "npm-registry-fetch": "1.1.0", - "npm-user-validate": "1.0.0", - "npmlog": "4.1.2", - "once": "1.4.0", - "opener": "1.4.3", - "osenv": "0.1.5", - "pacote": "8.1.6", - "path-is-inside": "1.0.2", - "promise-inflight": "1.0.1", - "qrcode-terminal": "0.12.0", - "query-string": "6.1.0", - "qw": "1.0.1", - "read": "1.0.7", - "read-cmd-shim": "1.0.1", - "read-installed": "4.0.3", - "read-package-json": "2.0.13", - "read-package-tree": "5.2.1", - "readable-stream": "2.3.6", - "readdir-scoped-modules": "1.0.2", - "request": "2.81.0", - "retry": "0.12.0", - "rimraf": "2.6.2", - "safe-buffer": "5.1.2", - "semver": "5.5.0", - "sha": "2.0.1", - "slide": "1.1.6", - "sorted-object": "2.0.1", - "sorted-union-stream": "2.1.3", - "ssri": "6.0.0", - "tar": "4.4.4", - "text-table": "0.2.0", - "tiny-relative-date": "1.3.0", - "uid-number": "0.0.6", - "umask": "1.1.0", - "unique-filename": "1.1.0", - "unpipe": "1.0.0", - "update-notifier": "2.5.0", - "uuid": "3.3.2", - "validate-npm-package-license": "3.0.3", - "validate-npm-package-name": "3.0.0", - "which": "1.3.1", - "worker-farm": "1.6.0", - "wrappy": "1.0.2", - "write-file-atomic": "2.3.0" - }, - "dependencies": { - "JSONStream": { - "version": "1.3.3", - "bundled": true, - "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" - } - }, - "abbrev": { - "version": "1.1.1", - "bundled": true - }, - "agent-base": { - "version": "4.2.0", - "bundled": true, - "requires": { - "es6-promisify": "5.0.0" - } - }, - "agentkeepalive": { - "version": "3.4.1", - "bundled": true, - "requires": { - "humanize-ms": "1.2.1" - } - }, - "ansi-align": { - "version": "2.0.0", - "bundled": true, - "requires": { - "string-width": "2.1.1" - } - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true - }, - "ansi-styles": { - "version": "3.2.1", - "bundled": true, - "requires": { - "color-convert": "1.9.1" - } - }, - "ansicolors": { - "version": "0.3.2", - "bundled": true - }, - "ansistyles": { - "version": "0.1.3", - "bundled": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true - }, - "archy": { - "version": "1.0.0", - "bundled": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.6" - } - }, - "asap": { - "version": "2.0.6", - "bundled": true - }, - "asn1": { - "version": "0.2.3", - "bundled": true - }, - "assert-plus": { - "version": "0.2.0", - "bundled": true - }, - "asynckit": { - "version": "0.4.0", - "bundled": true - }, - "aws-sign2": { - "version": "0.6.0", - "bundled": true - }, - "aws4": { - "version": "1.7.0", - "bundled": true - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "bundled": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "bin-links": { - "version": "1.1.2", - "bundled": true, - "requires": { - "bluebird": "3.5.1", - "cmd-shim": "2.0.2", - "gentle-fs": "2.0.1", - "graceful-fs": "4.1.11", - "write-file-atomic": "2.3.0" - } - }, - "block-stream": { - "version": "0.0.9", - "bundled": true, - "requires": { - "inherits": "2.0.3" - } - }, - "bluebird": { - "version": "3.5.1", - "bundled": true - }, - "boom": { - "version": "2.10.1", - "bundled": true, - "requires": { - "hoek": "2.16.3" - } - }, - "boxen": { - "version": "1.3.0", - "bundled": true, - "requires": { - "ansi-align": "2.0.0", - "camelcase": "4.1.0", - "chalk": "2.4.1", - "cli-boxes": "1.0.0", - "string-width": "2.1.1", - "term-size": "1.2.0", - "widest-line": "2.0.0" - } - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "buffer-from": { - "version": "1.0.0", |