@mapbox/mapbox-gl-style-spec 14.2.0 → 14.3.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 +4 -27
- package/dist/index.cjs +354 -136
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +354 -136
- package/dist/index.es.js.map +1 -1
- package/expression/definitions/config.js +142 -0
- package/expression/definitions/index.js +9 -77
- package/expression/index.js +1 -0
- package/expression/is_constant.js +4 -4
- package/expression/parsing_context.js +5 -4
- package/flow-typed/webgl2.js +2 -0
- package/package.json +1 -1
- package/reference/v8.json +199 -8
- package/style-spec.js +1 -1
- package/types.js +28 -2
- package/validate/validate_layer.js +4 -0
- package/validate/validate_source.js +2 -1
- package/validate_mapbox_api_supported.js +2 -2
package/diff.js
CHANGED
|
@@ -148,20 +148,10 @@ export const operations: {[_: string]: string} = {
|
|
|
148
148
|
*/
|
|
149
149
|
removeImport: 'removeImport',
|
|
150
150
|
|
|
151
|
-
|
|
152
|
-
*
|
|
153
|
-
*/
|
|
154
|
-
setImportUrl: 'setImportUrl',
|
|
155
|
-
|
|
156
|
-
/*
|
|
157
|
-
* { command: 'setImportData', args: [importId, stylesheet] }
|
|
158
|
-
*/
|
|
159
|
-
setImportData: 'setImportData',
|
|
160
|
-
|
|
161
|
-
/*
|
|
162
|
-
* { command: 'setImportConfig', args: [importId, config] }
|
|
151
|
+
/**
|
|
152
|
+
* { command: 'updateImport', args: [importId, importSpecification | styleUrl] }
|
|
163
153
|
*/
|
|
164
|
-
|
|
154
|
+
updateImport: 'updateImport'
|
|
165
155
|
};
|
|
166
156
|
|
|
167
157
|
function addSource(sourceId: string, after: Sources, commands: Array<Command>) {
|
|
@@ -424,20 +414,7 @@ export function diffImports(before: Array<ImportSpecification> = [], after: Arra
|
|
|
424
414
|
const beforeImport = beforeIndex[afterImport.id];
|
|
425
415
|
if (!beforeImport || isEqual(beforeImport, afterImport)) continue;
|
|
426
416
|
|
|
427
|
-
|
|
428
|
-
commands.push({command: operations.setImportConfig, args: [afterImport.id, afterImport.config]});
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
if (!isEqual(beforeImport.url, afterImport.url)) {
|
|
432
|
-
commands.push({command: operations.setImportUrl, args: [afterImport.id, afterImport.url]});
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
const beforeData = beforeImport && beforeImport.data;
|
|
436
|
-
const afterData = afterImport.data;
|
|
437
|
-
|
|
438
|
-
if (!isEqual(beforeData, afterData)) {
|
|
439
|
-
commands.push({command: operations.setImportData, args: [afterImport.id, afterData]});
|
|
440
|
-
}
|
|
417
|
+
commands.push({command: operations.updateImport, args: [afterImport.id, afterImport]});
|
|
441
418
|
}
|
|
442
419
|
}
|
|
443
420
|
|