@mapbox/mapbox-gl-style-spec 13.12.0 → 13.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/index.es.js +1201 -297
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1201 -297
- package/dist/index.js.map +1 -1
- package/expression/compound_expression.js +5 -5
- package/expression/definitions/assertion.js +3 -4
- package/expression/definitions/at.js +3 -3
- package/expression/definitions/case.js +3 -6
- package/expression/definitions/coalesce.js +3 -4
- package/expression/definitions/coercion.js +3 -4
- package/expression/definitions/collator.js +5 -5
- package/expression/definitions/comparison.js +3 -3
- package/expression/definitions/format.js +3 -3
- package/expression/definitions/format_section_override.js +3 -4
- package/expression/definitions/image.js +6 -8
- package/expression/definitions/in.js +4 -4
- package/expression/definitions/index.js +4 -2
- package/expression/definitions/interpolate.js +3 -4
- package/expression/definitions/length.js +3 -3
- package/expression/definitions/let.js +3 -3
- package/expression/definitions/literal.js +2 -2
- package/expression/definitions/match.js +3 -6
- package/expression/definitions/number_format.js +3 -3
- package/expression/definitions/step.js +3 -4
- package/expression/definitions/var.js +2 -2
- package/expression/definitions/within.js +297 -0
- package/expression/evaluation_context.js +12 -1
- package/expression/expression.js +3 -5
- package/expression/index.js +24 -19
- package/expression/is_constant.js +5 -1
- package/expression/parsing_context.js +3 -0
- package/expression/scope.js +1 -1
- package/expression/types/resolved_image.js +2 -1
- package/feature_filter/convert.js +1 -1
- package/feature_filter/index.js +10 -5
- package/flow-typed/vector-tile.js +2 -2
- package/package.json +2 -1
- package/reference/v8.json +10 -1
- package/style-spec.js +1 -1
- package/types.js +2 -2
- package/validate/validate_expression.js +1 -1
- package/visit.js +2 -2
package/style-spec.js
CHANGED
package/types.js
CHANGED
|
@@ -8,7 +8,7 @@ export type FormattedSpecification = string;
|
|
|
8
8
|
|
|
9
9
|
export type ResolvedImageSpecification = string;
|
|
10
10
|
|
|
11
|
-
export type PromoteIdSpecification = {[string]: string} | string;
|
|
11
|
+
export type PromoteIdSpecification = {[_: string]: string} | string;
|
|
12
12
|
|
|
13
13
|
export type FilterSpecification =
|
|
14
14
|
| ['has', string]
|
|
@@ -66,7 +66,7 @@ export type StyleSpecification = {|
|
|
|
66
66
|
"bearing"?: number,
|
|
67
67
|
"pitch"?: number,
|
|
68
68
|
"light"?: LightSpecification,
|
|
69
|
-
"sources": {[string]: SourceSpecification},
|
|
69
|
+
"sources": {[_: string]: SourceSpecification},
|
|
70
70
|
"sprite"?: string,
|
|
71
71
|
"glyphs"?: string,
|
|
72
72
|
"transition"?: TransitionSpecification,
|
|
@@ -17,7 +17,7 @@ export default function validateExpression(options: any): Array<ValidationError>
|
|
|
17
17
|
const expressionObj = (expression.value: any).expression || (expression.value: any)._styleExpression.expression;
|
|
18
18
|
|
|
19
19
|
if (options.expressionContext === 'property' && (options.propertyKey === 'text-font') &&
|
|
20
|
-
expressionObj.
|
|
20
|
+
!expressionObj.outputDefined()) {
|
|
21
21
|
return [new ValidationError(options.key, options.value, `Invalid data expression for "${options.propertyKey}". Output values must be contained as literals within the expression.`)];
|
|
22
22
|
}
|
|
23
23
|
|
package/visit.js
CHANGED
|
@@ -25,13 +25,13 @@ function getPropertyReference(propertyName): StylePropertySpecification {
|
|
|
25
25
|
return (null: any);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
export function eachSource(style: StyleSpecification, callback: (SourceSpecification) => void) {
|
|
28
|
+
export function eachSource(style: StyleSpecification, callback: (_: SourceSpecification) => void) {
|
|
29
29
|
for (const k in style.sources) {
|
|
30
30
|
callback(style.sources[k]);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
export function eachLayer(style: StyleSpecification, callback: (LayerSpecification) => void) {
|
|
34
|
+
export function eachLayer(style: StyleSpecification, callback: (_: LayerSpecification) => void) {
|
|
35
35
|
for (const layer of style.layers) {
|
|
36
36
|
callback(layer);
|
|
37
37
|
}
|