@mapbox/mapbox-gl-style-spec 14.0.0-beta.1 → 14.0.0-beta.2

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/LICENSE.txt ADDED
@@ -0,0 +1,47 @@
1
+ Copyright © 2021 - 2023 Mapbox, Inc. All rights reserved.
2
+
3
+ The software and files in this repository (collectively, "Software") are
4
+ licensed under the Mapbox TOS for use only with the relevant Mapbox product(s)
5
+ listed at www.mapbox.com/pricing. This license allows developers with a
6
+ current active Mapbox account to use and modify the authorized portions of the
7
+ Software as needed for use only with the relevant Mapbox product(s) through
8
+ their Mapbox account in accordance with the Mapbox TOS. This license
9
+ terminates automatically if a developer no longer has a Mapbox account in good
10
+ standing or breaches the Mapbox TOS. For the license terms, please see the
11
+ Mapbox TOS at https://www.mapbox.com/legal/tos/ which incorporates the Mapbox
12
+ Product Terms at www.mapbox.com/legal/service-terms. If this Software is a
13
+ SDK, modifications that change or interfere with marked portions of the code
14
+ related to billing, accounting, or data collection are not authorized and the
15
+ SDK sends limited de-identified location and usage data which is used in
16
+ accordance with the Mapbox TOS. [Updated 2023-01]
17
+
18
+ -------------------------------------------------------------------------------
19
+
20
+ Contains code from mapbox-gl-js v1.13 and earlier
21
+
22
+ Version v1.13 of mapbox-gl-js and earlier are licensed under a BSD-3-Clause license
23
+
24
+ Copyright (c) 2020, Mapbox
25
+ Redistribution and use in source and binary forms, with or without modification,
26
+ are permitted provided that the following conditions are met:
27
+
28
+ * Redistributions of source code must retain the above copyright notice,
29
+ this list of conditions and the following disclaimer.
30
+ * Redistributions in binary form must reproduce the above copyright notice,
31
+ this list of conditions and the following disclaimer in the documentation
32
+ and/or other materials provided with the distribution.
33
+ * Neither the name of Mapbox GL JS nor the names of its contributors
34
+ may be used to endorse or promote products derived from this software
35
+ without specific prior written permission.
36
+
37
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
38
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
39
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
40
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
41
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
42
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
43
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
44
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
45
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
46
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
47
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md CHANGED
@@ -57,3 +57,10 @@ Will validate the given style JSON and print errors to stdout. Provide a
57
57
  `--json` flag to get JSON output.
58
58
 
59
59
  To validate that a style can be uploaded to the Mapbox Styles API, use the `--mapbox-api-supported` flag.
60
+
61
+ ## License
62
+
63
+ This project uses the standard Mapbox license, which is designed to provide flexibility for our customers and a sustained foundation for the development of our technology. Please consult LICENSE.txt for its specific details.
64
+
65
+ We understand that the Mapbox Style Specification embodied in this module may be useful in a wide variety of projects. If you are interested in using this module in a manner not expressly permitted by its license, please do not hesitate to contact legal@mapbox.com with details of what you have in mind.
66
+ ```
@@ -6,9 +6,9 @@
6
6
  import fs from 'fs';
7
7
  import minimist from 'minimist';
8
8
 
9
- /* eslint import/no-unresolved: [error, { ignore: ['^@mapbox/mapbox-gl-style-spec-private$'] }] */
9
+ /* eslint import/no-unresolved: [error, { ignore: ['^@mapbox/mapbox-gl-style-spec$'] }] */
10
10
  /* $FlowFixMe[cannot-resolve-module] */
11
- import {format, composite} from '@mapbox/mapbox-gl-style-spec-private';
11
+ import {format, composite} from '@mapbox/mapbox-gl-style-spec';
12
12
 
13
13
  const argv = minimist(process.argv.slice(2));
14
14
 
@@ -6,9 +6,9 @@
6
6
  import fs from 'fs';
7
7
  import minimist from 'minimist';
8
8
 
9
- /* eslint import/no-unresolved: [error, { ignore: ['^@mapbox/mapbox-gl-style-spec-private$'] }] */
9
+ /* eslint import/no-unresolved: [error, { ignore: ['^@mapbox/mapbox-gl-style-spec$'] }] */
10
10
  /* $FlowFixMe[cannot-resolve-module] */
11
- import {format} from '@mapbox/mapbox-gl-style-spec-private';
11
+ import {format} from '@mapbox/mapbox-gl-style-spec';
12
12
 
13
13
  const argv = minimist(process.argv.slice(2));
14
14
 
@@ -6,9 +6,9 @@
6
6
  import fs from 'fs';
7
7
  import minimist from 'minimist';
8
8
 
9
- /* eslint import/no-unresolved: [error, { ignore: ['^@mapbox/mapbox-gl-style-spec-private$'] }] */
9
+ /* eslint import/no-unresolved: [error, { ignore: ['^@mapbox/mapbox-gl-style-spec$'] }] */
10
10
  /* $FlowFixMe[cannot-resolve-module] */
11
- import {format, migrate} from '@mapbox/mapbox-gl-style-spec-private';
11
+ import {format, migrate} from '@mapbox/mapbox-gl-style-spec';
12
12
 
13
13
  const argv = minimist(process.argv.slice(2));
14
14
 
@@ -6,9 +6,9 @@
6
6
  import rw from 'rw';
7
7
  import minimist from 'minimist';
8
8
 
9
- /* eslint import/no-unresolved: [error, { ignore: ['^@mapbox/mapbox-gl-style-spec-private$'] }] */
9
+ /* eslint import/no-unresolved: [error, { ignore: ['^@mapbox/mapbox-gl-style-spec$'] }] */
10
10
  /* $FlowFixMe[cannot-resolve-module] */
11
- import {validate, validateMapboxApiSupported} from '@mapbox/mapbox-gl-style-spec-private';
11
+ import {validate, validateMapboxApiSupported} from '@mapbox/mapbox-gl-style-spec';
12
12
 
13
13
  const argv = minimist(process.argv.slice(2), {
14
14
  boolean: ['json', 'mapbox-api-supported'],
package/dist/index.cjs CHANGED
@@ -153,6 +153,7 @@
153
153
  glyphs: {
154
154
  type: "string",
155
155
  doc: "A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",
156
+ "default": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf",
156
157
  example: "mapbox://fonts/mapbox/{fontstack}/{range}.pbf"
157
158
  },
158
159
  transition: {
@@ -290,6 +291,14 @@
290
291
  210,
291
292
  30
292
293
  ],
294
+ minimum: [
295
+ 0,
296
+ 0
297
+ ],
298
+ maximum: [
299
+ 360,
300
+ 90
301
+ ],
293
302
  length: 2,
294
303
  value: "number",
295
304
  "property-type": "data-constant",
@@ -303,7 +312,7 @@
303
312
  doc: "Direction of the light source specified as [a azimuthal angle, p polar angle] where a indicates the azimuthal angle of the light relative to north (in degrees and proceeding clockwise), and p indicates polar angle of the light (from 0°, directly above, to 180°, directly below).",
304
313
  example: [
305
314
  90,
306
- 80
315
+ 40
307
316
  ]
308
317
  },
309
318
  color: {
@@ -7892,7 +7901,7 @@
7892
7901
  doc: "Radius of a fill extrusion edge in meters. If not zero, rounds extrusion edges for a smoother appearance.",
7893
7902
  "sdk-support": {
7894
7903
  "basic functionality": {
7895
- js: "v2.10.0",
7904
+ js: "3.0.0",
7896
7905
  android: "10.7.0",
7897
7906
  ios: "10.7.0"
7898
7907
  },
@@ -8256,7 +8265,7 @@
8256
8265
  doc: "Controls the intensity of shading near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.",
8257
8266
  "sdk-support": {
8258
8267
  "basic functionality": {
8259
- js: "2.10.0",
8268
+ js: "3.0.0",
8260
8269
  android: "10.7.0",
8261
8270
  ios: "10.7.0"
8262
8271
  }
@@ -8281,7 +8290,7 @@
8281
8290
  ],
8282
8291
  "sdk-support": {
8283
8292
  "basic functionality": {
8284
- js: "2.10.0",
8293
+ js: "3.0.0",
8285
8294
  android: "10.7.0",
8286
8295
  ios: "10.7.0"
8287
8296
  }
@@ -8508,7 +8517,7 @@
8508
8517
  transition: false,
8509
8518
  "sdk-support": {
8510
8519
  "basic functionality": {
8511
- js: "2.15.0",
8520
+ js: "3.0.0",
8512
8521
  android: "10.10.0",
8513
8522
  ios: "10.10.0"
8514
8523
  }
@@ -19423,7 +19432,7 @@ ${ JSON.stringify(filterExp, null, 2) }
19423
19432
  }
19424
19433
  const errors = [];
19425
19434
  if (options.layerType === 'symbol') {
19426
- if (propertyKey === 'text-field' && style && !style.glyphs) {
19435
+ if (propertyKey === 'text-field' && style && !style.glyphs && !style.imports) {
19427
19436
  errors.push(new ValidationError(key, value, 'use of "text-field" requires a style "glyphs" property'));
19428
19437
  }
19429
19438
  if (propertyKey === 'text-font' && isFunction(deepUnbundle(value)) && unbundle(value.type) === 'identity') {