@mapbox/mapbox-gl-style-spec 14.6.0-beta.1 → 14.7.0-beta.1
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/dist/index.cjs +280 -327
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +65 -29
- package/dist/index.es.js +280 -327
- package/dist/index.es.js.map +1 -1
- package/expression/compound_expression.ts +1 -2
- package/expression/definitions/assertion.ts +1 -2
- package/expression/definitions/at.ts +0 -1
- package/expression/definitions/case.ts +0 -1
- package/expression/definitions/coalesce.ts +1 -2
- package/expression/definitions/coercion.ts +1 -2
- package/expression/definitions/collator.ts +7 -5
- package/expression/definitions/distance.ts +1 -1
- package/expression/definitions/format.ts +4 -4
- package/expression/definitions/index.ts +0 -1
- package/expression/definitions/interpolate.ts +1 -2
- package/expression/definitions/length.ts +1 -2
- package/expression/definitions/match.ts +0 -1
- package/expression/definitions/number_format.ts +5 -5
- package/expression/definitions/step.ts +0 -1
- package/expression/definitions/within.ts +3 -3
- package/expression/expression.ts +4 -4
- package/expression/index.ts +3 -6
- package/expression/is_constant.ts +1 -0
- package/expression/parsing_context.ts +28 -5
- package/expression/values.ts +1 -2
- package/feature_filter/index.ts +6 -5
- package/group_by_layout.ts +2 -2
- package/package.json +1 -1
- package/reference/v8.json +231 -20
- package/rollup.config.js +1 -2
- package/style-spec.ts +2 -3
- package/types.ts +72 -40
- package/union-to-intersection.ts +4 -0
- package/util/color.ts +1 -0
- package/util/color_spaces.ts +0 -1
- package/util/deep_equal.ts +1 -1
- package/util/geometry_util.ts +1 -2
- package/validate/validate.ts +2 -3
- package/validate/validate_expression.ts +0 -1
- package/validate/validate_function.ts +1 -1
- package/validate/validate_property.ts +2 -3
- package/validate/validate_style.ts +1 -2
- package/validate_style.min.ts +0 -1
- package/visit.ts +2 -2
|
@@ -19,7 +19,7 @@ export default function validateFunction(options: ValidationOptions): any {
|
|
|
19
19
|
const functionType = unbundle(options.value.type);
|
|
20
20
|
let stopKeyType;
|
|
21
21
|
let stopDomainValues: Partial<Record<string | number, boolean>> = {};
|
|
22
|
-
let previousStopDomainValue: unknown
|
|
22
|
+
let previousStopDomainValue: unknown;
|
|
23
23
|
let previousStopDomainZoom;
|
|
24
24
|
|
|
25
25
|
const isZoomFunction = functionType !== 'categorical' && options.value.property === undefined;
|
|
@@ -5,9 +5,9 @@ import {isFunction} from '../function/index';
|
|
|
5
5
|
import {unbundle, deepUnbundle} from '../util/unbundle_jsonlint';
|
|
6
6
|
import {supportsLightExpression, supportsPropertyExpression, supportsZoomExpression} from '../util/properties';
|
|
7
7
|
import {isGlobalPropertyConstant, isFeatureConstant, isStateConstant} from '../expression/is_constant';
|
|
8
|
+
import {createPropertyExpression} from '../expression/index';
|
|
8
9
|
|
|
9
10
|
import type {ValidationOptions} from './validate';
|
|
10
|
-
import {createPropertyExpression} from '../expression/index';
|
|
11
11
|
|
|
12
12
|
export type PropertyValidationOptions = ValidationOptions & {
|
|
13
13
|
objectKey: string;
|
|
@@ -42,8 +42,7 @@ export default function validateProperty(options: PropertyValidationOptions, pro
|
|
|
42
42
|
return [new ValidationWarning(key, value, `unknown property "${propertyKey}"`)];
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
let tokenMatch: RegExp.matchResult | null | undefined;
|
|
45
|
+
let tokenMatch: RegExpExecArray | undefined;
|
|
47
46
|
if (getType(value) === 'string' && supportsPropertyExpression(valueSpec) && !valueSpec.tokens && (tokenMatch = /^{([^}]+)}$/.exec(value))) {
|
|
48
47
|
const example = `\`{ "type": "identity", "property": ${tokenMatch ? JSON.stringify(tokenMatch[1]) : '"_"'} }\``;
|
|
49
48
|
return [new ValidationError(
|
|
@@ -2,8 +2,7 @@ import validate from './validate';
|
|
|
2
2
|
import latestStyleSpec from '../reference/latest';
|
|
3
3
|
import validateGlyphsURL from './validate_glyphs_url';
|
|
4
4
|
|
|
5
|
-
import ValidationError from '../error/validation_error';
|
|
6
|
-
|
|
5
|
+
import type ValidationError from '../error/validation_error';
|
|
7
6
|
import type {ValidationOptions} from './validate';
|
|
8
7
|
import type {StyleSpecification} from '../types';
|
|
9
8
|
|
package/validate_style.min.ts
CHANGED
package/visit.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import Reference from './reference/v8.json';
|
|
2
|
+
|
|
2
3
|
import type {StylePropertySpecification} from './style-spec';
|
|
3
4
|
import type {
|
|
4
5
|
StyleSpecification,
|
|
5
6
|
SourceSpecification,
|
|
6
7
|
LayerSpecification,
|
|
7
|
-
PropertyValueSpecification
|
|
8
|
-
DataDrivenPropertyValueSpecification
|
|
8
|
+
PropertyValueSpecification
|
|
9
9
|
} from './types';
|
|
10
10
|
|
|
11
11
|
function getPropertyReference(propertyName: string): StylePropertySpecification {
|