@mapbox/mapbox-gl-style-spec 14.15.0-beta.2 → 14.16.0-beta.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.
Files changed (76) hide show
  1. package/deref.ts +3 -0
  2. package/diff.ts +63 -0
  3. package/dist/index.cjs +741 -54
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.d.ts +205 -40
  6. package/dist/index.es.js +741 -54
  7. package/dist/index.es.js.map +1 -1
  8. package/expression/compound_expression.ts +4 -0
  9. package/expression/definitions/assertion.ts +7 -0
  10. package/expression/definitions/case.ts +2 -1
  11. package/expression/definitions/coalesce.ts +4 -0
  12. package/expression/definitions/coercion.ts +12 -0
  13. package/expression/definitions/collator.ts +8 -5
  14. package/expression/definitions/comparison.ts +12 -5
  15. package/expression/definitions/config.ts +12 -0
  16. package/expression/definitions/distance.ts +13 -2
  17. package/expression/definitions/format.ts +10 -0
  18. package/expression/definitions/image.ts +3 -0
  19. package/expression/definitions/in.ts +5 -0
  20. package/expression/definitions/index.ts +62 -10
  21. package/expression/definitions/index_of.ts +6 -0
  22. package/expression/definitions/interpolate.ts +5 -1
  23. package/expression/definitions/length.ts +2 -0
  24. package/expression/definitions/let.ts +1 -0
  25. package/expression/definitions/match.ts +5 -0
  26. package/expression/definitions/number_format.ts +7 -0
  27. package/expression/definitions/slice.ts +4 -0
  28. package/expression/definitions/within.ts +1 -0
  29. package/expression/index.ts +28 -19
  30. package/expression/parsing_context.ts +2 -0
  31. package/expression/types/image_variant.ts +3 -0
  32. package/expression/types.ts +1 -2
  33. package/expression/values.ts +1 -0
  34. package/feature_filter/convert.ts +9 -1
  35. package/feature_filter/index.ts +41 -1
  36. package/format.ts +5 -0
  37. package/function/convert.ts +5 -0
  38. package/function/index.ts +79 -25
  39. package/group_by_layout.ts +4 -5
  40. package/migrate/v8.ts +42 -3
  41. package/migrate/v9.ts +5 -0
  42. package/migrate.ts +1 -0
  43. package/package.json +1 -1
  44. package/read_style.ts +2 -0
  45. package/reference/v8.json +463 -18
  46. package/rollup.config.js +1 -0
  47. package/style-spec.ts +187 -74
  48. package/test.js +4 -0
  49. package/types.ts +74 -5
  50. package/util/geometry_util.ts +4 -0
  51. package/validate/validate.ts +3 -8
  52. package/validate/validate_appearance.ts +101 -0
  53. package/validate/validate_array.ts +6 -4
  54. package/validate/validate_enum.ts +2 -7
  55. package/validate/validate_expression.ts +48 -3
  56. package/validate/validate_filter.ts +5 -3
  57. package/validate/validate_fog.ts +6 -0
  58. package/validate/validate_function.ts +2 -0
  59. package/validate/validate_iconset.ts +1 -0
  60. package/validate/validate_import.ts +2 -2
  61. package/validate/validate_layer.ts +37 -4
  62. package/validate/validate_light.ts +6 -0
  63. package/validate/validate_lights.ts +9 -0
  64. package/validate/validate_model.ts +1 -2
  65. package/validate/validate_number.ts +4 -4
  66. package/validate/validate_object.ts +7 -0
  67. package/validate/validate_projection.ts +2 -0
  68. package/validate/validate_property.ts +15 -4
  69. package/validate/validate_rain.ts +5 -0
  70. package/validate/validate_snow.ts +5 -0
  71. package/validate/validate_source.ts +13 -3
  72. package/validate/validate_style.ts +1 -0
  73. package/validate/validate_terrain.ts +6 -0
  74. package/validate_mapbox_api_supported.ts +1 -0
  75. package/visit.ts +2 -0
  76. package/util/extend.ts +0 -9
package/dist/index.es.js CHANGED
@@ -1269,6 +1269,125 @@ var source_image = {
1269
1269
  }
1270
1270
  }
1271
1271
  };
1272
+ var modelNodeOverride = {
1273
+ orientation: {
1274
+ type: "array",
1275
+ value: "number",
1276
+ length: 3,
1277
+ "default": [
1278
+ 0,
1279
+ 0,
1280
+ 0
1281
+ ],
1282
+ period: 360,
1283
+ units: "degrees",
1284
+ doc: "Override the orientation of the model node in euler angles [x, y, z]."
1285
+ }
1286
+ };
1287
+ var modelNodeOverrides = {
1288
+ "*": {
1289
+ type: "modelNodeOverride",
1290
+ doc: "An object defining model node properties to override. Object key is the node name as defined in the model."
1291
+ }
1292
+ };
1293
+ var modelMaterialOverride = {
1294
+ "model-color": {
1295
+ type: "color",
1296
+ doc: "Override the tint color of the material."
1297
+ },
1298
+ "model-color-mix-intensity": {
1299
+ type: "number",
1300
+ doc: "Override the intensity of model-color (on a scale from 0 to 1) in color mix with original 3D model's colors."
1301
+ },
1302
+ "model-opacity": {
1303
+ type: "number",
1304
+ doc: "Override the opacity of the material."
1305
+ },
1306
+ "model-emissive-strength": {
1307
+ type: "number",
1308
+ units: "intensity",
1309
+ doc: "Override strength of the emission of material."
1310
+ }
1311
+ };
1312
+ var modelMaterialOverrides = {
1313
+ "*": {
1314
+ type: "modelMaterialOverride",
1315
+ doc: "An object defining material properties to override. Object key is the material name as defined in the model."
1316
+ }
1317
+ };
1318
+ var modelSourceModel = {
1319
+ uri: {
1320
+ type: "string",
1321
+ required: true,
1322
+ doc: "A URL to a model resource. Supported protocols are `http:`, `https:`, and `mapbox://<Model ID>`."
1323
+ },
1324
+ position: {
1325
+ type: "array",
1326
+ value: "number",
1327
+ length: 2,
1328
+ required: false,
1329
+ "default": [
1330
+ 0,
1331
+ 0
1332
+ ],
1333
+ minimum: [
1334
+ -180,
1335
+ -90
1336
+ ],
1337
+ maximum: [
1338
+ 180,
1339
+ 90
1340
+ ],
1341
+ doc: "Position of the model in longitude and latitude [lng, lat]."
1342
+ },
1343
+ orientation: {
1344
+ type: "array",
1345
+ value: "number",
1346
+ length: 3,
1347
+ required: false,
1348
+ "default": [
1349
+ 0,
1350
+ 0,
1351
+ 0
1352
+ ],
1353
+ period: 360,
1354
+ units: "degrees",
1355
+ doc: "Orientation of the model in euler angles [x, y, z]."
1356
+ },
1357
+ nodeOverrides: {
1358
+ type: "modelNodeOverrides",
1359
+ required: false,
1360
+ doc: "A collection of node overrides."
1361
+ },
1362
+ materialOverrides: {
1363
+ type: "modelMaterialOverrides",
1364
+ required: false,
1365
+ doc: "A collection of material overrides."
1366
+ },
1367
+ nodeOverrideNames: {
1368
+ type: "array",
1369
+ value: "string",
1370
+ doc: "An array of one or more model node names whose transform will be overridden from model layer paint properties.",
1371
+ required: false
1372
+ },
1373
+ materialOverrideNames: {
1374
+ type: "array",
1375
+ value: "string",
1376
+ doc: "An array of one or more model material names whose properties will be overridden from model layer paint properties.",
1377
+ required: false
1378
+ },
1379
+ featureProperties: {
1380
+ type: "*",
1381
+ doc: "An object defining custom properties of the model. Properties are accessible as feature properties in expressions.",
1382
+ required: false
1383
+ }
1384
+ };
1385
+ var modelSourceModels = {
1386
+ "*": {
1387
+ type: "modelSourceModel",
1388
+ doc: "A 3D model and its properties."
1389
+ }
1390
+ };
1272
1391
  var source_model = {
1273
1392
  type: {
1274
1393
  required: true,
@@ -1296,7 +1415,11 @@ var source_model = {
1296
1415
  tiles: {
1297
1416
  type: "array",
1298
1417
  value: "string",
1299
- doc: "An array of one or more tile source URLs, as in the TileJSON spec."
1418
+ doc: "An array of one or more tile source URLs, as in the TileJSON spec. Requires `batched-model` source type."
1419
+ },
1420
+ models: {
1421
+ type: "modelSourceModels",
1422
+ doc: "Defines properties of 3D models in collection. Requires `model` source type."
1300
1423
  }
1301
1424
  };
1302
1425
  var layer = {
@@ -1371,6 +1494,9 @@ var layer = {
1371
1494
  building: {
1372
1495
  doc: "A procedural 3D building.",
1373
1496
  "sdk-support": {
1497
+ js: "3.16.0",
1498
+ android: "11.16.0",
1499
+ ios: "11.16.0"
1374
1500
  },
1375
1501
  experimental: true,
1376
1502
  "private": true
@@ -1520,12 +1646,25 @@ var layer = {
1520
1646
  };
1521
1647
  var appearance = {
1522
1648
  condition: {
1523
- type: "expression",
1524
- doc: "A boolean expression that determines when this appearance should be applied."
1649
+ type: "boolean",
1650
+ doc: "A boolean expression that determines when this appearance should be applied.",
1651
+ expression: {
1652
+ interpolated: false,
1653
+ parameters: [
1654
+ "zoom",
1655
+ "pitch",
1656
+ "feature",
1657
+ "feature-state",
1658
+ "measure-light",
1659
+ "distance-from-center"
1660
+ ]
1661
+ },
1662
+ "property-type": "data-driven"
1525
1663
  },
1526
1664
  name: {
1527
1665
  type: "string",
1528
- doc: "Optional name for this appearance. Non-empty names should be unique within a layer."
1666
+ doc: "Optional name for this appearance. Non-empty names should be unique within a layer.",
1667
+ "property-type": "constant"
1529
1668
  },
1530
1669
  properties: {
1531
1670
  type: "*",
@@ -1955,6 +2094,9 @@ var layout_building = {
1955
2094
  doc: "Whether this layer is displayed.",
1956
2095
  "sdk-support": {
1957
2096
  "basic functionality": {
2097
+ js: "3.16.0",
2098
+ android: "11.16.0",
2099
+ ios: "11.16.0"
1958
2100
  }
1959
2101
  },
1960
2102
  expression: {
@@ -1970,8 +2112,14 @@ var layout_building = {
1970
2112
  "private": true,
1971
2113
  "sdk-support": {
1972
2114
  "basic functionality": {
2115
+ js: "3.16.0",
2116
+ android: "11.16.0",
2117
+ ios: "11.16.0"
1973
2118
  },
1974
2119
  "data-driven styling": {
2120
+ js: "3.16.0",
2121
+ android: "11.16.0",
2122
+ ios: "11.16.0"
1975
2123
  }
1976
2124
  },
1977
2125
  expression: {
@@ -1992,8 +2140,44 @@ var layout_building = {
1992
2140
  "property-type": "data-driven",
1993
2141
  "sdk-support": {
1994
2142
  "basic functionality": {
2143
+ js: "3.16.0",
2144
+ android: "11.16.0",
2145
+ ios: "11.16.0"
2146
+ },
2147
+ "data-driven styling": {
2148
+ js: "3.16.0",
2149
+ android: "11.16.0",
2150
+ ios: "11.16.0"
2151
+ }
2152
+ },
2153
+ expression: {
2154
+ interpolated: false,
2155
+ parameters: [
2156
+ "feature"
2157
+ ]
2158
+ },
2159
+ requires: [
2160
+ "building-facade"
2161
+ ]
2162
+ },
2163
+ "building-facade-unit-width": {
2164
+ type: "number",
2165
+ minimum: 1,
2166
+ maximum: 20,
2167
+ "default": 3.1,
2168
+ doc: "Width of a floor. Think of this as measure how wide each unit should be. This effectively determines the number of units per each floor. Note that this does not affect the ground level facades (i.e. number of windows).",
2169
+ experimental: true,
2170
+ "property-type": "data-driven",
2171
+ "sdk-support": {
2172
+ "basic functionality": {
2173
+ js: "3.16.0",
2174
+ android: "11.16.0",
2175
+ ios: "11.16.0"
1995
2176
  },
1996
2177
  "data-driven styling": {
2178
+ js: "3.16.0",
2179
+ android: "11.16.0",
2180
+ ios: "11.16.0"
1997
2181
  }
1998
2182
  },
1999
2183
  expression: {
@@ -2016,13 +2200,19 @@ var layout_building = {
2016
2200
  0.9,
2017
2201
  0.9
2018
2202
  ],
2019
- doc: "Given as fractions, specifies the percentage of floor area covered by windows when building-facade is enabled",
2203
+ doc: "Given as fractions, specifies the percentage of unit area covered by windows when building-facade is enabled. Note that the area of a unit is ultimately determined by `building-facade-unit-width` and `building-facade-floors`.",
2020
2204
  experimental: true,
2021
2205
  "property-type": "data-driven",
2022
2206
  "sdk-support": {
2023
2207
  "basic functionality": {
2208
+ js: "3.16.0",
2209
+ android: "11.16.0",
2210
+ ios: "11.16.0"
2024
2211
  },
2025
2212
  "data-driven styling": {
2213
+ js: "3.16.0",
2214
+ android: "11.16.0",
2215
+ ios: "11.16.0"
2026
2216
  }
2027
2217
  },
2028
2218
  expression: {
@@ -2066,8 +2256,14 @@ var layout_building = {
2066
2256
  "private": true,
2067
2257
  "sdk-support": {
2068
2258
  "basic functionality": {
2259
+ js: "3.16.0",
2260
+ android: "11.16.0",
2261
+ ios: "11.16.0"
2069
2262
  },
2070
2263
  "data-driven styling": {
2264
+ js: "3.16.0",
2265
+ android: "11.16.0",
2266
+ ios: "11.16.0"
2071
2267
  }
2072
2268
  },
2073
2269
  expression: {
@@ -2089,8 +2285,14 @@ var layout_building = {
2089
2285
  "private": true,
2090
2286
  "sdk-support": {
2091
2287
  "basic functionality": {
2288
+ js: "3.16.0",
2289
+ android: "11.16.0",
2290
+ ios: "11.16.0"
2092
2291
  },
2093
2292
  "data-driven styling": {
2293
+ js: "3.16.0",
2294
+ android: "11.16.0",
2295
+ ios: "11.16.0"
2094
2296
  }
2095
2297
  },
2096
2298
  expression: {
@@ -2112,14 +2314,114 @@ var layout_building = {
2112
2314
  "private": true,
2113
2315
  "sdk-support": {
2114
2316
  "basic functionality": {
2317
+ js: "3.16.0",
2318
+ android: "11.16.0",
2319
+ ios: "11.16.0"
2115
2320
  },
2116
2321
  "data-driven styling": {
2322
+ js: "3.16.0",
2323
+ android: "11.16.0",
2324
+ ios: "11.16.0"
2117
2325
  }
2118
2326
  },
2119
2327
  expression: {
2120
2328
  interpolated: false
2121
2329
  },
2122
2330
  "property-type": "data-driven"
2331
+ },
2332
+ "building-flood-light-wall-radius": {
2333
+ "property-type": "data-driven",
2334
+ type: "number",
2335
+ experimental: true,
2336
+ units: "meters",
2337
+ "default": 0,
2338
+ minimum: 0,
2339
+ doc: "The extent of the flood light effect on the walls of the buildings in meters.",
2340
+ requires: [
2341
+ "lights"
2342
+ ],
2343
+ transition: true,
2344
+ expression: {
2345
+ interpolated: true,
2346
+ parameters: [
2347
+ "feature",
2348
+ "feature-state"
2349
+ ]
2350
+ },
2351
+ "sdk-support": {
2352
+ "basic functionality": {
2353
+ js: "3.16.0",
2354
+ android: "11.16.0",
2355
+ ios: "11.16.0"
2356
+ },
2357
+ "data-driven styling": {
2358
+ js: "3.16.0",
2359
+ android: "11.16.0",
2360
+ ios: "11.16.0"
2361
+ }
2362
+ }
2363
+ },
2364
+ "building-flood-light-ground-radius": {
2365
+ "property-type": "data-driven",
2366
+ type: "number",
2367
+ experimental: true,
2368
+ units: "meters",
2369
+ "default": 0,
2370
+ doc: "The extent of the flood light effect on the ground beneath the buildings in meters.",
2371
+ requires: [
2372
+ "lights"
2373
+ ],
2374
+ transition: true,
2375
+ expression: {
2376
+ interpolated: true,
2377
+ parameters: [
2378
+ "feature",
2379
+ "feature-state"
2380
+ ]
2381
+ },
2382
+ "sdk-support": {
2383
+ "basic functionality": {
2384
+ js: "3.16.0",
2385
+ android: "11.16.0",
2386
+ ios: "11.16.0"
2387
+ },
2388
+ "data-driven styling": {
2389
+ js: "3.16.0",
2390
+ android: "11.16.0",
2391
+ ios: "11.16.0"
2392
+ }
2393
+ }
2394
+ },
2395
+ "building-flip-roof-orientation": {
2396
+ "property-type": "data-driven",
2397
+ type: "boolean",
2398
+ experimental: true,
2399
+ units: "meters",
2400
+ "default": false,
2401
+ doc: "Flips the orientation of the roofs for the buildings. This only affects simple geometries. Namely buildings whose footprints form a quadrilateral. By default (false), the roof ridge takes the direction of the longer edge of the quadrilateral.",
2402
+ transition: true,
2403
+ requires: [
2404
+ "building-roof-shape"
2405
+ ],
2406
+ expression: {
2407
+ interpolated: true,
2408
+ parameters: [
2409
+ "feature",
2410
+ "feature-state"
2411
+ ]
2412
+ },
2413
+ "sdk-support": {
2414
+ "basic functionality": {
2415
+ js: "3.16.0",
2416
+ android: "11.16.0",
2417
+ ios: "11.16.0"
2418
+ },
2419
+ "data-driven styling": {
2420
+ js: "3.16.0",
2421
+ android: "11.16.0",
2422
+ ios: "11.16.0"
2423
+ }
2424
+ }
2123
2425
  }
2124
2426
  };
2125
2427
  var layout_line = {
@@ -2602,6 +2904,11 @@ var layout_symbol = {
2602
2904
  ios: "11.9.0"
2603
2905
  }
2604
2906
  },
2907
+ requires: [
2908
+ {
2909
+ "symbol-z-elevate": true
2910
+ }
2911
+ ],
2605
2912
  expression: {
2606
2913
  interpolated: false,
2607
2914
  parameters: [
@@ -2754,9 +3061,15 @@ var layout_symbol = {
2754
3061
  0.8,
2755
3062
  2
2756
3063
  ],
2757
- doc: "Defines the minimum and maximum scaling factors for icon related properties like `icon-size`, `icon-halo-width`, `icon-halo-blur`",
2758
- minimum: 0.1,
2759
- maximum: 10,
3064
+ doc: "Limits the possible scaling range for `icon-size`, `icon-halo-width`, `icon-halo-blur` properties to be within [min-scale, max-scale]",
3065
+ minimum: [
3066
+ 0.1,
3067
+ 0.1
3068
+ ],
3069
+ maximum: [
3070
+ 10,
3071
+ 10
3072
+ ],
2760
3073
  experimental: true,
2761
3074
  "private": true,
2762
3075
  expression: {
@@ -3270,9 +3583,15 @@ var layout_symbol = {
3270
3583
  0.8,
3271
3584
  2
3272
3585
  ],
3273
- doc: "Defines the minimum and maximum scaling factors for text related properties like `text-size`, `text-max-width`, `text-halo-width`, `font-size`",
3274
- minimum: 0.1,
3275
- maximum: 10,
3586
+ doc: "Limits the possible scaling range for `text-size`, `text-halo-width`, `text-halo-blur` properties to be within [min-scale, max-scale]",
3587
+ minimum: [
3588
+ 0.1,
3589
+ 0.1
3590
+ ],
3591
+ maximum: [
3592
+ 10,
3593
+ 10
3594
+ ],
3276
3595
  experimental: true,
3277
3596
  "private": true,
3278
3597
  expression: {
@@ -6776,6 +7095,9 @@ var paint_building = {
6776
7095
  "private": true,
6777
7096
  "sdk-support": {
6778
7097
  "basic functionality": {
7098
+ js: "3.16.0",
7099
+ android: "11.16.0",
7100
+ ios: "11.16.0"
6779
7101
  }
6780
7102
  },
6781
7103
  expression: {
@@ -6803,6 +7125,9 @@ var paint_building = {
6803
7125
  doc: "Controls the intensity of ambient occlusion when shading concave angles between walls and roof crevices and windows.",
6804
7126
  "sdk-support": {
6805
7127
  "basic functionality": {
7128
+ js: "3.16.0",
7129
+ android: "11.16.0",
7130
+ ios: "11.16.0"
6806
7131
  }
6807
7132
  }
6808
7133
  },
@@ -6824,6 +7149,9 @@ var paint_building = {
6824
7149
  doc: "Controls the intensity of shading near ground",
6825
7150
  "sdk-support": {
6826
7151
  "basic functionality": {
7152
+ js: "3.16.0",
7153
+ android: "11.16.0",
7154
+ ios: "11.16.0"
6827
7155
  }
6828
7156
  }
6829
7157
  },
@@ -6844,6 +7172,9 @@ var paint_building = {
6844
7172
  doc: "The extent of the ambient occlusion effect on the ground beneath the procedural buildings in meters.",
6845
7173
  "sdk-support": {
6846
7174
  "basic functionality": {
7175
+ js: "3.16.0",
7176
+ android: "11.16.0",
7177
+ ios: "11.16.0"
6847
7178
  }
6848
7179
  }
6849
7180
  },
@@ -6865,6 +7196,9 @@ var paint_building = {
6865
7196
  },
6866
7197
  "sdk-support": {
6867
7198
  "basic functionality": {
7199
+ js: "3.16.0",
7200
+ android: "11.16.0",
7201
+ ios: "11.16.0"
6868
7202
  }
6869
7203
  }
6870
7204
  },
@@ -6885,6 +7219,9 @@ var paint_building = {
6885
7219
  },
6886
7220
  "sdk-support": {
6887
7221
  "basic functionality": {
7222
+ js: "3.16.0",
7223
+ android: "11.16.0",
7224
+ ios: "11.16.0"
6888
7225
  }
6889
7226
  }
6890
7227
  },
@@ -6897,6 +7234,9 @@ var paint_building = {
6897
7234
  "private": true,
6898
7235
  "sdk-support": {
6899
7236
  "basic functionality": {
7237
+ js: "3.16.0",
7238
+ android: "11.16.0",
7239
+ ios: "11.16.0"
6900
7240
  }
6901
7241
  },
6902
7242
  "property-type": "data-constant"
@@ -6911,8 +7251,14 @@ var paint_building = {
6911
7251
  transition: false,
6912
7252
  "sdk-support": {
6913
7253
  "basic functionality": {
7254
+ js: "3.16.0",
7255
+ android: "11.16.0",
7256
+ ios: "11.16.0"
6914
7257
  },
6915
7258
  "data-driven styling": {
7259
+ js: "3.16.0",
7260
+ android: "11.16.0",
7261
+ ios: "11.16.0"
6916
7262
  }
6917
7263
  },
6918
7264
  expression: {
@@ -6936,8 +7282,14 @@ var paint_building = {
6936
7282
  "private": true,
6937
7283
  "sdk-support": {
6938
7284
  "basic functionality": {
7285
+ js: "3.16.0",
7286
+ android: "11.16.0",
7287
+ ios: "11.16.0"
6939
7288
  },
6940
7289
  "data-driven styling": {
7290
+ js: "3.16.0",
7291
+ android: "11.16.0",
7292
+ ios: "11.16.0"
6941
7293
  }
6942
7294
  },
6943
7295
  expression: {
@@ -6960,6 +7312,9 @@ var paint_building = {
6960
7312
  "property-type": "data-constant",
6961
7313
  "sdk-support": {
6962
7314
  "basic functionality": {
7315
+ js: "3.16.0",
7316
+ android: "11.16.0",
7317
+ ios: "11.16.0"
6963
7318
  }
6964
7319
  },
6965
7320
  expression: {
@@ -6982,9 +7337,91 @@ var paint_building = {
6982
7337
  },
6983
7338
  "sdk-support": {
6984
7339
  "basic functionality": {
7340
+ js: "3.16.0",
7341
+ android: "11.16.0",
7342
+ ios: "11.16.0"
6985
7343
  }
6986
7344
  },
6987
7345
  "property-type": "data-constant"
7346
+ },
7347
+ "building-flood-light-color": {
7348
+ "property-type": "data-constant",
7349
+ type: "color",
7350
+ experimental: true,
7351
+ "default": "#ffffff",
7352
+ doc: "The color of the flood light effect on the walls of the buildings.",
7353
+ requires: [
7354
+ "lights"
7355
+ ],
7356
+ "use-theme": true,
7357
+ transition: true,
7358
+ expression: {
7359
+ interpolated: true,
7360
+ parameters: [
7361
+ "zoom",
7362
+ "measure-light"
7363
+ ]
7364
+ },
7365
+ "sdk-support": {
7366
+ "basic functionality": {
7367
+ js: "3.16.0",
7368
+ android: "11.16.0",
7369
+ ios: "11.16.0"
7370
+ }
7371
+ }
7372
+ },
7373
+ "building-flood-light-intensity": {
7374
+ "property-type": "data-constant",
7375
+ type: "number",
7376
+ experimental: true,
7377
+ "default": 0,
7378
+ minimum: 0,
7379
+ maximum: 1,
7380
+ doc: "The intensity of the flood light color.",
7381
+ requires: [
7382
+ "lights"
7383
+ ],
7384
+ transition: true,
7385
+ expression: {
7386
+ interpolated: true,
7387
+ parameters: [
7388
+ "zoom",
7389
+ "measure-light"
7390
+ ]
7391
+ },
7392
+ "sdk-support": {
7393
+ "basic functionality": {
7394
+ js: "3.16.0",
7395
+ android: "11.16.0",
7396
+ ios: "11.16.0"
7397
+ }
7398
+ }
7399
+ },
7400
+ "building-flood-light-ground-attenuation": {
7401
+ "property-type": "data-constant",
7402
+ type: "number",
7403
+ experimental: true,
7404
+ "default": 0.69,
7405
+ minimum: 0,
7406
+ maximum: 1,
7407
+ doc: "Provides a control to futher fine-tune the look of the flood light on the ground beneath the buildings. Lower values give the effect a more solid look while higher values make it smoother.",
7408
+ requires: [
7409
+ "lights"
7410
+ ],
7411
+ transition: true,
7412
+ expression: {
7413
+ interpolated: true,
7414
+ parameters: [
7415
+ "zoom"
7416
+ ]
7417
+ },
7418
+ "sdk-support": {
7419
+ "basic functionality": {
7420
+ js: "3.16.0",
7421
+ android: "11.16.0",
7422
+ ios: "11.16.0"
7423
+ }
7424
+ }
6988
7425
  }
6989
7426
  };
6990
7427
  var paint_line = {
@@ -8770,6 +9207,11 @@ var paint_symbol = {
8770
9207
  ios: "11.7.0"
8771
9208
  }
8772
9209
  },
9210
+ requires: [
9211
+ {
9212
+ "symbol-z-elevate": true
9213
+ }
9214
+ ],
8773
9215
  expression: {
8774
9216
  interpolated: true,
8775
9217
  parameters: [
@@ -10064,6 +10506,32 @@ var paint_model = {
10064
10506
  js: "3.5.0"
10065
10507
  }
10066
10508
  }
10509
+ },
10510
+ "model-elevation-reference": {
10511
+ type: "enum",
10512
+ doc: "Selects the base of the model. Some modes might require precomputed elevation data in the tileset.",
10513
+ values: {
10514
+ sea: {
10515
+ doc: "Elevated rendering is enabled. Use this mode to elevate models relative to the sea level."
10516
+ },
10517
+ ground: {
10518
+ doc: "Elevated rendering is enabled. Use this mode to elevate models relative to the ground's height below them."
10519
+ },
10520
+ "hd-road-markup": {
10521
+ doc: "Elevated rendering is enabled. Use this mode to describe additive and stackable features that should exist only on top of road polygons."
10522
+ }
10523
+ },
10524
+ "default": "ground",
10525
+ transition: false,
10526
+ expression: {
10527
+ interpolated: false
10528
+ },
10529
+ "property-type": "data-constant",
10530
+ experimental: true,
10531
+ "sdk-support": {
10532
+ "basic functionality": {
10533
+ }
10534
+ }
10067
10535
  }
10068
10536
  };
10069
10537
  var transition = {
@@ -10208,6 +10676,12 @@ var v8 = {
10208
10676
  source_geojson: source_geojson,
10209
10677
  source_video: source_video,
10210
10678
  source_image: source_image,
10679
+ modelNodeOverride: modelNodeOverride,
10680
+ modelNodeOverrides: modelNodeOverrides,
10681
+ modelMaterialOverride: modelMaterialOverride,
10682
+ modelMaterialOverrides: modelMaterialOverrides,
10683
+ modelSourceModel: modelSourceModel,
10684
+ modelSourceModels: modelSourceModels,
10211
10685
  source_model: source_model,
10212
10686
  layer: layer,
10213
10687
  appearance: appearance,
@@ -11617,15 +12091,6 @@ function migrateToV8 (style) {
11617
12091
  return style;
11618
12092
  }
11619
12093
 
11620
- function extend (output, ...inputs) {
11621
- for (const input of inputs) {
11622
- for (const k in input) {
11623
- output[k] = input[k];
11624
- }
11625
- }
11626
- return output;
11627
- }
11628
-
11629
12094
  let ParsingError$1 = class ParsingError extends Error {
11630
12095
  constructor(key, message) {
11631
12096
  super(message);
@@ -13638,7 +14103,11 @@ class FormatExpression {
13638
14103
  if (typeEquals(typeOf(evaluatedContent), ResolvedImageType)) {
13639
14104
  return new FormattedSection('', evaluatedContent, null, null, null);
13640
14105
  }
13641
- return new FormattedSection(toString(evaluatedContent), null, section.scale ? section.scale.evaluate(ctx) : null, section.font ? section.font.evaluate(ctx).join(',') : null, section.textColor ? section.textColor.evaluate(ctx) : null);
14106
+ return new FormattedSection(// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
14107
+ toString(evaluatedContent), null, // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
14108
+ section.scale ? section.scale.evaluate(ctx) : null, // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
14109
+ section.font ? section.font.evaluate(ctx).join(',') : null, // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
14110
+ section.textColor ? section.textColor.evaluate(ctx) : null);
13642
14111
  };
13643
14112
  return new Formatted(this.sections.map(evaluateSection));
13644
14113
  }
@@ -13796,10 +14265,12 @@ class ImageExpression {
13796
14265
  }
13797
14266
  evaluate(ctx) {
13798
14267
  const primaryId = {
14268
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
13799
14269
  name: this.namePrimary.evaluate(ctx),
13800
14270
  iconsetId: this.iconsetIdPrimary
13801
14271
  };
13802
14272
  const secondaryId = this.nameSecondary ? {
14273
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
13803
14274
  name: this.nameSecondary.evaluate(ctx),
13804
14275
  iconsetId: this.iconsetIdSecondary
13805
14276
  } : void 0;
@@ -15944,7 +16415,8 @@ function linesToGeometryDistance(originGeometry, canonical, geometry) {
15944
16415
  }
15945
16416
  const ruler = new CheapRuler(lngLatLines[0][0][1], 'meters');
15946
16417
  if (geometry.type === 'Point' || geometry.type === 'MultiPoint' || geometry.type === 'LineString') {
15947
- return pointSetToLinesDistance(geometry.type === 'Point' ? [geometry.coordinates] : geometry.coordinates, geometry.type === 'LineString', lngLatLines, ruler);
16418
+ return pointSetToLinesDistance(geometry.type === 'Point' ? [geometry.coordinates] : geometry.coordinates, // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
16419
+ geometry.type === 'LineString', lngLatLines, ruler);
15948
16420
  }
15949
16421
  if (geometry.type === 'MultiLineString') {
15950
16422
  let dist = Infinity;
@@ -15981,7 +16453,8 @@ function polygonsToGeometryDistance(originGeometry, canonical, geometry) {
15981
16453
  }
15982
16454
  const ruler = new CheapRuler(lngLatPolygons[0][0][0][1], 'meters');
15983
16455
  if (geometry.type === 'Point' || geometry.type === 'MultiPoint' || geometry.type === 'LineString') {
15984
- return pointSetToPolygonsDistance(geometry.type === 'Point' ? [geometry.coordinates] : geometry.coordinates, geometry.type === 'LineString', lngLatPolygons, ruler);
16456
+ return pointSetToPolygonsDistance(geometry.type === 'Point' ? [geometry.coordinates] : geometry.coordinates, // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
16457
+ geometry.type === 'LineString', lngLatPolygons, ruler);
15985
16458
  }
15986
16459
  if (geometry.type === 'MultiLineString') {
15987
16460
  let dist = Infinity;
@@ -15995,7 +16468,8 @@ function polygonsToGeometryDistance(originGeometry, canonical, geometry) {
15995
16468
  return dist;
15996
16469
  }
15997
16470
  if (geometry.type === 'Polygon' || geometry.type === 'MultiPolygon') {
15998
- return polygonsToPolygonsDistance(geometry.type === 'Polygon' ? [geometry.coordinates] : geometry.coordinates, lngLatPolygons, ruler);
16471
+ return polygonsToPolygonsDistance(geometry.type === 'Polygon' ? [geometry.coordinates] : geometry.coordinates, // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
16472
+ lngLatPolygons, ruler);
15999
16473
  }
16000
16474
  return null;
16001
16475
  }
@@ -16147,12 +16621,14 @@ function makeConfigFQID(id, ownScope, contextScope) {
16147
16621
  }
16148
16622
  function coerceValue(type, value) {
16149
16623
  switch (type) {
16624
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
16150
16625
  case 'string':
16151
16626
  return toString(value);
16152
16627
  case 'number':
16153
16628
  return +value;
16154
16629
  case 'boolean':
16155
16630
  return !!value;
16631
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
16156
16632
  case 'color':
16157
16633
  return Color.parse(value);
16158
16634
  case 'formatted': {
@@ -16949,8 +17425,11 @@ class Coalesce {
16949
17425
  outputType = outputType || parsed.type;
16950
17426
  parsedArgs.push(parsed);
16951
17427
  }
16952
- const needsAnnotation = expectedType && parsedArgs.some(arg => checkSubtype(expectedType, arg.type));
16953
- return needsAnnotation ? new Coalesce(ValueType, parsedArgs) : new Coalesce(outputType, parsedArgs);
17428
+ const needsAnnotation = expectedType && // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
17429
+ parsedArgs.some(arg => checkSubtype(expectedType, arg.type));
17430
+ return needsAnnotation ? // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
17431
+ new Coalesce(ValueType, parsedArgs) : // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
17432
+ new Coalesce(outputType, parsedArgs);
16954
17433
  }
16955
17434
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
16956
17435
  evaluate(ctx) {
@@ -17767,10 +18246,14 @@ class NumberFormat {
17767
18246
  evaluate(ctx) {
17768
18247
  return new Intl.NumberFormat(this.locale ? this.locale.evaluate(ctx) : [], {
17769
18248
  style: this.currency && 'currency' || this.unit && 'unit' || 'decimal',
18249
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
17770
18250
  currency: this.currency ? this.currency.evaluate(ctx) : void 0,
18251
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
17771
18252
  unit: this.unit ? this.unit.evaluate(ctx) : void 0,
18253
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
17772
18254
  minimumFractionDigits: this.minFractionDigits ? this.minFractionDigits.evaluate(ctx) : void 0,
17773
- maximumFractionDigits: this.maxFractionDigits ? this.maxFractionDigits.evaluate(ctx) : void 0
18255
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
18256
+ maximumFractionDigits: this.maxFractionDigits ? this.maxFractionDigits.evaluate(ctx) : void 0 // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
17774
18257
  }).format(this.number.evaluate(ctx));
17775
18258
  }
17776
18259
  eachChild(fn) {
@@ -17973,6 +18456,7 @@ CompoundExpression.register(expressions, {
17973
18456
  'error': [
17974
18457
  ErrorType,
17975
18458
  [StringType],
18459
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
17976
18460
  (ctx, [v]) => {
17977
18461
  throw new RuntimeError(v.evaluate(ctx));
17978
18462
  }
@@ -17980,6 +18464,7 @@ CompoundExpression.register(expressions, {
17980
18464
  'typeof': [
17981
18465
  StringType,
17982
18466
  [ValueType],
18467
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
17983
18468
  (ctx, [v]) => toString$1(typeOf(v.evaluate(ctx)))
17984
18469
  ],
17985
18470
  'to-rgba': [
@@ -18039,6 +18524,7 @@ CompoundExpression.register(expressions, {
18039
18524
  overloads: [
18040
18525
  [
18041
18526
  [StringType],
18527
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18042
18528
  (ctx, [key]) => has(key.evaluate(ctx), ctx.properties())
18043
18529
  ],
18044
18530
  [
@@ -18046,6 +18532,7 @@ CompoundExpression.register(expressions, {
18046
18532
  StringType,
18047
18533
  ObjectType
18048
18534
  ],
18535
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18049
18536
  (ctx, [key, obj]) => has(key.evaluate(ctx), obj.evaluate(ctx))
18050
18537
  ]
18051
18538
  ]
@@ -18055,6 +18542,7 @@ CompoundExpression.register(expressions, {
18055
18542
  overloads: [
18056
18543
  [
18057
18544
  [StringType],
18545
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18058
18546
  (ctx, [key]) => get(key.evaluate(ctx), ctx.properties())
18059
18547
  ],
18060
18548
  [
@@ -18062,7 +18550,7 @@ CompoundExpression.register(expressions, {
18062
18550
  StringType,
18063
18551
  ObjectType
18064
18552
  ],
18065
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
18553
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-argument
18066
18554
  (ctx, [key, obj]) => get(key.evaluate(ctx), obj.evaluate(ctx))
18067
18555
  ]
18068
18556
  ]
@@ -18070,6 +18558,7 @@ CompoundExpression.register(expressions, {
18070
18558
  'feature-state': [
18071
18559
  ValueType,
18072
18560
  [StringType],
18561
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18073
18562
  (ctx, [key]) => get(key.evaluate(ctx), ctx.featureState || {})
18074
18563
  ],
18075
18564
  'properties': [
@@ -18110,6 +18599,7 @@ CompoundExpression.register(expressions, {
18110
18599
  'measure-light': [
18111
18600
  NumberType,
18112
18601
  [StringType],
18602
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18113
18603
  (ctx, [s]) => ctx.measureLight(s.evaluate(ctx))
18114
18604
  ],
18115
18605
  'heatmap-density': [
@@ -18217,73 +18707,85 @@ CompoundExpression.register(expressions, {
18217
18707
  NumberType,
18218
18708
  NumberType
18219
18709
  ],
18710
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18220
18711
  (ctx, [b, e]) => Math.pow(b.evaluate(ctx), e.evaluate(ctx))
18221
18712
  ],
18222
18713
  'sqrt': [
18223
18714
  NumberType,
18224
18715
  [NumberType],
18716
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18225
18717
  (ctx, [x]) => Math.sqrt(x.evaluate(ctx))
18226
18718
  ],
18227
18719
  'log10': [
18228
18720
  NumberType,
18229
18721
  [NumberType],
18722
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18230
18723
  (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN10
18231
18724
  ],
18232
18725
  'ln': [
18233
18726
  NumberType,
18234
18727
  [NumberType],
18728
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18235
18729
  (ctx, [n]) => Math.log(n.evaluate(ctx))
18236
18730
  ],
18237
18731
  'log2': [
18238
18732
  NumberType,
18239
18733
  [NumberType],
18240
- (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN2
18734
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18735
+ (ctx, [n]) => Math.log2(n.evaluate(ctx))
18241
18736
  ],
18242
18737
  'sin': [
18243
18738
  NumberType,
18244
18739
  [NumberType],
18740
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18245
18741
  (ctx, [n]) => Math.sin(n.evaluate(ctx))
18246
18742
  ],
18247
18743
  'cos': [
18248
18744
  NumberType,
18249
18745
  [NumberType],
18746
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18250
18747
  (ctx, [n]) => Math.cos(n.evaluate(ctx))
18251
18748
  ],
18252
18749
  'tan': [
18253
18750
  NumberType,
18254
18751
  [NumberType],
18752
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18255
18753
  (ctx, [n]) => Math.tan(n.evaluate(ctx))
18256
18754
  ],
18257
18755
  'asin': [
18258
18756
  NumberType,
18259
18757
  [NumberType],
18758
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18260
18759
  (ctx, [n]) => Math.asin(n.evaluate(ctx))
18261
18760
  ],
18262
18761
  'acos': [
18263
18762
  NumberType,
18264
18763
  [NumberType],
18764
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18265
18765
  (ctx, [n]) => Math.acos(n.evaluate(ctx))
18266
18766
  ],
18267
18767
  'atan': [
18268
18768
  NumberType,
18269
18769
  [NumberType],
18770
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18270
18771
  (ctx, [n]) => Math.atan(n.evaluate(ctx))
18271
18772
  ],
18272
18773
  'min': [
18273
18774
  NumberType,
18274
18775
  varargs(NumberType),
18275
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
18776
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-argument
18276
18777
  (ctx, args) => Math.min(...args.map(arg => arg.evaluate(ctx)))
18277
18778
  ],
18278
18779
  'max': [
18279
18780
  NumberType,
18280
18781
  varargs(NumberType),
18281
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
18782
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-argument
18282
18783
  (ctx, args) => Math.max(...args.map(arg => arg.evaluate(ctx)))
18283
18784
  ],
18284
18785
  'abs': [
18285
18786
  NumberType,
18286
18787
  [NumberType],
18788
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18287
18789
  (ctx, [n]) => Math.abs(n.evaluate(ctx))
18288
18790
  ],
18289
18791
  'round': [
@@ -18297,11 +18799,13 @@ CompoundExpression.register(expressions, {
18297
18799
  'floor': [
18298
18800
  NumberType,
18299
18801
  [NumberType],
18802
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18300
18803
  (ctx, [n]) => Math.floor(n.evaluate(ctx))
18301
18804
  ],
18302
18805
  'ceil': [
18303
18806
  NumberType,
18304
18807
  [NumberType],
18808
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18305
18809
  (ctx, [n]) => Math.ceil(n.evaluate(ctx))
18306
18810
  ],
18307
18811
  'filter-==': [
@@ -18310,6 +18814,7 @@ CompoundExpression.register(expressions, {
18310
18814
  StringType,
18311
18815
  ValueType
18312
18816
  ],
18817
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
18313
18818
  (ctx, [k, v]) => ctx.properties()[k.value] === v.value
18314
18819
  ],
18315
18820
  'filter-id-==': [
@@ -18419,11 +18924,13 @@ CompoundExpression.register(expressions, {
18419
18924
  'filter-type-in': [
18420
18925
  BooleanType,
18421
18926
  [array$1(StringType)],
18927
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
18422
18928
  (ctx, [v]) => v.value.indexOf(ctx.geometryType()) >= 0
18423
18929
  ],
18424
18930
  'filter-id-in': [
18425
18931
  BooleanType,
18426
18932
  [array$1(ValueType)],
18933
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
18427
18934
  (ctx, [v]) => v.value.indexOf(ctx.id()) >= 0
18428
18935
  ],
18429
18936
  'filter-in-small': [
@@ -18433,6 +18940,7 @@ CompoundExpression.register(expressions, {
18433
18940
  array$1(ValueType)
18434
18941
  ],
18435
18942
  // assumes v is an array literal
18943
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
18436
18944
  (ctx, [k, v]) => v.value.indexOf(ctx.properties()[k.value]) >= 0
18437
18945
  ],
18438
18946
  'filter-in-large': [
@@ -18442,6 +18950,7 @@ CompoundExpression.register(expressions, {
18442
18950
  array$1(ValueType)
18443
18951
  ],
18444
18952
  // assumes v is a array literal with values sorted in ascending order and of a single type
18953
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument
18445
18954
  (ctx, [k, v]) => binarySearch(ctx.properties()[k.value], v.value, 0, v.value.length - 1)
18446
18955
  ],
18447
18956
  'all': {
@@ -18510,24 +19019,25 @@ CompoundExpression.register(expressions, {
18510
19019
  'upcase': [
18511
19020
  StringType,
18512
19021
  [StringType],
18513
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
19022
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
18514
19023
  (ctx, [s]) => s.evaluate(ctx).toUpperCase()
18515
19024
  ],
18516
19025
  'downcase': [
18517
19026
  StringType,
18518
19027
  [StringType],
18519
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
19028
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
18520
19029
  (ctx, [s]) => s.evaluate(ctx).toLowerCase()
18521
19030
  ],
18522
19031
  'concat': [
18523
19032
  StringType,
18524
19033
  varargs(ValueType),
19034
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18525
19035
  (ctx, args) => args.map(arg => toString(arg.evaluate(ctx))).join('')
18526
19036
  ],
18527
19037
  'resolved-locale': [
18528
19038
  StringType,
18529
19039
  [CollatorType],
18530
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
19040
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
18531
19041
  (ctx, [collator]) => collator.evaluate(ctx).resolvedLocale()
18532
19042
  ],
18533
19043
  'random': [
@@ -18604,7 +19114,7 @@ function createFunction(parameters, propertySpec) {
18604
19114
  const zoomDependent = zoomAndFeatureDependent || !featureDependent;
18605
19115
  const type = parameters.type || (supportsInterpolation(propertySpec) ? 'exponential' : 'interval');
18606
19116
  if (isColor) {
18607
- parameters = extend({}, parameters);
19117
+ parameters = Object.assign({}, parameters);
18608
19118
  if (parameters.stops) {
18609
19119
  parameters.stops = parameters.stops.map(stop => {
18610
19120
  return [
@@ -18650,9 +19160,13 @@ function createFunction(parameters, propertySpec) {
18650
19160
  const zoom = stop[0].zoom;
18651
19161
  if (featureFunctions[zoom] === void 0) {
18652
19162
  featureFunctions[zoom] = {
19163
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
18653
19164
  zoom,
19165
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
18654
19166
  type: parameters.type,
19167
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
18655
19168
  property: parameters.property,
19169
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
18656
19170
  default: parameters.default,
18657
19171
  stops: []
18658
19172
  };
@@ -18674,28 +19188,32 @@ function createFunction(parameters, propertySpec) {
18674
19188
  return {
18675
19189
  kind: 'composite',
18676
19190
  interpolationType,
19191
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
18677
19192
  interpolationFactor: Interpolate.interpolationFactor.bind(void 0, interpolationType),
18678
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
19193
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access
18679
19194
  zoomStops: featureFunctionStops.map(s => s[0]),
18680
19195
  evaluate({zoom}, properties) {
18681
19196
  return evaluateExponentialFunction({
18682
19197
  stops: featureFunctionStops,
19198
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
18683
19199
  base: parameters.base
18684
19200
  }, propertySpec, zoom).evaluate(zoom, properties);
18685
19201
  }
18686
19202
  };
18687
19203
  } else if (zoomDependent) {
18688
- const interpolationType = type === 'exponential' ? {
19204
+ const interpolationType = type === 'exponential' ? // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
19205
+ {
18689
19206
  name: 'exponential',
18690
19207
  base: parameters.base !== void 0 ? parameters.base : 1
18691
19208
  } : null;
18692
19209
  return {
18693
19210
  kind: 'camera',
18694
19211
  interpolationType,
19212
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
18695
19213
  interpolationFactor: Interpolate.interpolationFactor.bind(void 0, interpolationType),
18696
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
19214
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
18697
19215
  zoomStops: parameters.stops.map(s => s[0]),
18698
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
19216
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call
18699
19217
  evaluate: ({zoom}) => innerFun(parameters, propertySpec, zoom, hashedStops, categoricalKeyType)
18700
19218
  };
18701
19219
  } else {
@@ -18748,7 +19266,9 @@ function evaluateExponentialFunction(parameters, propertySpec, input) {
18748
19266
  if (input >= parameters.stops[n - 1][0])
18749
19267
  return parameters.stops[n - 1][1];
18750
19268
  const index = findStopLessThanOrEqualTo(parameters.stops.map(stop => stop[0]), input);
18751
- const t = interpolationFactor(input, base, parameters.stops[index][0], parameters.stops[index + 1][0]);
19269
+ const t = interpolationFactor(input, base, // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
19270
+ parameters.stops[index][0], // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
19271
+ parameters.stops[index + 1][0]);
18752
19272
  const outputLower = parameters.stops[index][1];
18753
19273
  const outputUpper = parameters.stops[index + 1][1];
18754
19274
  let interp = interpolate$1[propertySpec.type] || identityFunction;
@@ -18932,16 +19452,20 @@ function createPropertyExpression(expression, propertySpec, scope, options, icon
18932
19452
  return error([new ParsingError$1('', '"interpolate" expressions cannot be used with this property')]);
18933
19453
  }
18934
19454
  if (!zoomCurve) {
18935
- return success(isFeatureConstant$1 && isLineProgressConstant ? new ZoomConstantExpression('constant', expression.value, isLightConstant, isLineProgressConstant) : new ZoomConstantExpression('source', expression.value, isLightConstant, isLineProgressConstant));
19455
+ return success(isFeatureConstant$1 && isLineProgressConstant ? // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
19456
+ new ZoomConstantExpression('constant', expression.value, isLightConstant, isLineProgressConstant) : // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
19457
+ new ZoomConstantExpression('source', expression.value, isLightConstant, isLineProgressConstant));
18936
19458
  }
18937
19459
  const interpolationType = zoomCurve instanceof Interpolate ? zoomCurve.interpolation : void 0;
18938
- return success(isFeatureConstant$1 && isLineProgressConstant ? new ZoomDependentExpression('camera', expression.value, zoomCurve.labels, interpolationType, isLightConstant, isLineProgressConstant) : new ZoomDependentExpression('composite', expression.value, zoomCurve.labels, interpolationType, isLightConstant, isLineProgressConstant));
19460
+ return success(isFeatureConstant$1 && isLineProgressConstant ? // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
19461
+ new ZoomDependentExpression('camera', expression.value, zoomCurve.labels, interpolationType, isLightConstant, isLineProgressConstant) : // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
19462
+ new ZoomDependentExpression('composite', expression.value, zoomCurve.labels, interpolationType, isLightConstant, isLineProgressConstant));
18939
19463
  }
18940
19464
  class StylePropertyFunction {
18941
19465
  constructor(parameters, specification) {
18942
19466
  this._parameters = parameters;
18943
19467
  this._specification = specification;
18944
- extend(this, createFunction(this._parameters, this._specification));
19468
+ Object.assign(this, createFunction(this._parameters, this._specification));
18945
19469
  }
18946
19470
  static deserialize(serialized) {
18947
19471
  return new StylePropertyFunction(serialized._parameters, serialized._specification);
@@ -19431,7 +19955,9 @@ ${ JSON.stringify(filterExp, null, 2) }
19431
19955
  filterFunc = filterFunc;
19432
19956
  const needGeometry = geometryNeeded(staticFilter);
19433
19957
  return {
19958
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
19434
19959
  filter: filterFunc,
19960
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
19435
19961
  dynamicFilter: dynamicFilterFunc ? dynamicFilterFunc : void 0,
19436
19962
  needGeometry,
19437
19963
  needFeature: !!needFeature
@@ -19546,9 +20072,17 @@ function convertFilter$1(filter) {
19546
20072
  const op = filter[0];
19547
20073
  if (filter.length <= 1)
19548
20074
  return op !== 'any';
19549
- const converted = op === '==' ? convertComparisonOp$1(filter[1], filter[2], '==') : op === '!=' ? convertNegation(convertComparisonOp$1(filter[1], filter[2], '==')) : op === '<' || op === '>' || op === '<=' || op === '>=' ? convertComparisonOp$1(filter[1], filter[2], op) : op === 'any' ? convertDisjunctionOp(filter.slice(1)) : // @ts-expect-error - TS2769 - No overload matches this call.
20075
+ const converted = // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
20076
+ op === '==' ? convertComparisonOp$1(filter[1], filter[2], '==') : // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
20077
+ op === '!=' ? convertNegation(convertComparisonOp$1(filter[1], filter[2], '==')) : op === '<' || op === '>' || op === '<=' || // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
20078
+ op === '>=' ? convertComparisonOp$1(filter[1], filter[2], op) : // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
20079
+ op === 'any' ? convertDisjunctionOp(filter.slice(1)) : // @ts-expect-error - TS2769 - No overload matches this call.
19550
20080
  op === 'all' ? ['all'].concat(filter.slice(1).map(convertFilter$1)) : // @ts-expect-error - TS2769 - No overload matches this call.
19551
- op === 'none' ? ['all'].concat(filter.slice(1).map(convertFilter$1).map(convertNegation)) : op === 'in' ? convertInOp$1(filter[1], filter.slice(2)) : op === '!in' ? convertNegation(convertInOp$1(filter[1], filter.slice(2))) : op === 'has' ? convertHasOp$1(filter[1]) : op === '!has' ? convertNegation(convertHasOp$1(filter[1])) : true;
20081
+ op === 'none' ? ['all'].concat(filter.slice(1).map(convertFilter$1).map(convertNegation)) : // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
20082
+ op === 'in' ? convertInOp$1(filter[1], filter.slice(2)) : // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
20083
+ op === '!in' ? convertNegation(convertInOp$1(filter[1], filter.slice(2))) : // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
20084
+ op === 'has' ? convertHasOp$1(filter[1]) : // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
20085
+ op === '!has' ? convertNegation(convertHasOp$1(filter[1])) : true;
19552
20086
  return converted;
19553
20087
  }
19554
20088
  function convertComparisonOp$1(property, value, op) {
@@ -20634,8 +21168,9 @@ function validateImport(options) {
20634
21168
  value: value.__line__,
20635
21169
  enumerable: false
20636
21170
  });
20637
- let errors = validateObject(extend({}, options, {
21171
+ let errors = validateObject(Object.assign({}, options, {
20638
21172
  value: importSpec,
21173
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
20639
21174
  valueSpec: styleSpec.import
20640
21175
  }));
20641
21176
  if (unbundle(importSpec.id) === '') {
@@ -20683,6 +21218,7 @@ function validateArray(options) {
20683
21218
  errors = errors.concat(validateArrayElement({
20684
21219
  array,
20685
21220
  arrayIndex: i,
21221
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
20686
21222
  value: array[i],
20687
21223
  valueSpec: arrayElementSpec,
20688
21224
  style,
@@ -20748,6 +21284,7 @@ function validateFunction(options) {
20748
21284
  const errors = validateObject({
20749
21285
  key: options.key,
20750
21286
  value: options.value,
21287
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
20751
21288
  valueSpec: options.styleSpec.function,
20752
21289
  style: options.style,
20753
21290
  styleSpec: options.styleSpec,
@@ -20911,15 +21448,20 @@ function validateExpression(options) {
20911
21448
  });
20912
21449
  }
20913
21450
  const expressionObj = expression.value.expression || expression.value._styleExpression.expression;
20914
- if (options.expressionContext === 'property' && options.propertyKey === 'text-font' && !expressionObj.outputDefined()) {
21451
+ if (options.expressionContext === 'property' && options.propertyKey === 'text-font' && // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
21452
+ !expressionObj.outputDefined()) {
20915
21453
  return [new ValidationError(options.key, options.value, `Invalid data expression for "${ options.propertyKey }". Output values must be contained as literals within the expression.`)];
20916
21454
  }
20917
- if (options.expressionContext === 'property' && options.propertyType === 'layout' && !isStateConstant(expressionObj)) {
21455
+ if (options.expressionContext === 'property' && options.propertyType === 'layout' && // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
21456
+ !isStateConstant(expressionObj)) {
20918
21457
  return [new ValidationError(options.key, options.value, '"feature-state" data expressions are not supported with layout properties.')];
20919
21458
  }
20920
21459
  if (options.expressionContext === 'filter') {
20921
21460
  return disallowedFilterParameters(expressionObj, options);
20922
21461
  }
21462
+ if (options.expressionContext === 'appearance') {
21463
+ return checkDisallowedParameters(expressionObj, options);
21464
+ }
20923
21465
  if (options.expressionContext && options.expressionContext.indexOf('cluster') === 0) {
20924
21466
  if (!isGlobalPropertyConstant(expressionObj, [
20925
21467
  'zoom',
@@ -20960,6 +21502,28 @@ function disallowedFilterParameters(e, options) {
20960
21502
  });
20961
21503
  return errors;
20962
21504
  }
21505
+ function checkDisallowedParameters(e, options) {
21506
+ const allowedParameters = /* @__PURE__ */
21507
+ new Set();
21508
+ if (options.valueSpec && options.valueSpec.expression) {
21509
+ for (const param of options.valueSpec.expression.parameters) {
21510
+ allowedParameters.add(param);
21511
+ }
21512
+ }
21513
+ if (allowedParameters.size === 0) {
21514
+ return [];
21515
+ }
21516
+ const errors = [];
21517
+ if (e instanceof CompoundExpression) {
21518
+ if (!allowedParameters.has(e.name)) {
21519
+ return [new ValidationError(options.key, options.value, `["${ e.name }"] is not an allowed parameter`)];
21520
+ }
21521
+ }
21522
+ e.eachChild(arg => {
21523
+ errors.push(...checkDisallowedParameters(arg, options));
21524
+ });
21525
+ return errors;
21526
+ }
20963
21527
 
20964
21528
  function validateBoolean(options) {
20965
21529
  const value = options.value;
@@ -21000,8 +21564,9 @@ function validateEnum(options) {
21000
21564
  function validateFilter(options) {
21001
21565
  if (isExpressionFilter(deepUnbundle(options.value))) {
21002
21566
  const layerType = options.layerType || 'fill';
21003
- return validateExpression(extend({}, options, {
21567
+ return validateExpression(Object.assign({}, options, {
21004
21568
  expressionContext: 'filter',
21569
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
21005
21570
  valueSpec: options.styleSpec[`filter_${ layerType }`]
21006
21571
  }));
21007
21572
  } else {
@@ -21021,6 +21586,7 @@ function validateNonExpressionFilter(options) {
21021
21586
  let errors = validateEnum({
21022
21587
  key: `${ key }[0]`,
21023
21588
  value: value[0],
21589
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
21024
21590
  valueSpec: styleSpec.filter_operator
21025
21591
  });
21026
21592
  switch (unbundle(value[0])) {
@@ -21052,6 +21618,7 @@ function validateNonExpressionFilter(options) {
21052
21618
  errors = errors.concat(validateEnum({
21053
21619
  key: `${ key }[${ i }]`,
21054
21620
  value: value[i],
21621
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
21055
21622
  valueSpec: styleSpec.geometry_type
21056
21623
  }));
21057
21624
  } else if (!isString(value[i]) && !isNumber(value[i]) && !isBoolean(value[i])) {
@@ -21131,6 +21698,7 @@ function validateProperty(options, propertyType) {
21131
21698
  return validate({
21132
21699
  key,
21133
21700
  value,
21701
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
21134
21702
  valueSpec: styleSpec.transition,
21135
21703
  style,
21136
21704
  styleSpec
@@ -21168,6 +21736,7 @@ Use an identity property function instead: ${ example }.`)];
21168
21736
  return errors.concat(validate({
21169
21737
  key: options.key,
21170
21738
  value,
21739
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
21171
21740
  valueSpec,
21172
21741
  style,
21173
21742
  styleSpec,
@@ -21177,6 +21746,73 @@ Use an identity property function instead: ${ example }.`)];
21177
21746
  }));
21178
21747
  }
21179
21748
 
21749
+ function validateAppearance(options) {
21750
+ const {key, layer, layerType} = options;
21751
+ const value = unbundle(options.value);
21752
+ const name = unbundle(value.name);
21753
+ const condition = unbundle(value.condition);
21754
+ const errors = validateObject({
21755
+ key,
21756
+ value,
21757
+ valueSpec: options.styleSpec.appearance,
21758
+ style: options.style,
21759
+ styleSpec: options.styleSpec,
21760
+ objectElementValidators: {
21761
+ condition: options2 => validateCondition(Object.assign({
21762
+ layer,
21763
+ layerType
21764
+ }, options2)),
21765
+ properties: options2 => validateProperties(Object.assign({
21766
+ layer,
21767
+ layerType
21768
+ }, options2))
21769
+ }
21770
+ });
21771
+ if (name !== 'hidden' && !condition) {
21772
+ errors.push(new ValidationError(options.key, 'name', `Appearance with name different than "hidden" must have a condition`));
21773
+ }
21774
+ return errors;
21775
+ }
21776
+ function validateProperties(options) {
21777
+ const errors = [];
21778
+ const {styleSpec, layer, layerType} = options;
21779
+ const paintProperties = styleSpec[`paint_${ layerType }`];
21780
+ const layoutProperties = styleSpec[`layout_${ layerType }`];
21781
+ const properties = options.object[options.objectKey];
21782
+ for (const propertyKey in properties) {
21783
+ const propertyType = propertyKey in paintProperties ? 'paint' : propertyKey in layoutProperties ? 'layout' : void 0;
21784
+ if (!propertyType) {
21785
+ errors.push(new ValidationError(options.key, propertyKey, `unknown property "${ propertyKey }" for layer type "${ layerType }"`));
21786
+ continue;
21787
+ }
21788
+ const propertyValidationOptions = Object.assign({}, options, {
21789
+ key: `${ options.key }.${ propertyKey }`,
21790
+ object: properties,
21791
+ objectKey: propertyKey,
21792
+ layer,
21793
+ layerType,
21794
+ value: properties[propertyKey],
21795
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
21796
+ valueSpec: propertyType === 'paint' ? paintProperties[propertyKey] : layoutProperties[propertyKey]
21797
+ });
21798
+ errors.push(...validateProperty(propertyValidationOptions, propertyType));
21799
+ }
21800
+ return errors;
21801
+ }
21802
+ function validateCondition(options) {
21803
+ const errors = [];
21804
+ const appearance = options.object;
21805
+ const condition = appearance.condition;
21806
+ errors.push(...validateExpression({
21807
+ key: options.key,
21808
+ value: condition,
21809
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
21810
+ valueSpec: v8['appearance']['condition'],
21811
+ expressionContext: 'appearance'
21812
+ }));
21813
+ return errors;
21814
+ }
21815
+
21180
21816
  function validatePaintProperty(options) {
21181
21817
  return validateProperty(options, 'paint');
21182
21818
  }
@@ -21266,6 +21902,7 @@ function validateLayer(options) {
21266
21902
  errors = errors.concat(validateObject({
21267
21903
  key,
21268
21904
  value: layer,
21905
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
21269
21906
  valueSpec: styleSpec.layer,
21270
21907
  style: options.style,
21271
21908
  styleSpec: options.styleSpec,
@@ -21279,6 +21916,7 @@ function validateLayer(options) {
21279
21916
  return validate({
21280
21917
  key: `${ key }.type`,
21281
21918
  value: layer.type,
21919
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
21282
21920
  valueSpec: styleSpec.layer.type,
21283
21921
  style: options.style,
21284
21922
  styleSpec: options.styleSpec,
@@ -21287,7 +21925,7 @@ function validateLayer(options) {
21287
21925
  });
21288
21926
  },
21289
21927
  filter(options2) {
21290
- return validateFilter(extend({ layerType: type }, options2));
21928
+ return validateFilter(Object.assign({ layerType: type }, options2));
21291
21929
  },
21292
21930
  layout(options2) {
21293
21931
  return validateObject({
@@ -21299,7 +21937,7 @@ function validateLayer(options) {
21299
21937
  styleSpec: options2.styleSpec,
21300
21938
  objectElementValidators: {
21301
21939
  '*'(options3) {
21302
- return validateLayoutProperty(extend({ layerType: type }, options3));
21940
+ return validateLayoutProperty(Object.assign({ layerType: type }, options3));
21303
21941
  }
21304
21942
  }
21305
21943
  });
@@ -21314,13 +21952,41 @@ function validateLayer(options) {
21314
21952
  styleSpec: options2.styleSpec,
21315
21953
  objectElementValidators: {
21316
21954
  '*'(options3) {
21317
- return validatePaintProperty(extend({
21955
+ return validatePaintProperty(Object.assign({
21318
21956
  layerType: type,
21319
21957
  layer
21320
21958
  }, options3));
21321
21959
  }
21322
21960
  }
21323
21961
  });
21962
+ },
21963
+ appearances(options2) {
21964
+ const validationErrors = validateArray({
21965
+ key: options2.key,
21966
+ value: options2.value,
21967
+ valueSpec: options2.valueSpec,
21968
+ style: options2.style,
21969
+ styleSpec: options2.styleSpec,
21970
+ arrayElementValidator: options3 => validateAppearance(Object.assign({
21971
+ layerType: type,
21972
+ layer
21973
+ }, options3))
21974
+ });
21975
+ const appearances = Array.isArray(options2.value) ? options2.value : [];
21976
+ const dedupedNames = /* @__PURE__ */
21977
+ new Set();
21978
+ appearances.forEach((a, index) => {
21979
+ const name = unbundle(a.name);
21980
+ if (name) {
21981
+ if (dedupedNames.has(name)) {
21982
+ const layerId = unbundle(layer.id);
21983
+ validationErrors.push(new ValidationError(options2.key, name, `Duplicated appearance name "${ name }" for layer "${ layerId }"`));
21984
+ } else {
21985
+ dedupedNames.add(name);
21986
+ }
21987
+ }
21988
+ });
21989
+ return validationErrors;
21324
21990
  }
21325
21991
  }
21326
21992
  }));
@@ -21366,6 +22032,7 @@ function validateSource(options) {
21366
22032
  errors = errors.concat(validateObject({
21367
22033
  key,
21368
22034
  value,
22035
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
21369
22036
  valueSpec: styleSpec[`source_${ type.replace('-', '_') }`],
21370
22037
  style: options.style,
21371
22038
  styleSpec,
@@ -21376,6 +22043,7 @@ function validateSource(options) {
21376
22043
  errors = validateObject({
21377
22044
  key,
21378
22045
  value,
22046
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
21379
22047
  valueSpec: styleSpec.source_geojson,
21380
22048
  style,
21381
22049
  styleSpec,
@@ -21416,6 +22084,7 @@ function validateSource(options) {
21416
22084
  return validateObject({
21417
22085
  key,
21418
22086
  value,
22087
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
21419
22088
  valueSpec: styleSpec.source_video,
21420
22089
  style,
21421
22090
  styleSpec
@@ -21424,6 +22093,7 @@ function validateSource(options) {
21424
22093
  return validateObject({
21425
22094
  key,
21426
22095
  value,
22096
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
21427
22097
  valueSpec: styleSpec.source_image,
21428
22098
  style,
21429
22099
  styleSpec
@@ -21434,7 +22104,8 @@ function validateSource(options) {
21434
22104
  return validateEnum({
21435
22105
  key: `${ key }.type`,
21436
22106
  value: value.type,
21437
- valueSpec: { values: getSourceTypeValues(styleSpec) }});
22107
+ valueSpec: { values: getSourceTypeValues(styleSpec) }
22108
+ });
21438
22109
  }
21439
22110
  }
21440
22111
  function getSourceTypeValues(styleSpec) {
@@ -21544,6 +22215,7 @@ function validateLight(options) {
21544
22215
  errors = errors.concat(validate({
21545
22216
  key,
21546
22217
  value: light[key],
22218
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
21547
22219
  valueSpec: styleSpec.transition,
21548
22220
  style,
21549
22221
  styleSpec
@@ -21552,6 +22224,7 @@ function validateLight(options) {
21552
22224
  errors = errors.concat(validate({
21553
22225
  key,
21554
22226
  value: light[key],
22227
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
21555
22228
  valueSpec: lightSpec[key],
21556
22229
  style,
21557
22230
  styleSpec
@@ -21627,6 +22300,7 @@ function validateLights(options) {
21627
22300
  errors = errors.concat(validate({
21628
22301
  key: key2,
21629
22302
  value: light[key2],
22303
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
21630
22304
  valueSpec: styleSpec.transition,
21631
22305
  style,
21632
22306
  styleSpec
@@ -21637,6 +22311,7 @@ function validateLights(options) {
21637
22311
  errors = errors.concat(validate({
21638
22312
  key: propertyKey,
21639
22313
  value: properties[propertyKey],
22314
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
21640
22315
  valueSpec: lightPropertySpec[propertyKey],
21641
22316
  style,
21642
22317
  styleSpec
@@ -21648,6 +22323,7 @@ function validateLights(options) {
21648
22323
  errors = errors.concat(validate({
21649
22324
  key: key2,
21650
22325
  value: light[key2],
22326
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
21651
22327
  valueSpec: lightSpec[key2],
21652
22328
  style,
21653
22329
  styleSpec
@@ -21688,6 +22364,7 @@ function validateTerrain(options) {
21688
22364
  errors = errors.concat(validate({
21689
22365
  key: key2,
21690
22366
  value: terrain[key2],
22367
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
21691
22368
  valueSpec: styleSpec.transition,
21692
22369
  style,
21693
22370
  styleSpec
@@ -21696,6 +22373,7 @@ function validateTerrain(options) {
21696
22373
  errors = errors.concat(validate({
21697
22374
  key: key2,
21698
22375
  value: terrain[key2],
22376
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
21699
22377
  valueSpec: terrainSpec[key2],
21700
22378
  style,
21701
22379
  styleSpec
@@ -21747,6 +22425,7 @@ function validateFog(options) {
21747
22425
  errors = errors.concat(validate({
21748
22426
  key,
21749
22427
  value: fog[key],
22428
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
21750
22429
  valueSpec: styleSpec.transition,
21751
22430
  style,
21752
22431
  styleSpec
@@ -21755,6 +22434,7 @@ function validateFog(options) {
21755
22434
  errors = errors.concat(validate({
21756
22435
  key,
21757
22436
  value: fog[key],
22437
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
21758
22438
  valueSpec: fogSpec[key],
21759
22439
  style,
21760
22440
  styleSpec
@@ -21793,6 +22473,7 @@ function validateProjection(options) {
21793
22473
  errors = errors.concat(validate({
21794
22474
  key,
21795
22475
  value: projection[key],
22476
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
21796
22477
  valueSpec: projectionSpec[key],
21797
22478
  style,
21798
22479
  styleSpec
@@ -21825,6 +22506,7 @@ function validateIconset(options) {
21825
22506
  errors = errors.concat(validateObject({
21826
22507
  key,
21827
22508
  value: iconset,
22509
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
21828
22510
  valueSpec: styleSpec[`iconset_${ type }`],
21829
22511
  style,
21830
22512
  styleSpec
@@ -21882,7 +22564,10 @@ function validate(options, arrayAsExpression = false) {
21882
22564
  }
21883
22565
  return errors2;
21884
22566
  }
21885
- const errors = validateObject(Object.assign({}, options, { valueSpec: valueSpec.type ? styleSpec[valueSpec.type] : valueSpec }));
22567
+ const errors = validateObject(Object.assign({}, options, {
22568
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
22569
+ valueSpec: valueSpec.type ? styleSpec[valueSpec.type] : valueSpec
22570
+ }));
21886
22571
  return errors;
21887
22572
  }
21888
22573
 
@@ -21917,6 +22602,7 @@ function validateObject(options) {
21917
22602
  errors = errors.concat(validateElement({
21918
22603
  key: (key ? `${ key }.` : key) + objectKey,
21919
22604
  value: object[objectKey],
22605
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
21920
22606
  valueSpec: elementSpec,
21921
22607
  style,
21922
22608
  styleSpec,
@@ -21956,6 +22642,7 @@ function validateStyle$2(style, styleSpec = v8, options = {}) {
21956
22642
  const errors = validateObject({
21957
22643
  key: options.key || '',
21958
22644
  value: style,
22645
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
21959
22646
  valueSpec: Object.assign(styleSpec.$root, // Skip validation of the root properties that are not defined in the style spec (e.g. 'owner').
21960
22647
  { '*': { type: '*' } }),
21961
22648
  styleSpec,