@mapbox/mapbox-gl-style-spec 14.0.0-rc.2 → 14.0.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/diff.js +20 -3
- package/dist/index.cjs +46 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +46 -9
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/reference/v8.json +17 -6
package/diff.js
CHANGED
|
@@ -38,6 +38,11 @@ export const operations: {[_: string]: string} = {
|
|
|
38
38
|
*/
|
|
39
39
|
setLayoutProperty: 'setLayoutProperty',
|
|
40
40
|
|
|
41
|
+
/*
|
|
42
|
+
* { command: 'setSlot', args: ['layerId', slot] }
|
|
43
|
+
*/
|
|
44
|
+
setSlot: 'setSlot',
|
|
45
|
+
|
|
41
46
|
/*
|
|
42
47
|
* { command: 'setFilter', args: ['layerId', filter] }
|
|
43
48
|
*/
|
|
@@ -151,7 +156,12 @@ export const operations: {[_: string]: string} = {
|
|
|
151
156
|
/*
|
|
152
157
|
* { command: 'setImportData', args: [importId, stylesheet] }
|
|
153
158
|
*/
|
|
154
|
-
setImportData: 'setImportData'
|
|
159
|
+
setImportData: 'setImportData',
|
|
160
|
+
|
|
161
|
+
/*
|
|
162
|
+
* { command: 'setImportConfig', args: [importId, config] }
|
|
163
|
+
*/
|
|
164
|
+
setImportConfig: 'setImportConfig'
|
|
155
165
|
};
|
|
156
166
|
|
|
157
167
|
function addSource(sourceId: string, after: Sources, commands: Array<Command>) {
|
|
@@ -324,6 +334,9 @@ function diffLayers(before: Array<LayerSpecification>, after: Array<LayerSpecifi
|
|
|
324
334
|
// layout, paint, filter, minzoom, maxzoom
|
|
325
335
|
diffLayerPropertyChanges(beforeLayer.layout, afterLayer.layout, commands, layerId, null, operations.setLayoutProperty);
|
|
326
336
|
diffLayerPropertyChanges(beforeLayer.paint, afterLayer.paint, commands, layerId, null, operations.setPaintProperty);
|
|
337
|
+
if (!isEqual(beforeLayer.slot, afterLayer.slot)) {
|
|
338
|
+
commands.push({command: operations.setSlot, args: [layerId, afterLayer.slot]});
|
|
339
|
+
}
|
|
327
340
|
if (!isEqual(beforeLayer.filter, afterLayer.filter)) {
|
|
328
341
|
commands.push({command: operations.setFilter, args: [layerId, afterLayer.filter]});
|
|
329
342
|
}
|
|
@@ -335,7 +348,7 @@ function diffLayers(before: Array<LayerSpecification>, after: Array<LayerSpecifi
|
|
|
335
348
|
for (prop in beforeLayer) {
|
|
336
349
|
if (!beforeLayer.hasOwnProperty(prop)) continue;
|
|
337
350
|
if (prop === 'layout' || prop === 'paint' || prop === 'filter' ||
|
|
338
|
-
prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom') continue;
|
|
351
|
+
prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom' || prop === 'slot') continue;
|
|
339
352
|
if (prop.indexOf('paint.') === 0) {
|
|
340
353
|
diffLayerPropertyChanges(beforeLayer[prop], afterLayer[prop], commands, layerId, prop.slice(6), operations.setPaintProperty);
|
|
341
354
|
} else if (!isEqual(beforeLayer[prop], afterLayer[prop])) {
|
|
@@ -345,7 +358,7 @@ function diffLayers(before: Array<LayerSpecification>, after: Array<LayerSpecifi
|
|
|
345
358
|
for (prop in afterLayer) {
|
|
346
359
|
if (!afterLayer.hasOwnProperty(prop) || beforeLayer.hasOwnProperty(prop)) continue;
|
|
347
360
|
if (prop === 'layout' || prop === 'paint' || prop === 'filter' ||
|
|
348
|
-
prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom') continue;
|
|
361
|
+
prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom' || prop === 'slot') continue;
|
|
349
362
|
if (prop.indexOf('paint.') === 0) {
|
|
350
363
|
diffLayerPropertyChanges(beforeLayer[prop], afterLayer[prop], commands, layerId, prop.slice(6), operations.setPaintProperty);
|
|
351
364
|
} else if (!isEqual(beforeLayer[prop], afterLayer[prop])) {
|
|
@@ -411,6 +424,10 @@ export function diffImports(before: Array<ImportSpecification> = [], after: Arra
|
|
|
411
424
|
const beforeImport = beforeIndex[afterImport.id];
|
|
412
425
|
if (!beforeImport || isEqual(beforeImport, afterImport)) continue;
|
|
413
426
|
|
|
427
|
+
if (!isEqual(beforeImport.config, afterImport.config)) {
|
|
428
|
+
commands.push({command: operations.setImportConfig, args: [afterImport.id, afterImport.config]});
|
|
429
|
+
}
|
|
430
|
+
|
|
414
431
|
if (!isEqual(beforeImport.url, afterImport.url)) {
|
|
415
432
|
commands.push({command: operations.setImportUrl, args: [afterImport.id, afterImport.url]});
|
|
416
433
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -95,7 +95,15 @@
|
|
|
95
95
|
"shadow-intensity": 0.2
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
]
|
|
98
|
+
],
|
|
99
|
+
"sdk-support": {
|
|
100
|
+
"basic functionality": {
|
|
101
|
+
js: "3.0.0",
|
|
102
|
+
android: "11.0.0",
|
|
103
|
+
ios: "11.0.0",
|
|
104
|
+
macos: "11.0.0"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
99
107
|
},
|
|
100
108
|
terrain: {
|
|
101
109
|
type: "terrain",
|
|
@@ -1784,7 +1792,7 @@
|
|
|
1784
1792
|
"symbol-z-elevate": {
|
|
1785
1793
|
type: "boolean",
|
|
1786
1794
|
"default": false,
|
|
1787
|
-
doc: "Position symbol on buildings (both fill extrusions and models)
|
|
1795
|
+
doc: "Position symbol on buildings (both fill extrusions and models) rooftops. In order to have minimal impact on performance, this is supported only when `fill-extrusion-height` is not zoom-dependent and remains unchanged. For fading in buildings when zooming in, fill-extrusion-vertical-scale should be used and symbols would raise with building rooftops. Symbols are sorted by elevation, except in cases when `viewport-y` sorting or `symbol-sort-key` are applied.",
|
|
1788
1796
|
"sdk-support": {
|
|
1789
1797
|
"basic functionality": {
|
|
1790
1798
|
js: "3.0.0",
|
|
@@ -7204,7 +7212,10 @@
|
|
|
7204
7212
|
minimum: 0,
|
|
7205
7213
|
transition: true,
|
|
7206
7214
|
units: "intensity",
|
|
7207
|
-
doc: "Controls the intensity of light emitted on the source features.
|
|
7215
|
+
doc: "Controls the intensity of light emitted on the source features.",
|
|
7216
|
+
requires: [
|
|
7217
|
+
"lights"
|
|
7218
|
+
],
|
|
7208
7219
|
"sdk-support": {
|
|
7209
7220
|
"basic functionality": {
|
|
7210
7221
|
js: "3.0.0",
|
|
@@ -8015,7 +8026,7 @@
|
|
|
8015
8026
|
}
|
|
8016
8027
|
},
|
|
8017
8028
|
directional: {
|
|
8018
|
-
doc: "A light that has a direction and is located at infinite, so its rays are parallel.
|
|
8029
|
+
doc: "A light that has a direction and is located at infinite distance, so its rays are parallel. It simulates the sun light and can cast shadows.",
|
|
8019
8030
|
"sdk-support": {
|
|
8020
8031
|
"basic functionality": {
|
|
8021
8032
|
js: "3.0.0",
|
|
@@ -8025,7 +8036,7 @@
|
|
|
8025
8036
|
}
|
|
8026
8037
|
},
|
|
8027
8038
|
flat: {
|
|
8028
|
-
doc: "A global directional light source which is only applied on 3D
|
|
8039
|
+
doc: "A global directional light source which is only applied on 3D and hillshade layers. Using this type disables other light sources.",
|
|
8029
8040
|
"sdk-support": {
|
|
8030
8041
|
"basic functionality": {
|
|
8031
8042
|
js: "3.0.0",
|
|
@@ -8486,7 +8497,7 @@
|
|
|
8486
8497
|
]
|
|
8487
8498
|
},
|
|
8488
8499
|
transition: true,
|
|
8489
|
-
doc: "Shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to height of one floor and brings the most plausible results for buildings. This property works only with legacy light. When 3D
|
|
8500
|
+
doc: "Shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to height of one floor and brings the most plausible results for buildings. This property works only with legacy light. When 3D lights are enabled `fill-extrusion-ambient-occlusion-wall-radius` and `fill-extrusion-ambient-occlusion-ground-radius` are used instead.",
|
|
8490
8501
|
requires: [
|
|
8491
8502
|
"fill-extrusion-edge-radius",
|
|
8492
8503
|
{
|
|
@@ -18624,6 +18635,10 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
18624
18635
|
* { command: 'setLayoutProperty', args: ['layerId', 'prop', value] }
|
|
18625
18636
|
*/
|
|
18626
18637
|
setLayoutProperty: 'setLayoutProperty',
|
|
18638
|
+
/*
|
|
18639
|
+
* { command: 'setSlot', args: ['layerId', slot] }
|
|
18640
|
+
*/
|
|
18641
|
+
setSlot: 'setSlot',
|
|
18627
18642
|
/*
|
|
18628
18643
|
* { command: 'setFilter', args: ['layerId', filter] }
|
|
18629
18644
|
*/
|
|
@@ -18715,7 +18730,11 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
18715
18730
|
/*
|
|
18716
18731
|
* { command: 'setImportData', args: [importId, stylesheet] }
|
|
18717
18732
|
*/
|
|
18718
|
-
setImportData: 'setImportData'
|
|
18733
|
+
setImportData: 'setImportData',
|
|
18734
|
+
/*
|
|
18735
|
+
* { command: 'setImportConfig', args: [importId, config] }
|
|
18736
|
+
*/
|
|
18737
|
+
setImportConfig: 'setImportConfig'
|
|
18719
18738
|
};
|
|
18720
18739
|
function addSource(sourceId, after, commands) {
|
|
18721
18740
|
commands.push({
|
|
@@ -18920,6 +18939,15 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
18920
18939
|
// layout, paint, filter, minzoom, maxzoom
|
|
18921
18940
|
diffLayerPropertyChanges(beforeLayer.layout, afterLayer.layout, commands, layerId, null, operations.setLayoutProperty);
|
|
18922
18941
|
diffLayerPropertyChanges(beforeLayer.paint, afterLayer.paint, commands, layerId, null, operations.setPaintProperty);
|
|
18942
|
+
if (!deepEqual(beforeLayer.slot, afterLayer.slot)) {
|
|
18943
|
+
commands.push({
|
|
18944
|
+
command: operations.setSlot,
|
|
18945
|
+
args: [
|
|
18946
|
+
layerId,
|
|
18947
|
+
afterLayer.slot
|
|
18948
|
+
]
|
|
18949
|
+
});
|
|
18950
|
+
}
|
|
18923
18951
|
if (!deepEqual(beforeLayer.filter, afterLayer.filter)) {
|
|
18924
18952
|
commands.push({
|
|
18925
18953
|
command: operations.setFilter,
|
|
@@ -18943,7 +18971,7 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
18943
18971
|
for (prop in beforeLayer) {
|
|
18944
18972
|
if (!beforeLayer.hasOwnProperty(prop))
|
|
18945
18973
|
continue;
|
|
18946
|
-
if (prop === 'layout' || prop === 'paint' || prop === 'filter' || prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom')
|
|
18974
|
+
if (prop === 'layout' || prop === 'paint' || prop === 'filter' || prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom' || prop === 'slot')
|
|
18947
18975
|
continue;
|
|
18948
18976
|
if (prop.indexOf('paint.') === 0) {
|
|
18949
18977
|
diffLayerPropertyChanges(beforeLayer[prop], afterLayer[prop], commands, layerId, prop.slice(6), operations.setPaintProperty);
|
|
@@ -18961,7 +18989,7 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
18961
18989
|
for (prop in afterLayer) {
|
|
18962
18990
|
if (!afterLayer.hasOwnProperty(prop) || beforeLayer.hasOwnProperty(prop))
|
|
18963
18991
|
continue;
|
|
18964
|
-
if (prop === 'layout' || prop === 'paint' || prop === 'filter' || prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom')
|
|
18992
|
+
if (prop === 'layout' || prop === 'paint' || prop === 'filter' || prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom' || prop === 'slot')
|
|
18965
18993
|
continue;
|
|
18966
18994
|
if (prop.indexOf('paint.') === 0) {
|
|
18967
18995
|
diffLayerPropertyChanges(beforeLayer[prop], afterLayer[prop], commands, layerId, prop.slice(6), operations.setPaintProperty);
|
|
@@ -19037,6 +19065,15 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
19037
19065
|
const beforeImport = beforeIndex[afterImport.id];
|
|
19038
19066
|
if (!beforeImport || deepEqual(beforeImport, afterImport))
|
|
19039
19067
|
continue;
|
|
19068
|
+
if (!deepEqual(beforeImport.config, afterImport.config)) {
|
|
19069
|
+
commands.push({
|
|
19070
|
+
command: operations.setImportConfig,
|
|
19071
|
+
args: [
|
|
19072
|
+
afterImport.id,
|
|
19073
|
+
afterImport.config
|
|
19074
|
+
]
|
|
19075
|
+
});
|
|
19076
|
+
}
|
|
19040
19077
|
if (!deepEqual(beforeImport.url, afterImport.url)) {
|
|
19041
19078
|
commands.push({
|
|
19042
19079
|
command: operations.setImportUrl,
|