Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@mapbox/mapbox-gl-style-spec

Package Overview
Dependencies
Maintainers
14
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mapbox/mapbox-gl-style-spec - npm Package Compare versions

Comparing version 13.27.0 to 13.28.0-beta.1

11

CHANGELOG.md

@@ -0,1 +1,12 @@

## 13.28.0-beta.1
### Features ✨
* Add optional spec parameter to `validateMapboxApiSupported` ([#12448](https://github.com/mapbox/mapbox-gl-js/pull/12448))
* Derive source type values from spec ([#12449](https://github.com/mapbox/mapbox-gl-js/pull/12449))
### Bug fixes 🐞
* Fix incorrect transition flag in *-pattern and line-dasharray properties ([#12372](https://github.com/mapbox/mapbox-gl-js/pull/12372))
## 13.27.0

@@ -2,0 +13,0 @@

2

expression/index.js

@@ -36,3 +36,3 @@ // @flow

+properties: {[_: string]: any},
+patterns?: {[_: string]: {"min": string, "mid": string, "max": string}},
+patterns?: {[_: string]: string},
+geometry?: Array<Array<Point>>

@@ -39,0 +39,0 @@ };

{
"name": "@mapbox/mapbox-gl-style-spec",
"description": "a specification for mapbox gl styles",
"version": "13.27.0",
"version": "13.28.0-beta.1",
"author": "Mapbox",

@@ -6,0 +6,0 @@ "keywords": [

// @flow
type ExpressionType = 'data-driven' | 'cross-faded' | 'cross-faded-data-driven' | 'color-ramp' | 'data-constant' | 'constant';
type ExpressionType = 'data-driven' | 'color-ramp' | 'data-constant' | 'constant';
type ExpressionParameters = Array<'zoom' | 'feature' | 'feature-state' | 'heatmap-density' | 'line-progress' | 'sky-radial-progress' | 'pitch' | 'distance-from-center'>;

@@ -5,0 +5,0 @@

@@ -6,3 +6,3 @@ // @flow

export function supportsPropertyExpression(spec: StylePropertySpecification): boolean {
return spec['property-type'] === 'data-driven' || spec['property-type'] === 'cross-faded-data-driven';
return spec['property-type'] === 'data-driven';
}

@@ -9,0 +9,0 @@

@@ -170,3 +170,3 @@ // @flow

*/
export default function validateMapboxApiSupported(style: Object): ValidationErrors {
export default function validateMapboxApiSupported(style: Object, styleSpec: Object = v8): ValidationErrors {
let s = style;

@@ -179,3 +179,3 @@ try {

let errors = validateStyle(s, v8)
let errors = validateStyle(s, styleSpec)
.concat(getRootErrors(s, Object.keys(v8.$root)));

@@ -182,0 +182,0 @@

@@ -97,3 +97,3 @@ // @flow

value: value.type,
valueSpec: {values: ['vector', 'raster', 'raster-dem', 'geojson', 'video', 'image']},
valueSpec: {values: getSourceTypeValues(styleSpec)},
style,

@@ -105,2 +105,12 @@ styleSpec

function getSourceTypeValues(styleSpec) {
return styleSpec.source.reduce((memo, source) => {
const sourceType = styleSpec[source];
if (sourceType.type.type === 'enum') {
memo = memo.concat(Object.keys(sourceType.type.values));
}
return memo;
}, []);
}
function validatePromoteId({key, value}) {

@@ -107,0 +117,0 @@ if (getType(value) === 'string') {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc