@mapbox/mapbox-gl-style-spec 14.3.0 → 14.4.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 +111 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +111 -43
- package/dist/index.es.js.map +1 -1
- package/expression/expression.js +1 -0
- package/flow-typed/gl-matrix.js +1 -1
- package/flow-typed/tracked_parameters_proxy.js +82 -0
- package/package.json +1 -1
- package/reference/v8.json +108 -40
- package/types.js +5 -1
- package/validate/validate_model.js +3 -3
- package/flow-typed/grid-index.js +0 -13
package/expression/expression.js
CHANGED
package/flow-typed/gl-matrix.js
CHANGED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// @flow
|
|
2
|
+
|
|
3
|
+
declare module 'tracked_parameters_proxy' {
|
|
4
|
+
declare type Description = any;
|
|
5
|
+
|
|
6
|
+
declare function registerParameter(
|
|
7
|
+
containerObject: any,
|
|
8
|
+
scope: Array<string>,
|
|
9
|
+
name: string,
|
|
10
|
+
description?: Description | null,
|
|
11
|
+
changeValueCallback?: any | null
|
|
12
|
+
): void;
|
|
13
|
+
|
|
14
|
+
declare function registerButton(
|
|
15
|
+
scope: Array<string>,
|
|
16
|
+
buttonTitle: string,
|
|
17
|
+
onClick: any
|
|
18
|
+
): void;
|
|
19
|
+
|
|
20
|
+
declare function registerBinding(
|
|
21
|
+
containerObject: any,
|
|
22
|
+
scope: Array<string>,
|
|
23
|
+
name: string,
|
|
24
|
+
description?: Object,
|
|
25
|
+
): void;
|
|
26
|
+
|
|
27
|
+
declare function refreshUI(): void;
|
|
28
|
+
|
|
29
|
+
declare interface ITrackedParameters {
|
|
30
|
+
constructor(map: any): void;
|
|
31
|
+
|
|
32
|
+
registerParameter(
|
|
33
|
+
containerObject: any,
|
|
34
|
+
scope: Array<string>,
|
|
35
|
+
name: string,
|
|
36
|
+
description?: Description | null,
|
|
37
|
+
changeValueCallback?: any | null
|
|
38
|
+
): void;
|
|
39
|
+
|
|
40
|
+
registerButton(
|
|
41
|
+
scope: Array<string>,
|
|
42
|
+
buttonTitle: string,
|
|
43
|
+
onClick: any
|
|
44
|
+
): void;
|
|
45
|
+
|
|
46
|
+
registerBinding(
|
|
47
|
+
containerObject: any,
|
|
48
|
+
scope: Array<string>,
|
|
49
|
+
name: string,
|
|
50
|
+
description?: Object,
|
|
51
|
+
): void;
|
|
52
|
+
|
|
53
|
+
refreshUI(): void;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare class TrackedParameters implements ITrackedParameters {
|
|
57
|
+
constructor(map: any): void;
|
|
58
|
+
|
|
59
|
+
registerParameter(
|
|
60
|
+
containerObject: any,
|
|
61
|
+
scope: Array<string>,
|
|
62
|
+
name: string,
|
|
63
|
+
description?: Description | null,
|
|
64
|
+
changeValueCallback?: any | null
|
|
65
|
+
): void;
|
|
66
|
+
|
|
67
|
+
registerButton(
|
|
68
|
+
scope: Array<string>,
|
|
69
|
+
buttonTitle: string,
|
|
70
|
+
onClick: any
|
|
71
|
+
): void;
|
|
72
|
+
|
|
73
|
+
registerBinding(
|
|
74
|
+
containerObject: any,
|
|
75
|
+
scope: Array<string>,
|
|
76
|
+
name: string,
|
|
77
|
+
description?: Object,
|
|
78
|
+
): void;
|
|
79
|
+
|
|
80
|
+
refreshUI(): void;
|
|
81
|
+
}
|
|
82
|
+
}
|
package/package.json
CHANGED
package/reference/v8.json
CHANGED
|
@@ -948,6 +948,11 @@
|
|
|
948
948
|
"default": 18,
|
|
949
949
|
"doc": "Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."
|
|
950
950
|
},
|
|
951
|
+
"minzoom": {
|
|
952
|
+
"type": "number",
|
|
953
|
+
"default": 0,
|
|
954
|
+
"doc": "Minimum zoom level at which to create vector tiles"
|
|
955
|
+
},
|
|
951
956
|
"attribution": {
|
|
952
957
|
"type": "string",
|
|
953
958
|
"doc": "Contains an attribution to be displayed when the map is shown to a user."
|
|
@@ -1178,10 +1183,9 @@
|
|
|
1178
1183
|
"doc": "Particle animation driven by textures such as wind maps.",
|
|
1179
1184
|
"sdk-support": {
|
|
1180
1185
|
"basic functionality": {
|
|
1181
|
-
"js": "
|
|
1182
|
-
"android": "
|
|
1183
|
-
"ios": "
|
|
1184
|
-
"macos": "0.1.0"
|
|
1186
|
+
"js": "3.3.0",
|
|
1187
|
+
"android": "11.4.0",
|
|
1188
|
+
"ios": "11.4.0"
|
|
1185
1189
|
}
|
|
1186
1190
|
}
|
|
1187
1191
|
},
|
|
@@ -1391,7 +1395,7 @@
|
|
|
1391
1395
|
"model-id": {
|
|
1392
1396
|
"type": "string",
|
|
1393
1397
|
"default": "",
|
|
1394
|
-
"doc": "Model to render.",
|
|
1398
|
+
"doc": "Model to render. It can be either a string referencing an element to the models root property or an internal or external URL",
|
|
1395
1399
|
"property-type": "data-driven",
|
|
1396
1400
|
"expression": {
|
|
1397
1401
|
"interpolated": false,
|
|
@@ -1664,6 +1668,9 @@
|
|
|
1664
1668
|
},
|
|
1665
1669
|
"miter": {
|
|
1666
1670
|
"doc": "A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."
|
|
1671
|
+
},
|
|
1672
|
+
"none": {
|
|
1673
|
+
"doc": "Line segments are not joined together, each one creates a separate line. Useful in combination with line-pattern. Line-cap property is not respected. Can't be used with data-driven styling."
|
|
1667
1674
|
}
|
|
1668
1675
|
},
|
|
1669
1676
|
"default": "miter",
|
|
@@ -1678,6 +1685,11 @@
|
|
|
1678
1685
|
"js": "0.40.0",
|
|
1679
1686
|
"android": "5.2.0",
|
|
1680
1687
|
"ios": "3.7.0"
|
|
1688
|
+
},
|
|
1689
|
+
"`none` value": {
|
|
1690
|
+
"js": "3.4.0",
|
|
1691
|
+
"android": "11.5.0",
|
|
1692
|
+
"ios": "11.5.0"
|
|
1681
1693
|
}
|
|
1682
1694
|
},
|
|
1683
1695
|
"expression": {
|
|
@@ -3229,14 +3241,14 @@
|
|
|
3229
3241
|
"doc": "Whether this layer is displayed.",
|
|
3230
3242
|
"sdk-support": {
|
|
3231
3243
|
"basic functionality": {
|
|
3232
|
-
"js": "
|
|
3233
|
-
"android": "
|
|
3234
|
-
"ios": "
|
|
3244
|
+
"js": "3.3.0",
|
|
3245
|
+
"android": "11.4.0",
|
|
3246
|
+
"ios": "11.4.0"
|
|
3235
3247
|
},
|
|
3236
3248
|
"expressions support": {
|
|
3237
|
-
"js": "3.
|
|
3238
|
-
"android": "11.
|
|
3239
|
-
"ios": "11.
|
|
3249
|
+
"js": "3.3.0",
|
|
3250
|
+
"android": "11.4.0",
|
|
3251
|
+
"ios": "11.4.0"
|
|
3240
3252
|
}
|
|
3241
3253
|
},
|
|
3242
3254
|
"expression": {
|
|
@@ -4543,8 +4555,8 @@
|
|
|
4543
4555
|
"sdk-support": {
|
|
4544
4556
|
"basic functionality": {
|
|
4545
4557
|
"js": "3.3.0",
|
|
4546
|
-
"android": "",
|
|
4547
|
-
"ios": ""
|
|
4558
|
+
"android": "11.4.0",
|
|
4559
|
+
"ios": "11.4.0"
|
|
4548
4560
|
}
|
|
4549
4561
|
}
|
|
4550
4562
|
},
|
|
@@ -7329,12 +7341,11 @@
|
|
|
7329
7341
|
},
|
|
7330
7342
|
"icon-color-saturation": {
|
|
7331
7343
|
"type": "number",
|
|
7332
|
-
"default":
|
|
7333
|
-
"minimum":
|
|
7344
|
+
"default": 0,
|
|
7345
|
+
"minimum": -1,
|
|
7334
7346
|
"maximum": 1,
|
|
7335
|
-
"transition":
|
|
7336
|
-
"
|
|
7337
|
-
"doc": "Controls saturation level of the symbol icon. With the default value of 1 the icon color is preserved while with a value of 0 it is fully desaturated and looks black and white.",
|
|
7347
|
+
"transition": false,
|
|
7348
|
+
"doc": "Increase or reduce the saturation of the symbol icon.",
|
|
7338
7349
|
"sdk-support": {
|
|
7339
7350
|
"basic functionality": {
|
|
7340
7351
|
"js": "3.1.0",
|
|
@@ -7346,6 +7357,63 @@
|
|
|
7346
7357
|
"interpolated": false
|
|
7347
7358
|
},
|
|
7348
7359
|
"property-type": "data-constant"
|
|
7360
|
+
},
|
|
7361
|
+
"icon-color-contrast": {
|
|
7362
|
+
"type": "number",
|
|
7363
|
+
"default": 0,
|
|
7364
|
+
"minimum": -1,
|
|
7365
|
+
"maximum": 1,
|
|
7366
|
+
"transition": false,
|
|
7367
|
+
"doc": "Increase or reduce the contrast of the symbol icon.",
|
|
7368
|
+
"sdk-support": {
|
|
7369
|
+
"basic functionality": {
|
|
7370
|
+
"js": "3.5.0",
|
|
7371
|
+
"android": "11.5.0",
|
|
7372
|
+
"ios": "11.5.0"
|
|
7373
|
+
}
|
|
7374
|
+
},
|
|
7375
|
+
"expression": {
|
|
7376
|
+
"interpolated": false
|
|
7377
|
+
},
|
|
7378
|
+
"property-type": "data-constant"
|
|
7379
|
+
},
|
|
7380
|
+
"icon-color-brightness-min": {
|
|
7381
|
+
"type": "number",
|
|
7382
|
+
"doc": "Increase or reduce the brightness of the symbols. The value is the minimum brightness.",
|
|
7383
|
+
"default": 0,
|
|
7384
|
+
"minimum": 0,
|
|
7385
|
+
"maximum": 1,
|
|
7386
|
+
"transition": false,
|
|
7387
|
+
"sdk-support": {
|
|
7388
|
+
"basic functionality": {
|
|
7389
|
+
"js": "3.5.0",
|
|
7390
|
+
"android": "11.5.0",
|
|
7391
|
+
"ios": "11.5.0"
|
|
7392
|
+
}
|
|
7393
|
+
},
|
|
7394
|
+
"expression": {
|
|
7395
|
+
"interpolated": false
|
|
7396
|
+
},
|
|
7397
|
+
"property-type": "data-constant"
|
|
7398
|
+
},
|
|
7399
|
+
"icon-color-brightness-max": {
|
|
7400
|
+
"type": "number",
|
|
7401
|
+
"doc": "Increase or reduce the brightness of the symbols. The value is the maximum brightness.",
|
|
7402
|
+
"default": 1,
|
|
7403
|
+
"minimum": 0,
|
|
7404
|
+
"maximum": 1,
|
|
7405
|
+
"transition": false,
|
|
7406
|
+
"sdk-support": {
|
|
7407
|
+
"basic functionality": {
|
|
7408
|
+
"js": "3.5.0",
|
|
7409
|
+
"android": "11.5.0",
|
|
7410
|
+
"ios": "11.5.0"
|
|
7411
|
+
}
|
|
7412
|
+
},
|
|
7413
|
+
"expression": {
|
|
7414
|
+
"interpolated": false
|
|
7415
|
+
},
|
|
7416
|
+
"property-type": "data-constant"
|
|
7349
7417
|
}
|
|
7350
7418
|
},
|
|
7351
7419
|
"paint_raster": {
|
|
@@ -7689,12 +7757,12 @@
|
|
|
7689
7757
|
"property-type": "data-constant",
|
|
7690
7758
|
"transition": false,
|
|
7691
7759
|
"doc": "Displayed band of raster array source layer",
|
|
7692
|
-
"example": "
|
|
7760
|
+
"example": "\"1713348000\"",
|
|
7693
7761
|
"sdk-support": {
|
|
7694
7762
|
"basic functionality": {
|
|
7695
|
-
"js": "",
|
|
7696
|
-
"android": "",
|
|
7697
|
-
"ios": ""
|
|
7763
|
+
"js": "3.3.0",
|
|
7764
|
+
"android": "11.4.0",
|
|
7765
|
+
"ios": "11.4.0"
|
|
7698
7766
|
}
|
|
7699
7767
|
}
|
|
7700
7768
|
},
|
|
@@ -7706,9 +7774,9 @@
|
|
|
7706
7774
|
"transition": false,
|
|
7707
7775
|
"sdk-support": {
|
|
7708
7776
|
"basic functionality": {
|
|
7709
|
-
"js": "",
|
|
7710
|
-
"android": "",
|
|
7711
|
-
"ios": ""
|
|
7777
|
+
"js": "3.3.0",
|
|
7778
|
+
"android": "11.4.0",
|
|
7779
|
+
"ios": "11.4.0"
|
|
7712
7780
|
}
|
|
7713
7781
|
},
|
|
7714
7782
|
"property-type": "data-constant"
|
|
@@ -7719,9 +7787,9 @@
|
|
|
7719
7787
|
"transition": false,
|
|
7720
7788
|
"sdk-support": {
|
|
7721
7789
|
"basic functionality": {
|
|
7722
|
-
"js": "",
|
|
7723
|
-
"android": "",
|
|
7724
|
-
"ios": ""
|
|
7790
|
+
"js": "3.3.0",
|
|
7791
|
+
"android": "11.4.0",
|
|
7792
|
+
"ios": "11.4.0"
|
|
7725
7793
|
},
|
|
7726
7794
|
"data-driven styling": {}
|
|
7727
7795
|
},
|
|
@@ -7741,9 +7809,9 @@
|
|
|
7741
7809
|
"transition": false,
|
|
7742
7810
|
"sdk-support": {
|
|
7743
7811
|
"basic functionality": {
|
|
7744
|
-
"js": "",
|
|
7745
|
-
"android": "",
|
|
7746
|
-
"ios": ""
|
|
7812
|
+
"js": "3.3.0",
|
|
7813
|
+
"android": "11.4.0",
|
|
7814
|
+
"ios": "11.4.0"
|
|
7747
7815
|
}
|
|
7748
7816
|
},
|
|
7749
7817
|
"property-type": "data-constant"
|
|
@@ -7757,9 +7825,9 @@
|
|
|
7757
7825
|
"transition": true,
|
|
7758
7826
|
"sdk-support": {
|
|
7759
7827
|
"basic functionality": {
|
|
7760
|
-
"js": "",
|
|
7761
|
-
"android": "",
|
|
7762
|
-
"ios": ""
|
|
7828
|
+
"js": "3.3.0",
|
|
7829
|
+
"android": "11.4.0",
|
|
7830
|
+
"ios": "11.4.0"
|
|
7763
7831
|
}
|
|
7764
7832
|
},
|
|
7765
7833
|
"expression": {
|
|
@@ -7779,9 +7847,9 @@
|
|
|
7779
7847
|
"transition": true,
|
|
7780
7848
|
"sdk-support": {
|
|
7781
7849
|
"basic functionality": {
|
|
7782
|
-
"js": "",
|
|
7783
|
-
"android": "",
|
|
7784
|
-
"ios": ""
|
|
7850
|
+
"js": "3.3.0",
|
|
7851
|
+
"android": "11.4.0",
|
|
7852
|
+
"ios": "11.4.0"
|
|
7785
7853
|
}
|
|
7786
7854
|
},
|
|
7787
7855
|
"expression": {
|
|
@@ -7801,9 +7869,9 @@
|
|
|
7801
7869
|
"transition": false,
|
|
7802
7870
|
"sdk-support": {
|
|
7803
7871
|
"basic functionality": {
|
|
7804
|
-
"js": "",
|
|
7805
|
-
"android": "",
|
|
7806
|
-
"ios": ""
|
|
7872
|
+
"js": "3.3.0",
|
|
7873
|
+
"android": "11.4.0",
|
|
7874
|
+
"ios": "11.4.0"
|
|
7807
7875
|
}
|
|
7808
7876
|
},
|
|
7809
7877
|
"property-type": "data-constant"
|
package/types.js
CHANGED
|
@@ -208,6 +208,7 @@ export type GeoJSONSourceSpecification = {|
|
|
|
208
208
|
"type": "geojson",
|
|
209
209
|
"data"?: mixed,
|
|
210
210
|
"maxzoom"?: number,
|
|
211
|
+
"minzoom"?: number,
|
|
211
212
|
"attribution"?: string,
|
|
212
213
|
"buffer"?: number,
|
|
213
214
|
"filter"?: mixed,
|
|
@@ -426,7 +427,10 @@ export type SymbolLayerSpecification = {|
|
|
|
426
427
|
"text-halo-blur"?: DataDrivenPropertyValueSpecification<number>,
|
|
427
428
|
"text-translate"?: PropertyValueSpecification<[number, number]>,
|
|
428
429
|
"text-translate-anchor"?: PropertyValueSpecification<"map" | "viewport">,
|
|
429
|
-
"icon-color-saturation"?: ExpressionSpecification
|
|
430
|
+
"icon-color-saturation"?: ExpressionSpecification,
|
|
431
|
+
"icon-color-contrast"?: ExpressionSpecification,
|
|
432
|
+
"icon-color-brightness-min"?: ExpressionSpecification,
|
|
433
|
+
"icon-color-brightness-max"?: ExpressionSpecification
|
|
430
434
|
|}
|
|
431
435
|
|}
|
|
432
436
|
|
|
@@ -6,10 +6,10 @@ import getType from '../util/get_type.js';
|
|
|
6
6
|
import type {ValidationOptions} from './validate.js';
|
|
7
7
|
|
|
8
8
|
// Allow any URL, use dummy base, if it's a relative URL
|
|
9
|
-
function isValidUrl(str: string): boolean {
|
|
9
|
+
export function isValidUrl(str: string, allowRelativeUrls: boolean): boolean {
|
|
10
10
|
const isRelative = str.indexOf('://') === -1;
|
|
11
11
|
try {
|
|
12
|
-
new URL(str, isRelative ? 'http://example.com' : undefined);
|
|
12
|
+
new URL(str, isRelative && allowRelativeUrls ? 'http://example.com' : undefined);
|
|
13
13
|
return true;
|
|
14
14
|
} catch (_) {
|
|
15
15
|
return false;
|
|
@@ -30,7 +30,7 @@ export default function validateModel(options: ValidationOptions): Array<Validat
|
|
|
30
30
|
return errors;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
if (!isValidUrl(url)) {
|
|
33
|
+
if (!isValidUrl(url, true)) {
|
|
34
34
|
errors = errors.concat([new ValidationError(options.key, url, `invalid url "${url}"`)]);
|
|
35
35
|
}
|
|
36
36
|
|
package/flow-typed/grid-index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// @flow strict
|
|
2
|
-
declare module 'grid-index' {
|
|
3
|
-
declare class GridIndex {
|
|
4
|
-
constructor(extent: number, n: number, padding: number): GridIndex;
|
|
5
|
-
constructor(data: ArrayBuffer): GridIndex;
|
|
6
|
-
|
|
7
|
-
insert(key: number, x1: number, y1: number, x2: number, y2: number): void;
|
|
8
|
-
query(x1: number, y1: number, x2: number, y2: number, intersectionText?: (number, number, number, number) => boolean): Array<number>;
|
|
9
|
-
toArrayBuffer(): ArrayBuffer;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare export default Class<GridIndex>;
|
|
13
|
-
}
|