maplibre-gl 3.0.0-pre.2 → 3.0.0-pre.3
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-style-code.ts +4 -0
- package/build/generate-style-spec.ts +3 -1
- package/dist/maplibre-gl-csp-worker.js +1 -1
- package/dist/maplibre-gl-csp.js +1 -1
- package/dist/maplibre-gl-dev.js +490 -128
- package/dist/maplibre-gl.d.ts +156 -29
- package/dist/maplibre-gl.js +4 -4
- package/dist/style-spec/index.d.ts +7 -3
- package/package.json +15 -17
- package/src/render/glyph_manager.ts +5 -0
- package/src/render/image_manager.ts +2 -2
- package/src/source/worker_tile.ts +1 -1
- package/src/style/load_sprite.test.ts +206 -0
- package/src/style/load_sprite.ts +59 -32
- package/src/style/style.test.ts +157 -0
- package/src/style/style.ts +189 -8
- package/src/style/validate_style.ts +2 -0
- package/src/style-spec/CHANGELOG.md +4 -0
- package/src/style-spec/README.md +0 -8
- package/src/style-spec/bin/{gl-style-format → gl-style-format.js} +7 -7
- package/src/style-spec/bin/gl-style-migrate.js +18 -0
- package/src/style-spec/bin/gl-style-validate.js +45 -0
- package/src/style-spec/feature_filter/feature_filter.test.ts +5 -0
- package/src/style-spec/package.json +4 -5
- package/src/style-spec/reference/v8.json +3 -3
- package/src/style-spec/style-spec.test.ts +2 -1
- package/src/style-spec/style-spec.ts +0 -2
- package/src/style-spec/types.g.ts +4 -2
- package/src/style-spec/validate/validate.ts +4 -1
- package/src/style-spec/validate/validate_array.ts +3 -3
- package/src/style-spec/validate/validate_function.ts +8 -3
- package/src/style-spec/validate/validate_layer.ts +5 -2
- package/src/style-spec/validate/validate_light.ts +4 -4
- package/src/style-spec/validate/validate_object.ts +3 -2
- package/src/style-spec/validate/validate_padding.test.ts +20 -19
- package/src/style-spec/validate/validate_padding.ts +2 -2
- package/src/style-spec/validate/validate_property.ts +3 -3
- package/src/style-spec/validate/validate_source.ts +9 -1
- package/src/style-spec/validate/validate_sprite.test.ts +75 -0
- package/src/style-spec/validate/validate_sprite.ts +55 -0
- package/src/style-spec/validate/validate_terrain.test.ts +6 -5
- package/src/style-spec/validate/validate_terrain.ts +3 -3
- package/src/style-spec/validate_style.min.ts +24 -10
- package/src/ui/handler/scroll_zoom.test.ts +24 -0
- package/src/ui/handler/scroll_zoom.ts +15 -5
- package/src/ui/handler_manager.ts +51 -36
- package/src/ui/map.ts +92 -0
- package/src/util/ajax.ts +1 -28
- package/src/util/dom.ts +2 -2
- package/src/util/style.test.ts +19 -0
- package/src/util/style.ts +12 -0
- package/src/util/util.ts +47 -2
- package/build/generate-debug-index-file.ts +0 -20
- package/src/style-spec/bin/gl-style-composite +0 -9
- package/src/style-spec/bin/gl-style-migrate +0 -9
- package/src/style-spec/bin/gl-style-validate +0 -42
- package/src/style-spec/composite.test.ts +0 -107
- package/src/style-spec/composite.ts +0 -51
|
@@ -29,6 +29,8 @@ function nativeType(property) {
|
|
|
29
29
|
return 'Color';
|
|
30
30
|
case 'padding':
|
|
31
31
|
return 'Padding';
|
|
32
|
+
case 'sprite':
|
|
33
|
+
return 'Sprite';
|
|
32
34
|
case 'formatted':
|
|
33
35
|
return 'Formatted';
|
|
34
36
|
case 'resolvedImage':
|
|
@@ -91,6 +93,8 @@ function runtimeType(property) {
|
|
|
91
93
|
return 'ColorType';
|
|
92
94
|
case 'padding':
|
|
93
95
|
return 'PaddingType';
|
|
96
|
+
case 'sprite':
|
|
97
|
+
return 'SpriteType';
|
|
94
98
|
case 'formatted':
|
|
95
99
|
return 'FormattedType';
|
|
96
100
|
case 'Image':
|
|
@@ -122,6 +122,8 @@ export type ColorSpecification = string;
|
|
|
122
122
|
|
|
123
123
|
export type PaddingSpecification = number | number[];
|
|
124
124
|
|
|
125
|
+
export type SpriteSpecification = string | {id: string; url: string}[];
|
|
126
|
+
|
|
125
127
|
export type FormattedSpecification = string;
|
|
126
128
|
|
|
127
129
|
export type ResolvedImageSpecification = string;
|
|
@@ -174,7 +176,7 @@ export type ExpressionSpecification =
|
|
|
174
176
|
| ['in', ExpressionInputType | ExpressionSpecification, ExpressionInputType | ExpressionSpecification]
|
|
175
177
|
| ['index-of', ExpressionInputType | ExpressionSpecification, ExpressionInputType | ExpressionSpecification] // number
|
|
176
178
|
| ['length', string | ExpressionSpecification]
|
|
177
|
-
| ['slice', string | ExpressionSpecification, number | ExpressionSpecification]
|
|
179
|
+
| ['slice', string | ExpressionSpecification, number | ExpressionSpecification, (number | ExpressionSpecification)?]
|
|
178
180
|
// Decision
|
|
179
181
|
| ['!', boolean | ExpressionSpecification] // boolean
|
|
180
182
|
| ['!=', ExpressionInputType | ExpressionSpecification, ExpressionInputType | ExpressionSpecification, CollatorExpressionSpecification?] // boolean
|