@tangram.gl/basemap-layers 0.0.0-stage → 0.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.
Files changed (105) hide show
  1. package/README.md +34 -2
  2. package/THIRD-PARTY-NOTICES.md +205 -0
  3. package/dist/geojson-worker.js +2160 -0
  4. package/dist/geojson-worker.js.map +6 -0
  5. package/dist/index.cjs +11388 -0
  6. package/dist/index.cjs.map +6 -0
  7. package/dist/index.js +11369 -0
  8. package/dist/index.js.map +6 -0
  9. package/dist/map-style.cjs +445 -0
  10. package/dist/map-style.cjs.map +6 -0
  11. package/dist/map-style.js +431 -0
  12. package/dist/map-style.js.map +6 -0
  13. package/dist/types/arabic-shaping.d.ts +7 -0
  14. package/dist/types/atmosphere-layer.d.ts +10 -0
  15. package/dist/types/basemap-layer.d.ts +150 -0
  16. package/dist/types/bidi.d.ts +8 -0
  17. package/dist/types/circle-layer.d.ts +49 -0
  18. package/dist/types/fill-extrusion-lighting-extension.d.ts +49 -0
  19. package/dist/types/fill-outline-extension.d.ts +22 -0
  20. package/dist/types/fill-pattern.d.ts +99 -0
  21. package/dist/types/fill-style-extensions.d.ts +100 -0
  22. package/dist/types/geojson-source.d.ts +29 -0
  23. package/dist/types/geojson-tiler.d.ts +48 -0
  24. package/dist/types/geojson-worker.d.ts +40 -0
  25. package/dist/types/globe-horizon-extension.d.ts +61 -0
  26. package/dist/types/globe-layers.d.ts +239 -0
  27. package/dist/types/globe-line-angle-extension.d.ts +37 -0
  28. package/dist/types/glyph-font-renderer.d.ts +37 -0
  29. package/dist/types/glyph-pbf.d.ts +37 -0
  30. package/dist/types/glyph-store.d.ts +103 -0
  31. package/dist/types/grid-index.d.ts +47 -0
  32. package/dist/types/hillshade-layer.d.ts +154 -0
  33. package/dist/types/index.d.ts +9 -0
  34. package/dist/types/is-globe-viewport.d.ts +2 -0
  35. package/dist/types/label-font-renderer.d.ts +18 -0
  36. package/dist/types/label-placement.d.ts +247 -0
  37. package/dist/types/label-text-layer.d.ts +231 -0
  38. package/dist/types/line-blur-extension.d.ts +73 -0
  39. package/dist/types/line-glyphs.d.ts +60 -0
  40. package/dist/types/line-placement.d.ts +93 -0
  41. package/dist/types/map-style-loader.d.ts +48 -0
  42. package/dist/types/map-style-schema.d.ts +72 -0
  43. package/dist/types/map-style.d.ts +6 -0
  44. package/dist/types/mapbox-style.d.ts +40 -0
  45. package/dist/types/mvt-label-layer.d.ts +923 -0
  46. package/dist/types/polylabel.d.ts +17 -0
  47. package/dist/types/raster-color-extension.d.ts +146 -0
  48. package/dist/types/shared-texture.d.ts +34 -0
  49. package/dist/types/sort-key.d.ts +10 -0
  50. package/dist/types/sprite.d.ts +82 -0
  51. package/dist/types/style-accessor.d.ts +45 -0
  52. package/dist/types/style-expression.d.ts +83 -0
  53. package/dist/types/style-resolver.d.ts +94 -0
  54. package/dist/types/text-font.d.ts +36 -0
  55. package/dist/types/text-halo-blur-extension.d.ts +55 -0
  56. package/dist/types/text-layout.d.ts +71 -0
  57. package/dist/types/util.d.ts +22 -0
  58. package/dist/types/zoom-paint-extension.d.ts +72 -0
  59. package/package.json +80 -3
  60. package/src/arabic-shaping.ts +366 -0
  61. package/src/atmosphere-layer.ts +19 -0
  62. package/src/basemap-layer.ts +533 -0
  63. package/src/bidi.ts +199 -0
  64. package/src/circle-layer.ts +191 -0
  65. package/src/fill-extrusion-lighting-extension.ts +206 -0
  66. package/src/fill-outline-extension.ts +70 -0
  67. package/src/fill-pattern.ts +400 -0
  68. package/src/fill-style-extensions.ts +177 -0
  69. package/src/geojson-source.ts +318 -0
  70. package/src/geojson-tiler.ts +185 -0
  71. package/src/geojson-worker.ts +98 -0
  72. package/src/globe-horizon-extension.ts +64 -0
  73. package/src/globe-layers.ts +3487 -0
  74. package/src/globe-line-angle-extension.ts +131 -0
  75. package/src/glyph-font-renderer.ts +173 -0
  76. package/src/glyph-pbf.ts +164 -0
  77. package/src/glyph-store.ts +326 -0
  78. package/src/grid-index.ts +177 -0
  79. package/src/hillshade-layer.ts +775 -0
  80. package/src/index.ts +18 -0
  81. package/src/is-globe-viewport.ts +24 -0
  82. package/src/label-font-renderer.ts +159 -0
  83. package/src/label-placement.ts +727 -0
  84. package/src/label-text-layer.ts +913 -0
  85. package/src/line-blur-extension.ts +237 -0
  86. package/src/line-glyphs.ts +364 -0
  87. package/src/line-placement.ts +446 -0
  88. package/src/map-style-loader.ts +56 -0
  89. package/src/map-style-schema.ts +83 -0
  90. package/src/map-style.ts +23 -0
  91. package/src/mapbox-style.ts +168 -0
  92. package/src/mvt-label-layer.ts +3744 -0
  93. package/src/polylabel.ts +312 -0
  94. package/src/raster-color-extension.ts +245 -0
  95. package/src/shared-texture.ts +153 -0
  96. package/src/sort-key.ts +63 -0
  97. package/src/sprite.ts +244 -0
  98. package/src/style-accessor.ts +95 -0
  99. package/src/style-expression.ts +327 -0
  100. package/src/style-resolver.ts +301 -0
  101. package/src/text-font.ts +150 -0
  102. package/src/text-halo-blur-extension.ts +115 -0
  103. package/src/text-layout.ts +441 -0
  104. package/src/util.ts +47 -0
  105. package/src/zoom-paint-extension.ts +207 -0
package/README.md CHANGED
@@ -1,3 +1,35 @@
1
- # Temporary Holding Version
1
+ <!--
2
+ tangram-layers
3
+ SPDX-License-Identifier: MIT
4
+ Copyright (c) vis.gl contributors
5
+ -->
6
+
7
+ # basemap-layers
8
+
9
+ [![NPM Version](https://img.shields.io/npm/v/@deck.gl-community/basemap-layers.svg)](https://www.npmjs.com/package/@deck.gl-community/basemap-layers)
10
+ [![NPM Downloads](https://img.shields.io/npm/dw/@deck.gl-community/basemap-layers.svg)](https://www.npmjs.com/package/@deck.gl-community/basemap-layers)
11
+
12
+ > _This is a work in progress_.
13
+
14
+ An implementation of a subset of the [Mapbox Style
15
+ Specification][mapbox_style_spec] with the intention of visualizing it using deck.gl.
16
+
17
+ The runtime API is exported from `@deck.gl-community/basemap-layers`, and the map-style
18
+ helpers are exported from `@deck.gl-community/basemap-layers/map-style`.
19
+
20
+ Install the matching `@deck.gl-community/geo-layers` peer alongside this package:
21
+
22
+ ```sh
23
+ npm install @deck.gl-community/basemap-layers @deck.gl-community/geo-layers@~9.4.2
24
+ ```
25
+
26
+ This peer is required explicitly in strict dependency resolvers such as Yarn Plug'n'Play.
27
+
28
+ For more information, see the online documentation.
29
+ # Migration snapshot
30
+
31
+ This module was copied from `visgl/deck.gl-community`,
32
+ `modules/basemap-layers`, at commit `d903803f56f5eccda88a9b4328ab266c98c55fe5`.
33
+ It retains the upstream MIT attribution and third-party notices. It is private
34
+ and experimental while its build, tests and shared-core integration are adapted.
2
35
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
@@ -0,0 +1,205 @@
1
+ <!--
2
+ tangram-layers
3
+ SPDX-License-Identifier: MIT
4
+ Copyright (c) vis.gl contributors
5
+ -->
6
+
7
+ # Third-party notices
8
+
9
+ `@deck.gl-community/basemap-layers` is released under the MIT license of the
10
+ [deck.gl-community repository](https://github.com/visgl/deck.gl-community/blob/master/LICENSE).
11
+ The release copies that file into the package as `LICENSE`.
12
+ Some of its source files contain code or data adapted from the third-party projects below. Each
13
+ of those files names its upstream source and carries the upstream notice in its header; this file
14
+ collects the full license texts so that they ship with every copy of the package, including the
15
+ built `dist` files.
16
+
17
+ | Upstream | License | Files in this package |
18
+ | --- | --- | --- |
19
+ | [MapLibre GL JS](https://github.com/maplibre/maplibre-gl-js) v6.13.0, which contains code from mapbox-gl-js v1.13 and earlier | BSD-3-Clause | `src/bidi.ts`, `src/arabic-shaping.ts`, `src/hillshade-layer.ts`, `src/raster-color-extension.ts` |
20
+ | [Unicode Character Database](https://www.unicode.org/ucd/) 17.0.0 | Unicode-3.0 | `src/arabic-shaping.ts` |
21
+
22
+ ## MapLibre GL JS
23
+
24
+ Source: <https://github.com/maplibre/maplibre-gl-js/blob/v6.13.0/LICENSE.txt>
25
+
26
+ - `src/bidi.ts` adapts `src/symbol/bidi.ts`.
27
+ - `src/arabic-shaping.ts` adapts `src/symbol/arabic_shaping.ts` and the tables that
28
+ `build/generate-unicode-data.ts` writes to `src/util/unicode_properties.g.ts`.
29
+ - `src/hillshade-layer.ts` ports `src/shaders/glsl/hillshade.fragment.glsl` and the arithmetic of
30
+ `src/shaders/glsl/hillshade_prepare.fragment.glsl`. The standard hillshade algorithm in that
31
+ shader comes from mapbox-gl-js v1.13 and earlier.
32
+ - `src/raster-color-extension.ts` ports the color adjustments of
33
+ `src/shaders/glsl/raster.fragment.glsl`, which come from mapbox-gl-js v1.13 and earlier.
34
+
35
+ MapLibre GL JS's license file follows in full. Its glfx.js and d3-color sections apply to other
36
+ parts of MapLibre GL JS and are kept here unedited.
37
+
38
+ ```text
39
+ Copyright (c) 2023, MapLibre contributors
40
+
41
+ All rights reserved.
42
+
43
+ Redistribution and use in source and binary forms, with or without modification,
44
+ are permitted provided that the following conditions are met:
45
+
46
+ * Redistributions of source code must retain the above copyright notice,
47
+ this list of conditions and the following disclaimer.
48
+ * Redistributions in binary form must reproduce the above copyright notice,
49
+ this list of conditions and the following disclaimer in the documentation
50
+ and/or other materials provided with the distribution.
51
+ * Neither the name of MapLibre GL JS nor the names of its contributors
52
+ may be used to endorse or promote products derived from this software
53
+ without specific prior written permission.
54
+
55
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
56
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
57
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
58
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
59
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
60
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
61
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
62
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
63
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
64
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
65
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
66
+
67
+
68
+ -------------------------------------------------------------------------------
69
+
70
+ Contains code from mapbox-gl-js v1.13 and earlier
71
+
72
+ Version v1.13 of mapbox-gl-js and earlier are licensed under a BSD-3-Clause license
73
+
74
+ Copyright (c) 2020, Mapbox
75
+ Redistribution and use in source and binary forms, with or without modification,
76
+ are permitted provided that the following conditions are met:
77
+
78
+ * Redistributions of source code must retain the above copyright notice,
79
+ this list of conditions and the following disclaimer.
80
+ * Redistributions in binary form must reproduce the above copyright notice,
81
+ this list of conditions and the following disclaimer in the documentation
82
+ and/or other materials provided with the distribution.
83
+ * Neither the name of Mapbox GL JS nor the names of its contributors
84
+ may be used to endorse or promote products derived from this software
85
+ without specific prior written permission.
86
+
87
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
88
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
89
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
90
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
91
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
92
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
93
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
94
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
95
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
96
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
97
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
98
+
99
+
100
+ -------------------------------------------------------------------------------
101
+
102
+ Contains code from glfx.js
103
+
104
+ Copyright (C) 2011 by Evan Wallace
105
+
106
+ Permission is hereby granted, free of charge, to any person obtaining a copy
107
+ of this software and associated documentation files (the "Software"), to deal
108
+ in the Software without restriction, including without limitation the rights
109
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
110
+ copies of the Software, and to permit persons to whom the Software is
111
+ furnished to do so, subject to the following conditions:
112
+
113
+ The above copyright notice and this permission notice shall be included in
114
+ all copies or substantial portions of the Software.
115
+
116
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
117
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
118
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
119
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
120
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
121
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
122
+ THE SOFTWARE.
123
+
124
+ --------------------------------------------------------------------------------
125
+
126
+ Contains a portion of d3-color https://github.com/d3/d3-color
127
+
128
+ Copyright 2010-2016 Mike Bostock
129
+ All rights reserved.
130
+
131
+ Redistribution and use in source and binary forms, with or without modification,
132
+ are permitted provided that the following conditions are met:
133
+
134
+ * Redistributions of source code must retain the above copyright notice, this
135
+ list of conditions and the following disclaimer.
136
+
137
+ * Redistributions in binary form must reproduce the above copyright notice,
138
+ this list of conditions and the following disclaimer in the documentation
139
+ and/or other materials provided with the distribution.
140
+
141
+ * Neither the name of the author nor the names of contributors may be used to
142
+ endorse or promote products derived from this software without specific prior
143
+ written permission.
144
+
145
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
146
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
147
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
148
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
149
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
150
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
151
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
152
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
153
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
154
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
155
+ ```
156
+
157
+ ## Unicode Character Database
158
+
159
+ Source: <https://www.unicode.org/license.txt>
160
+
161
+ The Arabic joining types, presentation forms and ligatures in `src/arabic-shaping.ts` are derived
162
+ from the Unicode Character Database 17.0.0 (`extracted/DerivedJoiningType.txt` and
163
+ `UnicodeData.txt`).
164
+
165
+ ```text
166
+ UNICODE LICENSE V3
167
+
168
+ COPYRIGHT AND PERMISSION NOTICE
169
+
170
+ Copyright © 1991-2026 Unicode, Inc.
171
+
172
+ NOTICE TO USER: Carefully read the following legal agreement. BY
173
+ DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
174
+ SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
175
+ TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
176
+ DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
177
+
178
+ Permission is hereby granted, free of charge, to any person obtaining a
179
+ copy of data files and any associated documentation (the "Data Files") or
180
+ software and any associated documentation (the "Software") to deal in the
181
+ Data Files or Software without restriction, including without limitation
182
+ the rights to use, copy, modify, merge, publish, distribute, and/or sell
183
+ copies of the Data Files or Software, and to permit persons to whom the
184
+ Data Files or Software are furnished to do so, provided that either (a)
185
+ this copyright and permission notice appear with all copies of the Data
186
+ Files or Software, or (b) this copyright and permission notice appear in
187
+ associated Documentation.
188
+
189
+ THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
190
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
191
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
192
+ THIRD PARTY RIGHTS.
193
+
194
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
195
+ BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
196
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
197
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
198
+ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
199
+ FILES OR SOFTWARE.
200
+
201
+ Except as contained in this notice, the name of a copyright holder shall
202
+ not be used in advertising or otherwise to promote the sale, use or other
203
+ dealings in these Data Files or Software without prior written
204
+ authorization of the copyright holder.
205
+ ```