maplibre-gl 2.2.0-pre.2 → 2.2.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/README.md +73 -8
- package/build/generate-debug-index-file.ts +19 -0
- package/build/generate-style-code.ts +6 -1
- package/build/generate-style-spec.ts +151 -35
- package/build/rollup_plugins.ts +4 -1
- package/dist/maplibre-gl-csp-worker.js +1 -1
- package/dist/maplibre-gl-csp-worker.js.map +1 -1
- package/dist/maplibre-gl-csp.js +1 -1
- package/dist/maplibre-gl-csp.js.map +1 -1
- package/dist/maplibre-gl-dev.js +1317 -4304
- package/dist/maplibre-gl.css +1 -1
- package/dist/maplibre-gl.d.ts +443 -145
- package/dist/maplibre-gl.js +4 -4
- package/dist/maplibre-gl.js.map +1 -1
- package/package.json +70 -67
- package/src/css/maplibre-gl.css +48 -32
- package/src/data/bucket/fill_bucket.test.ts +1 -0
- package/src/data/bucket/symbol_bucket.test.ts +2 -0
- package/src/data/bucket/symbol_bucket.ts +1 -1
- package/src/data/evaluation_feature.ts +1 -1
- package/src/data/program_configuration.ts +2 -2
- package/src/geo/transform.test.ts +34 -1
- package/src/geo/transform.ts +25 -15
- package/src/gl/vertex_buffer.ts +4 -4
- package/src/index.ts +1 -1
- package/src/render/draw_debug.ts +1 -1
- package/src/render/draw_symbol.test.ts +2 -23
- package/src/render/draw_terrain.ts +1 -1
- package/src/render/image_atlas.ts +1 -0
- package/src/render/image_manager.ts +1 -0
- package/src/render/program/debug_program.ts +1 -1
- package/src/render/render_to_texture.ts +3 -0
- package/src/render/terrain.test.ts +119 -17
- package/src/render/terrain.ts +39 -21
- package/src/shaders/README.md +2 -2
- package/src/shaders/shaders.ts +3 -1
- package/src/source/geojson_worker_source.test.ts +2 -2
- package/src/source/geojson_wrapper.test.ts +1 -1
- package/src/source/image_source.test.ts +8 -8
- package/src/source/image_source.ts +1 -1
- package/src/source/load_tilejson.ts +6 -1
- package/src/source/pixels_to_tile_units.ts +1 -1
- package/src/source/raster_tile_source.test.ts +1 -1
- package/src/source/source_cache.test.ts +12 -12
- package/src/source/source_cache.ts +1 -1
- package/src/source/terrain_source_cache.test.ts +17 -2
- package/src/source/terrain_source_cache.ts +16 -12
- package/src/source/vector_tile_source.test.ts +1 -1
- package/src/source/vector_tile_worker_source.test.ts +1 -1
- package/src/source/video_source.test.ts +2 -2
- package/src/style/light.test.ts +1 -1
- package/src/style/load_sprite.ts +1 -1
- package/src/style/parse_glyph_pbf.ts +1 -1
- package/src/style/style.test.ts +3 -3
- package/src/style/style.ts +2 -2
- package/src/style/style_layer/background_style_layer_properties.g.ts +1 -0
- package/src/style/style_layer/circle_style_layer_properties.g.ts +1 -0
- package/src/style/style_layer/fill_extrusion_style_layer_properties.g.ts +1 -0
- package/src/style/style_layer/fill_style_layer_properties.g.ts +1 -0
- package/src/style/style_layer/heatmap_style_layer_properties.g.ts +1 -0
- package/src/style/style_layer/hillshade_style_layer_properties.g.ts +1 -0
- package/src/style/style_layer/line_style_layer_properties.g.ts +1 -0
- package/src/style/style_layer/raster_style_layer_properties.g.ts +1 -0
- package/src/style/style_layer/symbol_style_layer.ts +16 -1
- package/src/style/style_layer/symbol_style_layer_properties.g.ts +4 -3
- package/src/style-spec/CHANGELOG.md +5 -0
- package/src/style-spec/composite.test.ts +2 -0
- package/src/style-spec/composite.ts +3 -2
- package/src/style-spec/diff.test.ts +3 -3
- package/src/style-spec/empty.ts +3 -2
- package/src/style-spec/expression/compound_expression.ts +0 -4
- package/src/style-spec/expression/definitions/assertion.ts +0 -18
- package/src/style-spec/expression/definitions/at.ts +0 -4
- package/src/style-spec/expression/definitions/case.ts +0 -6
- package/src/style-spec/expression/definitions/coalesce.ts +0 -6
- package/src/style-spec/expression/definitions/coercion.ts +13 -18
- package/src/style-spec/expression/definitions/collator.ts +0 -10
- package/src/style-spec/expression/definitions/comparison.ts +0 -6
- package/src/style-spec/expression/definitions/format.ts +0 -19
- package/src/style-spec/expression/definitions/image.ts +0 -4
- package/src/style-spec/expression/definitions/in.ts +0 -4
- package/src/style-spec/expression/definitions/index_of.ts +0 -8
- package/src/style-spec/expression/definitions/interpolate.ts +1 -25
- package/src/style-spec/expression/definitions/length.ts +0 -6
- package/src/style-spec/expression/definitions/let.ts +0 -9
- package/src/style-spec/expression/definitions/literal.ts +1 -23
- package/src/style-spec/expression/definitions/match.ts +0 -41
- package/src/style-spec/expression/definitions/number_format.ts +0 -17
- package/src/style-spec/expression/definitions/slice.ts +0 -8
- package/src/style-spec/expression/definitions/step.ts +0 -11
- package/src/style-spec/expression/definitions/var.ts +0 -4
- package/src/style-spec/expression/definitions/within.ts +0 -5
- package/src/style-spec/expression/expression.test.ts +1 -1
- package/src/style-spec/expression/expression.ts +3 -3
- package/src/style-spec/expression/index.ts +8 -2
- package/src/style-spec/expression/parsing_context.ts +2 -0
- package/src/style-spec/expression/types/formatted.ts +0 -23
- package/src/style-spec/expression/types/resolved_image.ts +0 -4
- package/src/style-spec/expression/types.ts +6 -1
- package/src/style-spec/expression/values.ts +9 -4
- package/src/style-spec/feature_filter/convert.ts +65 -65
- package/src/style-spec/feature_filter/feature_filter.test.ts +45 -4
- package/src/style-spec/feature_filter/index.ts +2 -1
- package/src/style-spec/function/index.test.ts +117 -1
- package/src/style-spec/function/index.ts +24 -12
- package/src/style-spec/migrate/expressions.ts +2 -2
- package/src/style-spec/migrate/v8.test.ts +2 -0
- package/src/style-spec/migrate/v8.ts +8 -7
- package/src/style-spec/migrate/v9.test.ts +6 -4
- package/src/style-spec/migrate/v9.ts +3 -2
- package/src/style-spec/migrate.test.ts +3 -1
- package/src/style-spec/migrate.ts +5 -4
- package/src/style-spec/package.json +1 -1
- package/src/style-spec/read_style.ts +2 -1
- package/src/style-spec/reference/latest.ts +1 -1
- package/src/style-spec/reference/v8.json +9 -6
- package/src/style-spec/style-spec.test.ts +2 -1
- package/src/style-spec/style-spec.ts +8 -0
- package/src/style-spec/types.g.ts +152 -36
- package/src/style-spec/util/extend.ts +1 -1
- package/src/style-spec/util/interpolate.test.ts +5 -0
- package/src/style-spec/util/interpolate.ts +12 -0
- package/src/style-spec/util/padding.test.ts +27 -0
- package/src/style-spec/util/padding.ts +64 -0
- package/src/style-spec/util/ref_properties.ts +2 -1
- package/src/style-spec/validate/validate.ts +3 -1
- package/src/style-spec/validate/validate_expression.ts +2 -1
- package/src/style-spec/validate/validate_function.ts +2 -2
- package/src/style-spec/validate/validate_glyphs_url.ts +1 -1
- package/src/style-spec/validate/validate_object.ts +2 -2
- package/src/style-spec/validate/validate_padding.test.ts +82 -0
- package/src/style-spec/validate/validate_padding.ts +36 -0
- package/src/style-spec/validate_style.min.ts +4 -3
- package/src/style-spec/validate_style.ts +4 -3
- package/src/symbol/check_max_angle.test.ts +5 -5
- package/src/symbol/collision_feature.test.ts +22 -5
- package/src/symbol/collision_feature.ts +7 -5
- package/src/symbol/collision_index.ts +1 -1
- package/src/symbol/get_anchors.test.ts +4 -4
- package/src/symbol/{mergelines.test.ts → merge_lines.test.ts} +1 -1
- package/src/symbol/{mergelines.ts → merge_lines.ts} +1 -1
- package/src/symbol/projection.ts +1 -1
- package/src/symbol/quads.test.ts +1 -1
- package/src/symbol/shaping.ts +10 -10
- package/src/symbol/symbol_layout.ts +5 -4
- package/src/symbol/symbol_style_layer.test.ts +1 -1
- package/src/symbol/transform_text.ts +3 -3
- package/src/ui/camera.test.ts +11 -11
- package/src/ui/control/geolocate_control.ts +1 -1
- package/src/ui/control/terrain_control.ts +4 -4
- package/src/ui/handler/cooperative_gestures.test.ts +167 -0
- package/src/ui/handler/drag_pan.test.ts +2 -1
- package/src/ui/handler/scroll_zoom.ts +7 -0
- package/src/ui/handler/touch_pan.ts +22 -2
- package/src/ui/handler/touch_zoom_rotate.ts +18 -1
- package/src/ui/handler_manager.ts +2 -2
- package/src/ui/map.test.ts +17 -17
- package/src/ui/map.ts +76 -8
- package/src/ui/map_events.test.ts +33 -32
- package/src/ui/popup.test.ts +2 -2
- package/src/util/ajax.test.ts +5 -5
- package/src/util/ajax.ts +1 -1
- package/src/util/classify_rings.test.ts +27 -27
- package/src/util/find_pole_of_inaccessibility.ts +1 -1
- package/src/util/primitives.ts +4 -4
- package/src/util/resolve_tokens.test.ts +1 -1
- package/src/util/smart_wrap.ts +1 -1
- package/src/util/tile_request_cache.test.ts +5 -5
- package/src/util/util.test.ts +5 -5
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "maplibre-gl",
|
|
3
3
|
"description": "BSD licensed community fork of mapbox-gl, a WebGL interactive maps library",
|
|
4
|
-
"version": "2.2.0
|
|
4
|
+
"version": "2.2.0",
|
|
5
5
|
"main": "dist/maplibre-gl.js",
|
|
6
6
|
"style": "dist/maplibre-gl.css",
|
|
7
7
|
"license": "BSD-3-Clause",
|
|
@@ -12,125 +12,126 @@
|
|
|
12
12
|
"types": "dist/maplibre-gl.d.ts",
|
|
13
13
|
"type": "module",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@mapbox/geojson-rewind": "^0.5.
|
|
15
|
+
"@mapbox/geojson-rewind": "^0.5.2",
|
|
16
16
|
"@mapbox/jsonlint-lines-primitives": "^2.0.2",
|
|
17
17
|
"@mapbox/mapbox-gl-supported": "^2.0.1",
|
|
18
18
|
"@mapbox/point-geometry": "^0.1.0",
|
|
19
|
-
"@mapbox/tiny-sdf": "^2.0.
|
|
19
|
+
"@mapbox/tiny-sdf": "^2.0.5",
|
|
20
20
|
"@mapbox/unitbezier": "^0.0.1",
|
|
21
21
|
"@mapbox/vector-tile": "^1.3.1",
|
|
22
22
|
"@mapbox/whoots-js": "^3.1.0",
|
|
23
|
-
"@types/geojson": "^7946.0.
|
|
23
|
+
"@types/geojson": "^7946.0.10",
|
|
24
24
|
"@types/mapbox__point-geometry": "^0.1.2",
|
|
25
25
|
"@types/mapbox__vector-tile": "^1.3.0",
|
|
26
26
|
"@types/pbf": "^3.0.2",
|
|
27
27
|
"csscolorparser": "~1.0.3",
|
|
28
|
-
"earcut": "^2.2.
|
|
28
|
+
"earcut": "^2.2.4",
|
|
29
29
|
"geojson-vt": "^3.2.1",
|
|
30
30
|
"gl-matrix": "^3.4.3",
|
|
31
31
|
"murmurhash-js": "^1.0.0",
|
|
32
32
|
"pbf": "^3.2.1",
|
|
33
33
|
"potpack": "^1.0.2",
|
|
34
34
|
"quickselect": "^2.0.0",
|
|
35
|
-
"supercluster": "^7.1.
|
|
35
|
+
"supercluster": "^7.1.5",
|
|
36
36
|
"tinyqueue": "^2.0.3",
|
|
37
37
|
"vt-pbf": "^3.1.3"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@mapbox/gazetteer": "^5.1.0",
|
|
41
41
|
"@mapbox/mapbox-gl-rtl-text": "^0.2.3",
|
|
42
|
-
"@mapbox/mvt-fixtures": "^3.
|
|
43
|
-
"@rollup/plugin-commonjs": "^
|
|
42
|
+
"@mapbox/mvt-fixtures": "^3.9.0",
|
|
43
|
+
"@rollup/plugin-commonjs": "^22.0.2",
|
|
44
44
|
"@rollup/plugin-json": "^4.1.0",
|
|
45
|
-
"@rollup/plugin-node-resolve": "^13.
|
|
45
|
+
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
46
46
|
"@rollup/plugin-replace": "^4.0.0",
|
|
47
47
|
"@rollup/plugin-strip": "^2.1.0",
|
|
48
|
-
"@rollup/plugin-typescript": "^8.3.
|
|
49
|
-
"@swc/cli": "^0.1.55",
|
|
50
|
-
"@swc/core": "^1.2.135",
|
|
51
|
-
"@swc/jest": "^0.2.17",
|
|
48
|
+
"@rollup/plugin-typescript": "^8.3.4",
|
|
52
49
|
"@types/benchmark": "^2.1.1",
|
|
53
50
|
"@types/browserify": "^12.0.37",
|
|
54
51
|
"@types/cssnano": "^5.0.0",
|
|
55
|
-
"@types/d3": "^7.
|
|
52
|
+
"@types/d3": "^7.4.0",
|
|
56
53
|
"@types/diff": "^5.0.2",
|
|
57
54
|
"@types/earcut": "^2.1.1",
|
|
58
|
-
"@types/eslint": "^8.4.
|
|
59
|
-
"@types/gl": "^4.1.
|
|
55
|
+
"@types/eslint": "^8.4.5",
|
|
56
|
+
"@types/gl": "^4.1.1",
|
|
60
57
|
"@types/glob": "^7.2.0",
|
|
61
|
-
"@types/jest": "^
|
|
62
|
-
"@types/jsdom": "^
|
|
58
|
+
"@types/jest": "^28.1.6",
|
|
59
|
+
"@types/jsdom": "^20.0.0",
|
|
63
60
|
"@types/minimist": "^1.2.2",
|
|
64
61
|
"@types/murmurhash-js": "^1.0.3",
|
|
65
62
|
"@types/nise": "^1.4.0",
|
|
66
|
-
"@types/offscreencanvas": "^2019.
|
|
63
|
+
"@types/offscreencanvas": "^2019.7.0",
|
|
67
64
|
"@types/pixelmatch": "^5.2.4",
|
|
68
65
|
"@types/pngjs": "^6.0.1",
|
|
69
|
-
"@types/react": "^18.0.
|
|
70
|
-
"@types/react-dom": "^
|
|
66
|
+
"@types/react": "^18.0.15",
|
|
67
|
+
"@types/react-dom": "^18.0.6",
|
|
71
68
|
"@types/request": "^2.48.8",
|
|
72
69
|
"@types/rollup-plugin-json": "^3.0.3",
|
|
73
70
|
"@types/shuffle-seed": "^1.1.0",
|
|
74
71
|
"@types/supercluster": "^7.1.0",
|
|
75
72
|
"@types/window-or-global": "^1.0.4",
|
|
76
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
77
|
-
"@typescript-eslint/parser": "^5.
|
|
78
|
-
"
|
|
73
|
+
"@typescript-eslint/eslint-plugin": "^5.32.0",
|
|
74
|
+
"@typescript-eslint/parser": "^5.32.0",
|
|
75
|
+
"acorn-import-assertions": "^1.8.0",
|
|
76
|
+
"address": "^1.2.0",
|
|
79
77
|
"benchmark": "^2.1.4",
|
|
80
78
|
"browserify": "^17.0.0",
|
|
81
|
-
"canvas": "^2.9.
|
|
82
|
-
"cssnano": "^5.
|
|
83
|
-
"d3": "^7.
|
|
79
|
+
"canvas": "^2.9.3",
|
|
80
|
+
"cssnano": "^5.1.12",
|
|
81
|
+
"d3": "^7.6.1",
|
|
84
82
|
"d3-queue": "^3.0.7",
|
|
85
|
-
"diff": "^5.
|
|
86
|
-
"documentation": "
|
|
87
|
-
"dts-bundle-generator": "^6.
|
|
88
|
-
"eslint": "^8.
|
|
83
|
+
"diff": "^5.1.0",
|
|
84
|
+
"documentation": "14.0.0-alpha.1",
|
|
85
|
+
"dts-bundle-generator": "^6.12.0",
|
|
86
|
+
"eslint": "^8.21.0",
|
|
89
87
|
"eslint-config-mourner": "^3.0.0",
|
|
90
|
-
"eslint-plugin-html": "^
|
|
91
|
-
"eslint-plugin-import": "^2.
|
|
92
|
-
"eslint-plugin-jest": "^26.
|
|
93
|
-
"eslint-plugin-jsdoc": "^39.
|
|
94
|
-
"eslint-plugin-react": "^7.
|
|
95
|
-
"gl": "^5.0.
|
|
96
|
-
"glob": "^
|
|
97
|
-
"is-builtin-module": "^3.
|
|
98
|
-
"jest": "^
|
|
99
|
-
"jest-canvas-mock": "^2.
|
|
100
|
-
"jest-
|
|
101
|
-
"
|
|
102
|
-
"
|
|
88
|
+
"eslint-plugin-html": "^7.1.0",
|
|
89
|
+
"eslint-plugin-import": "^2.26.0",
|
|
90
|
+
"eslint-plugin-jest": "^26.7.0",
|
|
91
|
+
"eslint-plugin-jsdoc": "^39.3.4",
|
|
92
|
+
"eslint-plugin-react": "^7.30.1",
|
|
93
|
+
"gl": "^5.0.3",
|
|
94
|
+
"glob": "^8.0.3",
|
|
95
|
+
"is-builtin-module": "^3.2.0",
|
|
96
|
+
"jest": "^28.1.3",
|
|
97
|
+
"jest-canvas-mock": "^2.4.0",
|
|
98
|
+
"jest-environment-jsdom": "^28.1.3",
|
|
99
|
+
"jest-playwright-preset": "^2.0.0",
|
|
100
|
+
"jsdom": "^20.0.0",
|
|
101
|
+
"json-stringify-pretty-compact": "^4.0.0",
|
|
103
102
|
"mapbox-gl-styles": "^2.0.2",
|
|
104
|
-
"minimist": "^1.2.
|
|
103
|
+
"minimist": "^1.2.6",
|
|
105
104
|
"mock-geolocation": "^1.0.11",
|
|
106
105
|
"nise": "^5.1.1",
|
|
107
106
|
"node-plantuml": "^0.9.0",
|
|
108
107
|
"npm-font-open-sans": "^1.1.0",
|
|
109
108
|
"npm-run-all": "^4.1.5",
|
|
110
|
-
"pdf-merger-js": "^3.
|
|
111
|
-
"pixelmatch": "^5.
|
|
112
|
-
"playwright": "^1.
|
|
109
|
+
"pdf-merger-js": "^3.4.0",
|
|
110
|
+
"pixelmatch": "^5.3.0",
|
|
111
|
+
"playwright": "^1.24.2",
|
|
113
112
|
"pngjs": "^6.0.0",
|
|
114
|
-
"postcss": "^8.4.
|
|
115
|
-
"postcss-cli": "^
|
|
113
|
+
"postcss": "^8.4.14",
|
|
114
|
+
"postcss-cli": "^10.0.0",
|
|
116
115
|
"postcss-inline-svg": "^5.0.0",
|
|
117
116
|
"pretty-bytes": "^6.0.0",
|
|
118
|
-
"react": "^18.
|
|
119
|
-
"react-dom": "^18.
|
|
117
|
+
"react": "^18.2.0",
|
|
118
|
+
"react-dom": "^18.2.0",
|
|
120
119
|
"request": "^2.88.0",
|
|
121
|
-
"rollup": "^2.
|
|
120
|
+
"rollup": "^2.77.2",
|
|
121
|
+
"rollup-plugin-import-assert": "^2.1.0",
|
|
122
122
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
123
123
|
"rollup-plugin-terser": "^7.0.2",
|
|
124
|
-
"rollup-plugin-unassert": "^0.3.0",
|
|
125
124
|
"rw": "^1.3.3",
|
|
126
|
-
"semver": "^7.3.
|
|
125
|
+
"semver": "^7.3.7",
|
|
127
126
|
"shuffle-seed": "^1.1.6",
|
|
128
127
|
"source-map-explorer": "^2.5.2",
|
|
129
128
|
"st": "^3.0.0",
|
|
130
|
-
"stylelint": "^14.
|
|
131
|
-
"stylelint-config-standard": "^
|
|
132
|
-
"ts-
|
|
133
|
-
"
|
|
129
|
+
"stylelint": "^14.9.1",
|
|
130
|
+
"stylelint-config-standard": "^26.0.0",
|
|
131
|
+
"ts-jest": "^28.0.7",
|
|
132
|
+
"ts-node": "^10.9.1",
|
|
133
|
+
"typescript": "^4.7.4",
|
|
134
|
+
"unassert-rollup-plugin": "^2.0.0"
|
|
134
135
|
},
|
|
135
136
|
"scripts": {
|
|
136
137
|
"generate-shaders": "node --loader ts-node/esm --experimental-specifier-resolution=node build/generate-shaders.ts",
|
|
@@ -139,6 +140,7 @@
|
|
|
139
140
|
"generate-style-spec": "node --loader ts-node/esm --experimental-specifier-resolution=node build/generate-style-spec.ts",
|
|
140
141
|
"generate-typings": "node --loader ts-node/esm --experimental-specifier-resolution=node build/generate-typings.ts",
|
|
141
142
|
"generate-query-test-fixtures": "node --loader ts-node/esm --experimental-specifier-resolution=node build/generate-query-test-fixtures.ts",
|
|
143
|
+
"generate-debug-index-file": "node --loader ts-node/esm --experimental-specifier-resolution=node build/generate-debug-index-file.ts",
|
|
142
144
|
"build-dev": "rollup --configPlugin @rollup/plugin-typescript -c --environment BUILD:dev",
|
|
143
145
|
"watch-dev": "rollup --configPlugin @rollup/plugin-typescript -c --environment BUILD:dev --watch",
|
|
144
146
|
"build-prod": "rollup --configPlugin @rollup/plugin-typescript -c --environment BUILD:production",
|
|
@@ -154,22 +156,23 @@
|
|
|
154
156
|
"start": "run-p watch-css start-server",
|
|
155
157
|
"start-debug": "run-p watch-css watch-dev start-server",
|
|
156
158
|
"start-bench": "run-p watch-css watch-benchmarks start-server-at-test",
|
|
157
|
-
"lint": "eslint --cache --ext \".ts,.js,.html\" --ignore-path .gitignore src test build
|
|
159
|
+
"lint": "eslint --cache --ext \".ts,.tsx,.js,.html\" --ignore-path .gitignore src test build",
|
|
158
160
|
"lint-docs": "documentation lint src/index.ts",
|
|
159
161
|
"lint-css": "stylelint \"src/css/maplibre-gl.css\"",
|
|
160
162
|
"test": "run-s lint lint-css lint-docs test-unit",
|
|
161
|
-
"test-build": "jest --roots ./test/build",
|
|
163
|
+
"test-build": "jest -c ./jest.config.builds.ts --roots ./test/build",
|
|
162
164
|
"test-symbol-shaping": "jest --roots ./test/integration/symbol-shaping",
|
|
163
165
|
"test-style-spec": "jest --roots ./test/integration/style-spec",
|
|
164
|
-
"test-browser": "jest -c ./jest.config.e2e.
|
|
165
|
-
"test-render": "node --loader ts-node/esm --experimental-specifier-resolution=node --
|
|
166
|
-
"test-query": "jest -c ./jest.config.e2e.
|
|
166
|
+
"test-browser": "jest -c ./jest.config.e2e.ts --roots ./test/integration/browser",
|
|
167
|
+
"test-render": "node --loader ts-node/esm --experimental-specifier-resolution=node --max-old-space-size=2048 test/integration/render/render.test.ts",
|
|
168
|
+
"test-query": "jest -c ./jest.config.e2e.ts --roots ./test/integration/query",
|
|
167
169
|
"test-expression": "jest --roots ./test/integration/expression",
|
|
168
|
-
"test-unit": "jest --roots ./src",
|
|
169
|
-
"codegen": "npm run generate-style-code && npm run generate-struct-arrays && npm run generate-style-spec && npm run generate-shaders",
|
|
170
|
+
"test-unit": "jest -c ./jest.config.ts --roots ./src",
|
|
171
|
+
"codegen": "npm run generate-style-code && npm run generate-struct-arrays && npm run generate-style-spec && npm run generate-shaders && npm run generate-debug-index-file",
|
|
170
172
|
"benchmark": "node --loader ts-node/esm --experimental-specifier-resolution=node test/bench/run-benchmarks.ts",
|
|
171
173
|
"gl-stats": "node --loader ts-node/esm --experimental-specifier-resolution=node test/bench/gl-stats.ts",
|
|
172
|
-
"postinstall": "node ./postinstall.js"
|
|
174
|
+
"postinstall": "node ./postinstall.js",
|
|
175
|
+
"typecheck": "tsc --project tsconfig.typecheck.json"
|
|
173
176
|
},
|
|
174
177
|
"files": [
|
|
175
178
|
"build/",
|
package/src/css/maplibre-gl.css
CHANGED
|
@@ -464,26 +464,6 @@
|
|
|
464
464
|
100% { transform: rotate(360deg); }
|
|
465
465
|
}
|
|
466
466
|
|
|
467
|
-
@keyframes maplibregl-spin {
|
|
468
|
-
0% { transform: rotate(0deg); }
|
|
469
|
-
100% { transform: rotate(360deg); }
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
@keyframes maplibregl-spin {
|
|
473
|
-
0% { transform: rotate(0deg); }
|
|
474
|
-
100% { transform: rotate(360deg); }
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
@keyframes maplibregl-spin {
|
|
478
|
-
0% { transform: rotate(0deg); }
|
|
479
|
-
100% { transform: rotate(360deg); }
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
@keyframes maplibregl-spin {
|
|
483
|
-
0% { transform: rotate(0deg); }
|
|
484
|
-
100% { transform: rotate(360deg); }
|
|
485
|
-
}
|
|
486
|
-
|
|
487
467
|
a.maplibregl-ctrl-logo,
|
|
488
468
|
a.mapboxgl-ctrl-logo {
|
|
489
469
|
width: 88px;
|
|
@@ -542,6 +522,7 @@ a.mapboxgl-ctrl-logo.mapboxgl-compact {
|
|
|
542
522
|
position: relative;
|
|
543
523
|
background-color: #fff;
|
|
544
524
|
border-radius: 12px;
|
|
525
|
+
box-sizing: content-box;
|
|
545
526
|
}
|
|
546
527
|
|
|
547
528
|
.maplibregl-ctrl-attrib.maplibregl-compact-show,
|
|
@@ -580,6 +561,15 @@ a.mapboxgl-ctrl-logo.mapboxgl-compact {
|
|
|
580
561
|
border: 0;
|
|
581
562
|
}
|
|
582
563
|
|
|
564
|
+
.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button {
|
|
565
|
+
appearance: none;
|
|
566
|
+
list-style: none;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker {
|
|
570
|
+
display: none;
|
|
571
|
+
}
|
|
572
|
+
|
|
583
573
|
.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button,
|
|
584
574
|
.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,
|
|
585
575
|
.mapboxgl-ctrl-top-left .mapboxgl-ctrl-attrib-button,
|
|
@@ -887,18 +877,6 @@ a.mapboxgl-ctrl-logo.mapboxgl-compact {
|
|
|
887
877
|
100% { transform: scale(1); opacity: 0; }
|
|
888
878
|
}
|
|
889
879
|
|
|
890
|
-
@keyframes maplibregl-user-location-dot-pulse {
|
|
891
|
-
0% { transform: scale(1); opacity: 1; }
|
|
892
|
-
70% { transform: scale(3); opacity: 0; }
|
|
893
|
-
100% { transform: scale(1); opacity: 0; }
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
@keyframes maplibregl-user-location-dot-pulse {
|
|
897
|
-
0% { transform: scale(1); opacity: 1; }
|
|
898
|
-
70% { transform: scale(3); opacity: 0; }
|
|
899
|
-
100% { transform: scale(1); opacity: 0; }
|
|
900
|
-
}
|
|
901
|
-
|
|
902
880
|
.maplibregl-user-location-dot-stale,
|
|
903
881
|
.mapboxgl-user-location-dot-stale {
|
|
904
882
|
background-color: #aaa;
|
|
@@ -937,3 +915,41 @@ a.mapboxgl-ctrl-logo.mapboxgl-compact {
|
|
|
937
915
|
border: 2px dotted #202020;
|
|
938
916
|
opacity: 0.5;
|
|
939
917
|
}
|
|
918
|
+
|
|
919
|
+
.maplibregl-cooperative-gesture-screen {
|
|
920
|
+
background: rgba(0 0 0 / 40%);
|
|
921
|
+
position: absolute;
|
|
922
|
+
top: 0;
|
|
923
|
+
left: 0;
|
|
924
|
+
right: 0;
|
|
925
|
+
bottom: 0;
|
|
926
|
+
display: flex;
|
|
927
|
+
justify-content: center;
|
|
928
|
+
align-items: center;
|
|
929
|
+
color: white;
|
|
930
|
+
padding: 1rem;
|
|
931
|
+
font-size: 1.4em;
|
|
932
|
+
line-height: 1.2;
|
|
933
|
+
opacity: 0;
|
|
934
|
+
pointer-events: none;
|
|
935
|
+
transition: opacity 1s ease 1s;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
.maplibregl-cooperative-gesture-screen.maplibregl-show {
|
|
939
|
+
opacity: 1;
|
|
940
|
+
transition: opacity 0.05s;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message {
|
|
944
|
+
display: none;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
@media (hover: none), (max-width: 480px) {
|
|
948
|
+
.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message {
|
|
949
|
+
display: none;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message {
|
|
953
|
+
display: block;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
@@ -21,7 +21,7 @@ import SegmentVector from '../segment';
|
|
|
21
21
|
import {ProgramConfigurationSet} from '../program_configuration';
|
|
22
22
|
import {TriangleIndexArray, LineIndexArray} from '../index_array_type';
|
|
23
23
|
import transformText from '../../symbol/transform_text';
|
|
24
|
-
import mergeLines from '../../symbol/
|
|
24
|
+
import mergeLines from '../../symbol/merge_lines';
|
|
25
25
|
import {allowsVerticalWritingMode, stringContainsRTLText} from '../../util/script_detection';
|
|
26
26
|
import {WritingMode} from '../../symbol/shaping';
|
|
27
27
|
import loadGeometry from '../load_geometry';
|
|
@@ -26,6 +26,6 @@ type EvaluationFeature = {
|
|
|
26
26
|
export default function toEvaluationFeature(feature: VectorTileFeature, needGeometry: boolean): EvaluationFeature {
|
|
27
27
|
return {type: feature.type,
|
|
28
28
|
id: feature.id,
|
|
29
|
-
properties:feature.properties,
|
|
29
|
+
properties: feature.properties,
|
|
30
30
|
geometry: needGeometry ? loadGeometry(feature) : []};
|
|
31
31
|
}
|
|
@@ -698,7 +698,7 @@ function paintAttributeNames(property, type) {
|
|
|
698
698
|
|
|
699
699
|
function getLayoutException(property) {
|
|
700
700
|
const propertyExceptions = {
|
|
701
|
-
'line-pattern':{
|
|
701
|
+
'line-pattern': {
|
|
702
702
|
'source': PatternLayoutArray,
|
|
703
703
|
'composite': PatternLayoutArray
|
|
704
704
|
},
|
|
@@ -706,7 +706,7 @@ function getLayoutException(property) {
|
|
|
706
706
|
'source': PatternLayoutArray,
|
|
707
707
|
'composite': PatternLayoutArray
|
|
708
708
|
},
|
|
709
|
-
'fill-extrusion-pattern':{
|
|
709
|
+
'fill-extrusion-pattern': {
|
|
710
710
|
'source': PatternLayoutArray,
|
|
711
711
|
'composite': PatternLayoutArray
|
|
712
712
|
}
|
|
@@ -93,7 +93,7 @@ describe('transform', () => {
|
|
|
93
93
|
transform.latRange = [-5, 5];
|
|
94
94
|
|
|
95
95
|
transform.zoom = 0;
|
|
96
|
-
expect(transform.zoom).toBe(5.
|
|
96
|
+
expect(transform.zoom).toBe(5.1357092861044045);
|
|
97
97
|
|
|
98
98
|
transform.center = new LngLat(-50, -30);
|
|
99
99
|
expect(transform.center).toEqual(new LngLat(0, -0.0063583052861417855));
|
|
@@ -103,6 +103,39 @@ describe('transform', () => {
|
|
|
103
103
|
expect(transform.center).toEqual(new LngLat(-4.828338623046875, -4.828969771321582));
|
|
104
104
|
});
|
|
105
105
|
|
|
106
|
+
test('lngRange can constrain zoom and center across meridian', () => {
|
|
107
|
+
const transform = new Transform(0, 22, 0, 60, true);
|
|
108
|
+
transform.center = new LngLat(180, 0);
|
|
109
|
+
transform.zoom = 10;
|
|
110
|
+
transform.resize(500, 500);
|
|
111
|
+
|
|
112
|
+
// equivalent ranges
|
|
113
|
+
const lngRanges: [number, number][] = [
|
|
114
|
+
[175, -175], [175, 185], [-185, -175], [-185, 185]
|
|
115
|
+
];
|
|
116
|
+
|
|
117
|
+
for (const lngRange of lngRanges) {
|
|
118
|
+
transform.lngRange = lngRange;
|
|
119
|
+
transform.latRange = [-5, 5];
|
|
120
|
+
|
|
121
|
+
transform.zoom = 0;
|
|
122
|
+
expect(transform.zoom).toBe(5.1357092861044045);
|
|
123
|
+
|
|
124
|
+
transform.center = new LngLat(-50, -30);
|
|
125
|
+
expect(transform.center).toEqual(new LngLat(180, -0.0063583052861417855));
|
|
126
|
+
|
|
127
|
+
transform.zoom = 10;
|
|
128
|
+
transform.center = new LngLat(-50, -30);
|
|
129
|
+
expect(transform.center).toEqual(new LngLat(-175.171661376953125, -4.828969771321582));
|
|
130
|
+
|
|
131
|
+
transform.center = new LngLat(230, 0);
|
|
132
|
+
expect(transform.center).toEqual(new LngLat(-175.171661376953125, 0));
|
|
133
|
+
|
|
134
|
+
transform.center = new LngLat(130, 0);
|
|
135
|
+
expect(transform.center).toEqual(new LngLat(175.171661376953125, 0));
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
|
|
106
139
|
describe('coveringTiles', () => {
|
|
107
140
|
const options = {
|
|
108
141
|
minzoom: 1,
|
package/src/geo/transform.ts
CHANGED
|
@@ -438,12 +438,9 @@ class Transform {
|
|
|
438
438
|
let quadrant = it.aabb.quadrant(i);
|
|
439
439
|
if (options.terrain) {
|
|
440
440
|
const tileID = new OverscaledTileID(childZ, it.wrap, childZ, childX, childY);
|
|
441
|
-
const
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
minElevation = tile.dem.min * options.terrain.exaggeration;
|
|
445
|
-
maxElevation = tile.dem.max * options.terrain.exaggeration;
|
|
446
|
-
}
|
|
441
|
+
const minMax = options.terrain.getMinMaxElevation(tileID);
|
|
442
|
+
const minElevation = minMax.minElevation ?? this.elevation;
|
|
443
|
+
const maxElevation = minMax.maxElevation ?? this.elevation;
|
|
447
444
|
quadrant = new Aabb(
|
|
448
445
|
[quadrant.min[0], quadrant.min[1], minElevation] as vec3,
|
|
449
446
|
[quadrant.max[0], quadrant.max[1], maxElevation] as vec3
|
|
@@ -496,7 +493,7 @@ class Transform {
|
|
|
496
493
|
* get the elevation from terrain for the current zoomlevel.
|
|
497
494
|
* @param lnglat the location
|
|
498
495
|
* @param terrain the terrain
|
|
499
|
-
* @returns {
|
|
496
|
+
* @returns {number} elevation in meters
|
|
500
497
|
*/
|
|
501
498
|
getElevation(lnglat: LngLat, terrain: Terrain) {
|
|
502
499
|
const merc = MercatorCoordinate.fromLngLat(lnglat);
|
|
@@ -654,8 +651,8 @@ class Transform {
|
|
|
654
651
|
/**
|
|
655
652
|
* Given a coordinate, return the screen point that corresponds to it
|
|
656
653
|
* @param {Coordinate} coord
|
|
657
|
-
* @
|
|
658
|
-
* @
|
|
654
|
+
* @param {number} elevation default = 0
|
|
655
|
+
* @param {mat4} pixelMatrix, default = this.pixelMatrix
|
|
659
656
|
* @returns {Point} screen point
|
|
660
657
|
* @private
|
|
661
658
|
*/
|
|
@@ -766,8 +763,20 @@ class Transform {
|
|
|
766
763
|
|
|
767
764
|
if (this.lngRange) {
|
|
768
765
|
const lngRange = this.lngRange;
|
|
769
|
-
|
|
770
|
-
|
|
766
|
+
|
|
767
|
+
minX = wrap(
|
|
768
|
+
mercatorXfromLng(lngRange[0]) * this.worldSize,
|
|
769
|
+
0,
|
|
770
|
+
this.worldSize
|
|
771
|
+
);
|
|
772
|
+
maxX = wrap(
|
|
773
|
+
mercatorXfromLng(lngRange[1]) * this.worldSize,
|
|
774
|
+
0,
|
|
775
|
+
this.worldSize
|
|
776
|
+
);
|
|
777
|
+
|
|
778
|
+
if (maxX < minX) maxX += this.worldSize;
|
|
779
|
+
|
|
771
780
|
sx = maxX - minX < size.x ? size.x / (maxX - minX) : 0;
|
|
772
781
|
}
|
|
773
782
|
|
|
@@ -795,8 +804,9 @@ class Transform {
|
|
|
795
804
|
}
|
|
796
805
|
|
|
797
806
|
if (this.lngRange) {
|
|
798
|
-
const
|
|
799
|
-
|
|
807
|
+
const centerX = (minX + maxX) / 2;
|
|
808
|
+
const x = wrap(point.x, centerX - this.worldSize / 2, centerX + this.worldSize / 2);
|
|
809
|
+
const w2 = size.x / 2;
|
|
800
810
|
|
|
801
811
|
if (x - w2 < minX) x2 = minX + w2;
|
|
802
812
|
if (x + w2 > maxX) x2 = maxX - w2;
|
|
@@ -806,7 +816,7 @@ class Transform {
|
|
|
806
816
|
if (x2 !== undefined || y2 !== undefined) {
|
|
807
817
|
this.center = this.unproject(new Point(
|
|
808
818
|
x2 !== undefined ? x2 : point.x,
|
|
809
|
-
y2 !== undefined ? y2 : point.y));
|
|
819
|
+
y2 !== undefined ? y2 : point.y)).wrap();
|
|
810
820
|
}
|
|
811
821
|
|
|
812
822
|
this._unmodified = unmodified;
|
|
@@ -909,7 +919,7 @@ class Transform {
|
|
|
909
919
|
dx = x - Math.round(x) + angleCos * xShift + angleSin * yShift,
|
|
910
920
|
dy = y - Math.round(y) + angleCos * yShift + angleSin * xShift;
|
|
911
921
|
const alignedM = new Float64Array(m) as any as mat4;
|
|
912
|
-
mat4.translate(alignedM, alignedM, [
|
|
922
|
+
mat4.translate(alignedM, alignedM, [dx > 0.5 ? dx - 1 : dx, dy > 0.5 ? dy - 1 : dy, 0]);
|
|
913
923
|
this.alignedProjMatrix = alignedM;
|
|
914
924
|
|
|
915
925
|
// inverse matrix for conversion from screen coordinaes to location
|
package/src/gl/vertex_buffer.ts
CHANGED
|
@@ -14,11 +14,11 @@ import type Context from '../gl/context';
|
|
|
14
14
|
* @readonly
|
|
15
15
|
*/
|
|
16
16
|
const AttributeType = {
|
|
17
|
-
Int8:
|
|
18
|
-
Uint8:
|
|
19
|
-
Int16:
|
|
17
|
+
Int8: 'BYTE',
|
|
18
|
+
Uint8: 'UNSIGNED_BYTE',
|
|
19
|
+
Int16: 'SHORT',
|
|
20
20
|
Uint16: 'UNSIGNED_SHORT',
|
|
21
|
-
Int32:
|
|
21
|
+
Int32: 'INT',
|
|
22
22
|
Uint32: 'UNSIGNED_INT',
|
|
23
23
|
Float32: 'FLOAT'
|
|
24
24
|
};
|
package/src/index.ts
CHANGED
|
@@ -237,7 +237,7 @@ Debug.extend(exported, {isSafari, getPerformanceMetrics: PerformanceUtils.getPer
|
|
|
237
237
|
* @param {boolean} lazy If set to `true`, mapboxgl will defer loading the plugin until rtl text is encountered,
|
|
238
238
|
* rtl text will then be rendered only after the plugin finishes loading.
|
|
239
239
|
* @example
|
|
240
|
-
* maplibregl.setRTLTextPlugin('https://
|
|
240
|
+
* maplibregl.setRTLTextPlugin('https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.2.3/mapbox-gl-rtl-text.js');
|
|
241
241
|
* @see [Add support for right-to-left scripts](https://maplibre.org/maplibre-gl-js-docs/example/mapbox-gl-rtl-text/)
|
|
242
242
|
*/
|
|
243
243
|
|
package/src/render/draw_debug.ts
CHANGED
|
@@ -92,7 +92,7 @@ function drawDebugTile(painter, sourceCache, coord: OverscaledTileID) {
|
|
|
92
92
|
if (coord.overscaledZ !== coord.canonical.z) {
|
|
93
93
|
tileIdText += ` => ${coord.overscaledZ}`;
|
|
94
94
|
}
|
|
95
|
-
const tileLabel = `${tileIdText} ${tileSizeKb}
|
|
95
|
+
const tileLabel = `${tileIdText} ${tileSizeKb}kB`;
|
|
96
96
|
drawTextToOverlay(painter, tileLabel);
|
|
97
97
|
|
|
98
98
|
program.draw(context, gl.TRIANGLES, depthMode, stencilMode, ColorMode.alphaBlended, CullFaceMode.disabled,
|
|
@@ -14,9 +14,6 @@ import Transform from '../geo/transform';
|
|
|
14
14
|
import type EvaluationParameters from '../style/evaluation_parameters';
|
|
15
15
|
import type {SymbolLayerSpecification} from '../style-spec/types.g';
|
|
16
16
|
import Style from '../style/style';
|
|
17
|
-
import TerrainSourceCache from '../source/terrain_source_cache';
|
|
18
|
-
import {Evented} from '../util/evented';
|
|
19
|
-
import {RequestManager} from '../util/request_manager';
|
|
20
17
|
|
|
21
18
|
jest.mock('./painter');
|
|
22
19
|
jest.mock('./program');
|
|
@@ -25,22 +22,6 @@ jest.mock('../source/tile');
|
|
|
25
22
|
jest.mock('../data/bucket/symbol_bucket');
|
|
26
23
|
jest.mock('../symbol/projection');
|
|
27
24
|
|
|
28
|
-
class StubMap extends Evented {
|
|
29
|
-
transform: Transform;
|
|
30
|
-
painter: Painter;
|
|
31
|
-
_requestManager: RequestManager;
|
|
32
|
-
|
|
33
|
-
constructor() {
|
|
34
|
-
super();
|
|
35
|
-
this.transform = new Transform();
|
|
36
|
-
this._requestManager = {
|
|
37
|
-
transformRequest: (url) => {
|
|
38
|
-
return {url};
|
|
39
|
-
}
|
|
40
|
-
} as any as RequestManager;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
25
|
describe('drawSymbol', () => {
|
|
45
26
|
test('should not do anything', () => {
|
|
46
27
|
const mockPainter = new Painter(null, null);
|
|
@@ -63,7 +44,7 @@ describe('drawSymbol', () => {
|
|
|
63
44
|
painterMock.renderPass = 'translucent';
|
|
64
45
|
painterMock.transform = {pitch: 0, labelPlaneMatrix: mat4.create()} as any as Transform;
|
|
65
46
|
painterMock.options = {} as any;
|
|
66
|
-
painterMock.style = {
|
|
47
|
+
painterMock.style = {} as any as Style;
|
|
67
48
|
|
|
68
49
|
const layerSpec = {
|
|
69
50
|
id: 'mock-layer',
|
|
@@ -164,9 +145,7 @@ describe('drawSymbol', () => {
|
|
|
164
145
|
const sourceCacheMock = new SourceCache(null, null, null);
|
|
165
146
|
(sourceCacheMock.getTile as jest.Mock).mockReturnValue(tile);
|
|
166
147
|
sourceCacheMock.map = {showCollisionBoxes: false} as any as Map;
|
|
167
|
-
painterMock.style = {
|
|
168
|
-
terrainSourceCache: new TerrainSourceCache(new Style(new StubMap() as any as Map))
|
|
169
|
-
} as any as Style;
|
|
148
|
+
painterMock.style = {} as any as Style;
|
|
170
149
|
|
|
171
150
|
const spy = jest.spyOn(symbolProjection, 'updateLineLabels');
|
|
172
151
|
drawSymbol(painterMock, sourceCacheMock, layer, [tileId], null);
|
|
@@ -107,7 +107,7 @@ function prepareTerrain(painter: Painter, terrain: Terrain, tile: Tile, stack: n
|
|
|
107
107
|
if (!tile.textures[stack]) {
|
|
108
108
|
tile.textures[stack] = painter.getTileTexture(size) || new Texture(context, {width: size, height: size, data: null}, context.gl.RGBA);
|
|
109
109
|
tile.textures[stack].bind(context.gl.LINEAR, context.gl.CLAMP_TO_EDGE);
|
|
110
|
-
if (stack === 0) terrain.sourceCache.renderHistory.
|
|
110
|
+
if (stack === 0) terrain.sourceCache.renderHistory.unshift(tile.tileID.key);
|
|
111
111
|
}
|
|
112
112
|
const fb = terrain.getRTTFramebuffer();
|
|
113
113
|
fb.colorAttachment.set(tile.textures[stack].texture);
|