@mapbox/mapbox-gl-style-spec 14.24.0 → 14.25.0-rc.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/bin/gl-style-composite.js +9 -4
- package/bin/gl-style-format.js +10 -4
- package/bin/gl-style-migrate.js +9 -4
- package/bin/gl-style-validate.js +16 -15
- package/deref.ts +8 -6
- package/dist/index.cjs +7771 -9448
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +14 -11
- package/dist/index.es.js +7771 -9448
- package/dist/index.es.js.map +1 -1
- package/expression/compound_expression.ts +1 -1
- package/expression/definitions/assertion.ts +1 -1
- package/expression/definitions/at_interpolated.ts +2 -1
- package/expression/definitions/case.ts +1 -1
- package/expression/definitions/coalesce.ts +1 -1
- package/expression/definitions/coercion.ts +1 -1
- package/expression/definitions/distance.ts +1 -9
- package/expression/definitions/interpolate.ts +3 -3
- package/expression/definitions/literal.ts +1 -1
- package/expression/definitions/match.ts +1 -1
- package/expression/definitions/number_format.ts +8 -6
- package/expression/definitions/within.ts +1 -8
- package/expression/evaluation_context.ts +1 -10
- package/expression/index.ts +1 -1
- package/expression/values.ts +3 -4
- package/feature_filter/index.ts +1 -1
- package/function/convert.ts +1 -1
- package/group_by_layout.ts +8 -2
- package/package.json +4 -6
- package/read_style.ts +4 -4
- package/reference/v8.json +41 -7
- package/rollup.config.js +7 -4
- package/test.js +1 -1
- package/types/config_options.ts +7 -7
- package/types/lut.ts +5 -5
- package/types/tile_id.ts +3 -3
- package/types.ts +8 -1
- package/union-to-intersection.ts +2 -2
- package/util/assert.ts +3 -0
- package/util/color.ts +33 -18
- package/util/deep_equal.ts +6 -4
- package/util/geometry_util.ts +1 -1
- package/util/lerp.ts +3 -1
- package/util/mercator.ts +16 -0
- package/util/unbundle_jsonlint.ts +3 -2
- package/validate/validate.ts +2 -0
- package/validate/validate_appearance.ts +1 -1
- package/validate/validate_color.ts +5 -2
- package/validate/validate_expression.ts +16 -8
- package/validate/validate_function.ts +3 -2
- package/validate/validate_iconset.ts +1 -1
- package/validate/validate_import.ts +7 -0
- package/validate/validate_layer.ts +4 -1
- package/validate/validate_object.ts +20 -7
- package/validate/validate_option.ts +37 -0
- package/validate/validate_terrain.ts +1 -1
- package/validate_style.ts +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1608,6 +1608,11 @@ export type ModelLayerSpecification = {
|
|
|
1608
1608
|
"model-color-use-theme"?: PropertyValueSpecification<string>;
|
|
1609
1609
|
"model-color-mix-intensity"?: DataDrivenPropertyValueSpecification<number>;
|
|
1610
1610
|
"model-color-mix-intensity-transition"?: TransitionSpecification;
|
|
1611
|
+
/**
|
|
1612
|
+
* @experimental This property is experimental and subject to change in future versions.
|
|
1613
|
+
*/
|
|
1614
|
+
"model-lightmap-intensity"?: PropertyValueSpecification<number>;
|
|
1615
|
+
"model-lightmap-intensity-transition"?: TransitionSpecification;
|
|
1611
1616
|
"model-type"?: "common-3d" | "location-indicator";
|
|
1612
1617
|
"model-cast-shadows"?: boolean;
|
|
1613
1618
|
"model-receive-shadows"?: boolean;
|
|
@@ -1635,7 +1640,7 @@ export type ModelLayerSpecification = {
|
|
|
1635
1640
|
/**
|
|
1636
1641
|
* @experimental This property is experimental and subject to change in future versions.
|
|
1637
1642
|
*/
|
|
1638
|
-
"model-
|
|
1643
|
+
"model-line-cutout-mode"?: "enabled" | "disabled" | "enabled-above-cutout" | ExpressionSpecification;
|
|
1639
1644
|
};
|
|
1640
1645
|
/**
|
|
1641
1646
|
* @experimental This property is experimental and subject to change in future versions.
|
|
@@ -1782,6 +1787,7 @@ export type ClipLayout = ClipLayerSpecification["layout"];
|
|
|
1782
1787
|
export type LayerSpecification = FillLayerSpecification | LineLayerSpecification | SymbolLayerSpecification | CircleLayerSpecification | HeatmapLayerSpecification | FillExtrusionLayerSpecification | BuildingLayerSpecification | RasterLayerSpecification | RasterParticleLayerSpecification | HillshadeLayerSpecification | ModelLayerSpecification | BackgroundLayerSpecification | SkyLayerSpecification | SlotLayerSpecification | ClipLayerSpecification;
|
|
1783
1788
|
export type LayoutSpecification = UnionToIntersection<NonNullable<LayerSpecification["layout"]>>;
|
|
1784
1789
|
export type PaintSpecification = UnionToIntersection<NonNullable<LayerSpecification["paint"]>>;
|
|
1790
|
+
export type LayerBaseSpecification = Pick<LayerSpecification, "slot" | "minzoom" | "maxzoom" | "filter" | "appearances">;
|
|
1785
1791
|
export type Layer = Pick<LayerSpecification, "id" | "type" | "source" | "source-layer" | "slot" | "filter" | "layout" | "paint" | "minzoom" | "maxzoom" | "metadata">;
|
|
1786
1792
|
/**
|
|
1787
1793
|
* @deprecated Use `StyleSpecification` instead.
|
|
@@ -1969,10 +1975,10 @@ type LUT = {
|
|
|
1969
1975
|
* @private
|
|
1970
1976
|
*/
|
|
1971
1977
|
export declare class Color {
|
|
1972
|
-
r: number;
|
|
1973
|
-
g: number;
|
|
1974
|
-
b: number;
|
|
1975
|
-
a: number;
|
|
1978
|
+
readonly r: number;
|
|
1979
|
+
readonly g: number;
|
|
1980
|
+
readonly b: number;
|
|
1981
|
+
readonly a: number;
|
|
1976
1982
|
constructor(r: number, g: number, b: number, a?: number);
|
|
1977
1983
|
static black: Color;
|
|
1978
1984
|
static white: Color;
|
|
@@ -2252,9 +2258,6 @@ declare class EvaluationContext {
|
|
|
2252
2258
|
scope: string | null | undefined;
|
|
2253
2259
|
options: ConfigOptions | null | undefined;
|
|
2254
2260
|
iconImageUseTheme: string | null | undefined;
|
|
2255
|
-
_parseColorCache: {
|
|
2256
|
-
[_: string]: Color | null | undefined;
|
|
2257
|
-
};
|
|
2258
2261
|
constructor(scope?: string | null, options?: ConfigOptions | null, iconImageUseTheme?: string);
|
|
2259
2262
|
id(): string | number | null;
|
|
2260
2263
|
geometryType(): null | string;
|
|
@@ -2482,8 +2485,8 @@ type ValidationErrors = ReadonlyArray<ValidationError$1>;
|
|
|
2482
2485
|
*
|
|
2483
2486
|
* @private
|
|
2484
2487
|
* @alias validate
|
|
2485
|
-
* @param {Object|String|
|
|
2486
|
-
* or `
|
|
2488
|
+
* @param {Object|String|Uint8Array} style The style to be validated. If a `String`
|
|
2489
|
+
* or `Uint8Array` is provided, the returned errors will contain line numbers.
|
|
2487
2490
|
* @param {Object} [styleSpec] The style specification to validate against.
|
|
2488
2491
|
* If omitted, the spec version is inferred from the stylesheet.
|
|
2489
2492
|
* @returns {Array<ValidationError|ParsingError>}
|
|
@@ -2492,7 +2495,7 @@ type ValidationErrors = ReadonlyArray<ValidationError$1>;
|
|
|
2492
2495
|
* var style = fs.readFileSync('./style.json', 'utf8');
|
|
2493
2496
|
* var errors = validate(style);
|
|
2494
2497
|
*/
|
|
2495
|
-
declare function validateStyle(style: StyleSpecification | string |
|
|
2498
|
+
declare function validateStyle(style: StyleSpecification | string | Uint8Array, styleSpec?: StyleReference): ValidationErrors;
|
|
2496
2499
|
type MapboxStyleSpecification = StyleSpecification & {
|
|
2497
2500
|
visibility?: "public" | "private";
|
|
2498
2501
|
protected?: boolean;
|