maplibre-gl 2.2.0 → 2.3.1-pre.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/build/generate-struct-arrays.ts +0 -2
- package/build/generate-style-spec.ts +2 -3
- package/build/generate-typings.ts +12 -2
- package/build/rollup_plugins.ts +0 -4
- package/dist/maplibre-gl-csp-worker.js +1 -1
- package/dist/maplibre-gl-csp.js +1 -1
- package/dist/maplibre-gl-dev.js +368 -1404
- package/dist/maplibre-gl.d.ts +19 -11
- package/dist/maplibre-gl.js +4 -4
- package/dist/style-spec/index.d.ts +1779 -0
- package/package.json +10 -12
- package/src/data/array_types.g.ts +0 -5
- package/src/data/bucket/fill_bucket.ts +0 -2
- package/src/data/bucket/fill_extrusion_bucket.ts +0 -2
- package/src/data/bucket/symbol_bucket.test.ts +30 -19
- package/src/data/feature_position_map.ts +1 -2
- package/src/gl/framebuffer.ts +3 -2
- package/src/gl/index_buffer.ts +1 -2
- package/src/gl/vertex_buffer.ts +1 -2
- package/src/index.test.ts +9 -0
- package/src/index.ts +12 -4
- package/src/render/image_manager.ts +5 -7
- package/src/render/program/pattern.ts +0 -2
- package/src/render/program.ts +0 -4
- package/src/render/vertex_array_object.ts +1 -3
- package/src/source/geojson_worker_source.ts +0 -4
- package/src/source/query_features.ts +0 -3
- package/src/source/rtl_text_plugin.ts +3 -4
- package/src/source/source_cache.ts +0 -2
- package/src/source/tile_id.ts +8 -8
- package/src/source/worker.ts +2 -11
- package/src/source/worker_tile.ts +12 -3
- package/src/style/format_section_override.ts +1 -2
- package/src/style/properties.ts +1 -3
- package/src/style/style.ts +5 -5
- package/src/style/style_layer/custom_style_layer.ts +1 -2
- package/src/style/style_layer/symbol_style_layer.ts +1 -3
- package/src/style-spec/CHANGELOG.md +10 -0
- package/src/style-spec/composite.test.ts +7 -8
- package/src/style-spec/expression/compound_expression.ts +0 -4
- package/src/style-spec/expression/definitions/assertion.ts +2 -4
- package/src/style-spec/expression/definitions/case.ts +1 -2
- package/src/style-spec/expression/definitions/coalesce.ts +1 -3
- package/src/style-spec/expression/definitions/coercion.ts +2 -4
- package/src/style-spec/expression/definitions/match.ts +0 -3
- package/src/style-spec/expression/index.ts +13 -15
- package/src/style-spec/expression/parsing_context.ts +4 -4
- package/src/style-spec/expression/parsing_error.ts +2 -2
- package/src/style-spec/expression/values.ts +0 -2
- package/src/style-spec/feature_filter/feature_filter.test.ts +7 -0
- package/src/style-spec/function/convert.ts +1 -3
- package/src/style-spec/migrate/v8.test.ts +12 -14
- package/src/style-spec/migrate/v9.test.ts +2 -4
- package/src/style-spec/migrate.test.ts +6 -8
- package/src/style-spec/package.json +2 -1
- package/src/style-spec/reference/latest.ts +1 -1
- package/src/style-spec/style-spec.ts +11 -10
- package/src/style-spec/types.g.ts +2 -3
- package/src/symbol/collision_index.ts +0 -3
- package/src/symbol/path_interpolator.ts +0 -2
- package/src/symbol/placement.ts +14 -9
- package/src/symbol/shaping.ts +0 -4
- package/src/symbol/symbol_layout.ts +56 -56
- package/src/ui/camera.ts +0 -10
- package/src/ui/control/geolocate_control.ts +4 -6
- package/src/ui/handler/handler_util.ts +1 -2
- package/src/ui/handler/scroll_zoom.ts +0 -2
- package/src/ui/handler_manager.ts +0 -2
- package/src/ui/map.test.ts +11 -0
- package/src/ui/map.ts +11 -0
- package/src/util/ajax.ts +1 -2
- package/src/util/color_ramp.ts +1 -2
- package/src/util/dictionary_coder.ts +1 -3
- package/src/util/dispatcher.ts +1 -4
- package/src/util/dom.ts +0 -3
- package/src/util/image.ts +1 -3
- package/src/util/struct_array.ts +0 -5
- package/src/util/task_queue.ts +1 -3
- package/src/util/util.ts +2 -3
- package/src/util/web_worker_transfer.ts +5 -6
|
@@ -409,7 +409,6 @@ export class ${structArrayClass} extends ${structArrayLayoutClass} {`);
|
|
|
409
409
|
* @private
|
|
410
410
|
*/
|
|
411
411
|
get(index: number): ${structTypeClass} {
|
|
412
|
-
assert(!this.isTransferred);
|
|
413
412
|
return new ${structTypeClass}(this, index);
|
|
414
413
|
}`);
|
|
415
414
|
}
|
|
@@ -425,7 +424,6 @@ register('${structArrayClass}', ${structArrayClass});
|
|
|
425
424
|
fs.writeFileSync('src/data/array_types.g.ts',
|
|
426
425
|
`// This file is generated. Edit build/generate-struct-arrays.ts, then run \`npm run codegen\`.
|
|
427
426
|
|
|
428
|
-
import assert from 'assert';
|
|
429
427
|
import {Struct, StructArray} from '../util/struct_array';
|
|
430
428
|
import {register} from '../util/web_worker_transfer';
|
|
431
429
|
import Point from '@mapbox/point-geometry';
|
|
@@ -141,7 +141,7 @@ export type InterpolationSpecification =
|
|
|
141
141
|
| ['linear']
|
|
142
142
|
| ['exponential', number | ExpressionSpecification]
|
|
143
143
|
| ['cubic-bezier', number | ExpressionSpecification, number | ExpressionSpecification, number | ExpressionSpecification, number | ExpressionSpecification]
|
|
144
|
-
|
|
144
|
+
|
|
145
145
|
export type ExpressionSpecification =
|
|
146
146
|
// types
|
|
147
147
|
| ['array', unknown | ExpressionSpecification] // array
|
|
@@ -196,8 +196,7 @@ export type ExpressionSpecification =
|
|
|
196
196
|
| ['within', unknown | ExpressionSpecification]
|
|
197
197
|
// Ramps, scales, curves
|
|
198
198
|
| ['interpolate', InterpolationSpecification,
|
|
199
|
-
number | ExpressionSpecification, number |
|
|
200
|
-
...(number | ExpressionInputType | ExpressionSpecification)[]]
|
|
199
|
+
number | ExpressionSpecification, ...(number | ExpressionInputType | ExpressionSpecification)[]]
|
|
201
200
|
| ['interpolate-hcl', InterpolationSpecification,
|
|
202
201
|
number | ExpressionSpecification, number | ExpressionSpecification, ExpressionInputType | ExpressionSpecification,
|
|
203
202
|
...(number | ColorSpecification | ExpressionSpecification)[]]
|
|
@@ -7,10 +7,20 @@ if (!fs.existsSync('dist')) {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
console.log('Starting bundling types');
|
|
10
|
-
|
|
11
|
-
childProcess.execSync(`dts-bundle-generator --
|
|
10
|
+
let outputFile = './dist/maplibre-gl.d.ts';
|
|
11
|
+
childProcess.execSync(`dts-bundle-generator --umd-module-name=maplibregl -o ${outputFile} ./src/index.ts`);
|
|
12
12
|
let types = fs.readFileSync(outputFile, 'utf8');
|
|
13
13
|
// Classes are not exported but should be since this is exported as UMD - fixing...
|
|
14
14
|
types = types.replace(/declare class/g, 'export declare class');
|
|
15
15
|
fs.writeFileSync(outputFile, types);
|
|
16
|
+
|
|
17
|
+
console.log('Finifhed bundling types for maplibre-gl starting style-spec');
|
|
18
|
+
|
|
19
|
+
const outputPath = './dist/style-spec';
|
|
20
|
+
if (!fs.existsSync(outputPath)) {
|
|
21
|
+
fs.mkdirSync(outputPath);
|
|
22
|
+
}
|
|
23
|
+
outputFile = `${outputPath}/index.d.ts`;
|
|
24
|
+
childProcess.execSync(`dts-bundle-generator -o ${outputFile} ./src/style-spec/style-spec.ts`);
|
|
25
|
+
|
|
16
26
|
console.log('Finished bundling types');
|
package/build/rollup_plugins.ts
CHANGED
|
@@ -3,7 +3,6 @@ import typescript from '@rollup/plugin-typescript';
|
|
|
3
3
|
import resolve from '@rollup/plugin-node-resolve';
|
|
4
4
|
import replace from '@rollup/plugin-replace';
|
|
5
5
|
import commonjs from '@rollup/plugin-commonjs';
|
|
6
|
-
import unassert from 'unassert-rollup-plugin';
|
|
7
6
|
import json from '@rollup/plugin-json';
|
|
8
7
|
import {terser} from 'rollup-plugin-terser';
|
|
9
8
|
import minifyStyleSpec from './rollup_plugin_minify_style_spec';
|
|
@@ -43,9 +42,6 @@ export const plugins = (production: boolean): Plugin[] => [
|
|
|
43
42
|
passes: 3
|
|
44
43
|
}
|
|
45
44
|
}),
|
|
46
|
-
production && unassert({
|
|
47
|
-
include: ['**/*'], // by default, unassert only includes .js files
|
|
48
|
-
}),
|
|
49
45
|
nodeResolve,
|
|
50
46
|
typescript(),
|
|
51
47
|
commonjs({
|