@mapbox/mapbox-gl-style-spec 14.14.0 → 14.15.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 +325 -282
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +12 -12
- package/dist/index.es.js +325 -282
- package/dist/index.es.js.map +1 -1
- package/error/validation_error.ts +3 -3
- package/expression/compound_expression.ts +1 -1
- package/expression/definitions/at.ts +3 -3
- package/expression/definitions/coercion.ts +2 -2
- package/expression/definitions/config.ts +1 -1
- package/expression/definitions/image.ts +1 -1
- package/expression/evaluation_context.ts +3 -1
- package/expression/index.ts +16 -7
- package/expression/parsing_context.ts +7 -3
- package/function/index.ts +3 -3
- package/package.json +1 -1
- package/reference/v8.json +1 -0
- package/types.ts +1 -0
- package/util/get_type.ts +29 -13
- package/validate/validate.ts +63 -42
- package/validate/validate_array.ts +36 -14
- package/validate/validate_boolean.ts +8 -7
- package/validate/validate_color.ts +8 -9
- package/validate/validate_enum.ts +15 -3
- package/validate/validate_expression.ts +17 -4
- package/validate/validate_filter.ts +22 -28
- package/validate/validate_fog.ts +17 -9
- package/validate/validate_formatted.ts +8 -3
- package/validate/validate_function.ts +49 -29
- package/validate/validate_glyphs_url.ts +9 -8
- package/validate/validate_iconset.ts +22 -5
- package/validate/validate_image.ts +8 -3
- package/validate/validate_import.ts +17 -2
- package/validate/validate_layer.ts +26 -15
- package/validate/validate_layout_property.ts +2 -2
- package/validate/validate_light.ts +17 -10
- package/validate/validate_lights.ts +29 -24
- package/validate/validate_model.ts +16 -11
- package/validate/validate_number.ts +21 -13
- package/validate/validate_object.ts +23 -10
- package/validate/validate_paint_property.ts +2 -2
- package/validate/validate_projection.ts +20 -10
- package/validate/validate_property.ts +14 -9
- package/validate/validate_rain.ts +17 -9
- package/validate/validate_snow.ts +17 -9
- package/validate/validate_source.ts +49 -20
- package/validate/validate_string.ts +9 -10
- package/validate/validate_style.ts +11 -14
- package/validate/validate_terrain.ts +22 -14
- package/validate_mapbox_api_supported.ts +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -896,6 +896,7 @@ type SymbolLayerSpecification = {
|
|
|
896
896
|
number
|
|
897
897
|
]>;
|
|
898
898
|
"icon-image"?: DataDrivenPropertyValueSpecification<ResolvedImageSpecification>;
|
|
899
|
+
"icon-image-use-theme"?: PropertyValueSpecification<string>;
|
|
899
900
|
"icon-rotate"?: DataDrivenPropertyValueSpecification<number>;
|
|
900
901
|
"icon-padding"?: PropertyValueSpecification<number>;
|
|
901
902
|
"icon-keep-upright"?: PropertyValueSpecification<boolean>;
|
|
@@ -1610,9 +1611,7 @@ export declare class ValidationError {
|
|
|
1610
1611
|
message: string;
|
|
1611
1612
|
identifier: string | null | undefined;
|
|
1612
1613
|
line: number | null | undefined;
|
|
1613
|
-
constructor(key: string | null | undefined, value:
|
|
1614
|
-
__line__?: number;
|
|
1615
|
-
} | null | undefined, message: string, identifier?: string | null);
|
|
1614
|
+
constructor(key: string | null | undefined, value: unknown, message: string, identifier?: string | null);
|
|
1616
1615
|
}
|
|
1617
1616
|
export declare class ParsingError {
|
|
1618
1617
|
message: string;
|
|
@@ -1923,10 +1922,11 @@ declare class EvaluationContext {
|
|
|
1923
1922
|
featureDistanceData: FeatureDistanceData | null | undefined;
|
|
1924
1923
|
scope: string | null | undefined;
|
|
1925
1924
|
options: ConfigOptions | null | undefined;
|
|
1925
|
+
iconImageUseTheme: string | null | undefined;
|
|
1926
1926
|
_parseColorCache: {
|
|
1927
1927
|
[_: string]: Color | null | undefined;
|
|
1928
1928
|
};
|
|
1929
|
-
constructor(scope?: string | null, options?: ConfigOptions | null);
|
|
1929
|
+
constructor(scope?: string | null, options?: ConfigOptions | null, iconImageUseTheme?: string);
|
|
1930
1930
|
id(): string | number | null;
|
|
1931
1931
|
geometryType(): null | string;
|
|
1932
1932
|
geometry(): Array<Array<Point>> | null | undefined;
|
|
@@ -1994,12 +1994,12 @@ declare class StyleExpression {
|
|
|
1994
1994
|
[_: string]: unknown;
|
|
1995
1995
|
};
|
|
1996
1996
|
configDependencies: Set<string>;
|
|
1997
|
-
constructor(expression: Expression, propertySpec?: StylePropertySpecification, scope?: string, options?: ConfigOptions);
|
|
1997
|
+
constructor(expression: Expression, propertySpec?: StylePropertySpecification, scope?: string, options?: ConfigOptions, iconImageUseTheme?: string);
|
|
1998
1998
|
evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: ImageId[], formattedSection?: FormattedSection, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData): any;
|
|
1999
|
-
evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: ImageId[], formattedSection?: FormattedSection, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData): any;
|
|
1999
|
+
evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: ImageId[], formattedSection?: FormattedSection, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData, iconImageUseTheme?: string): any;
|
|
2000
2000
|
}
|
|
2001
2001
|
declare function isExpression(expression: unknown): boolean;
|
|
2002
|
-
declare function createExpression(expression: unknown, propertySpec?: StylePropertySpecification | null, scope?: string | null, options?: ConfigOptions | null): Result<StyleExpression, Array<ParsingError$1>>;
|
|
2002
|
+
declare function createExpression(expression: unknown, propertySpec?: StylePropertySpecification | null, scope?: string | null, options?: ConfigOptions | null, iconImageUseTheme?: string | null): Result<StyleExpression, Array<ParsingError$1>>;
|
|
2003
2003
|
declare class ZoomConstantExpression<Kind extends EvaluationKind> {
|
|
2004
2004
|
kind: Kind;
|
|
2005
2005
|
isStateDependent: boolean;
|
|
@@ -2009,7 +2009,7 @@ declare class ZoomConstantExpression<Kind extends EvaluationKind> {
|
|
|
2009
2009
|
isLineProgressConstant: boolean | null | undefined;
|
|
2010
2010
|
constructor(kind: Kind, expression: StyleExpression, isLightConstant?: boolean | null, isLineProgressConstant?: boolean | null);
|
|
2011
2011
|
evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: ImageId[], formattedSection?: FormattedSection): any;
|
|
2012
|
-
evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: ImageId[], formattedSection?: FormattedSection): any;
|
|
2012
|
+
evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: ImageId[], formattedSection?: FormattedSection, iconImageUseTheme?: string): any;
|
|
2013
2013
|
}
|
|
2014
2014
|
declare class ZoomDependentExpression<Kind extends EvaluationKind> {
|
|
2015
2015
|
kind: Kind;
|
|
@@ -2028,7 +2028,7 @@ declare class ZoomDependentExpression<Kind extends EvaluationKind> {
|
|
|
2028
2028
|
type ConstantExpression = {
|
|
2029
2029
|
kind: "constant";
|
|
2030
2030
|
configDependencies: Set<string>;
|
|
2031
|
-
readonly evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: ImageId[]) => any;
|
|
2031
|
+
readonly evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: ImageId[], formattedSection?: FormattedSection, iconImageUseTheme?: string) => any;
|
|
2032
2032
|
};
|
|
2033
2033
|
type SourceExpression = {
|
|
2034
2034
|
kind: "source";
|
|
@@ -2053,13 +2053,13 @@ interface CompositeExpression {
|
|
|
2053
2053
|
isLightConstant: boolean | null | undefined;
|
|
2054
2054
|
isLineProgressConstant: boolean | null | undefined;
|
|
2055
2055
|
configDependencies: Set<string>;
|
|
2056
|
-
readonly evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: ImageId[], formattedSection?: FormattedSection) => any;
|
|
2056
|
+
readonly evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: ImageId[], formattedSection?: FormattedSection, iconImageUseTheme?: string) => any;
|
|
2057
2057
|
readonly interpolationFactor: (input: number, lower: number, upper: number) => number;
|
|
2058
2058
|
zoomStops: Array<number>;
|
|
2059
2059
|
interpolationType: InterpolationType | null | undefined;
|
|
2060
2060
|
}
|
|
2061
2061
|
type StylePropertyExpression = ConstantExpression | SourceExpression | CameraExpression | CompositeExpression;
|
|
2062
|
-
declare function createPropertyExpression(expression: any, propertySpec: StylePropertySpecification, scope?: string | null, options?: ConfigOptions | null): Result<StylePropertyExpression, Array<ParsingError$1>>;
|
|
2062
|
+
declare function createPropertyExpression(expression: any, propertySpec: StylePropertySpecification, scope?: string | null, options?: ConfigOptions | null, iconImageUseTheme?: string | null): Result<StylePropertyExpression, Array<ParsingError$1>>;
|
|
2063
2063
|
declare class StylePropertyFunction<T> {
|
|
2064
2064
|
_parameters: PropertyValueSpecification<T>;
|
|
2065
2065
|
_specification: StylePropertySpecification;
|
|
@@ -2077,7 +2077,7 @@ declare class StylePropertyFunction<T> {
|
|
|
2077
2077
|
_specification: StylePropertySpecification;
|
|
2078
2078
|
};
|
|
2079
2079
|
}
|
|
2080
|
-
declare function normalizePropertyExpression<T>(value: PropertyValueSpecification<T>, specification: StylePropertySpecification, scope?: string | null, options?: ConfigOptions | null): StylePropertyExpression;
|
|
2080
|
+
declare function normalizePropertyExpression<T>(value: PropertyValueSpecification<T>, specification: StylePropertySpecification, scope?: string | null, options?: ConfigOptions | null, iconImageUseTheme?: string | null): StylePropertyExpression;
|
|
2081
2081
|
/**
|
|
2082
2082
|
* Convert the given legacy filter to (the JSON representation of) an
|
|
2083
2083
|
* equivalent expression
|