@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.
- package/deref.ts +3 -0
- package/diff.ts +63 -0
- package/dist/index.cjs +741 -54
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +205 -40
- package/dist/index.es.js +741 -54
- package/dist/index.es.js.map +1 -1
- package/expression/compound_expression.ts +4 -0
- package/expression/definitions/assertion.ts +7 -0
- package/expression/definitions/case.ts +2 -1
- package/expression/definitions/coalesce.ts +4 -0
- package/expression/definitions/coercion.ts +12 -0
- package/expression/definitions/collator.ts +8 -5
- package/expression/definitions/comparison.ts +12 -5
- package/expression/definitions/config.ts +12 -0
- package/expression/definitions/distance.ts +13 -2
- package/expression/definitions/format.ts +10 -0
- package/expression/definitions/image.ts +3 -0
- package/expression/definitions/in.ts +5 -0
- package/expression/definitions/index.ts +62 -10
- package/expression/definitions/index_of.ts +6 -0
- package/expression/definitions/interpolate.ts +5 -1
- package/expression/definitions/length.ts +2 -0
- package/expression/definitions/let.ts +1 -0
- package/expression/definitions/match.ts +5 -0
- package/expression/definitions/number_format.ts +7 -0
- package/expression/definitions/slice.ts +4 -0
- package/expression/definitions/within.ts +1 -0
- package/expression/index.ts +28 -19
- package/expression/parsing_context.ts +2 -0
- package/expression/types/image_variant.ts +3 -0
- package/expression/types.ts +1 -2
- package/expression/values.ts +1 -0
- package/feature_filter/convert.ts +9 -1
- package/feature_filter/index.ts +41 -1
- package/format.ts +5 -0
- package/function/convert.ts +5 -0
- package/function/index.ts +79 -25
- package/group_by_layout.ts +4 -5
- package/migrate/v8.ts +42 -3
- package/migrate/v9.ts +5 -0
- package/migrate.ts +1 -0
- package/package.json +1 -1
- package/read_style.ts +2 -0
- package/reference/v8.json +463 -18
- package/rollup.config.js +1 -0
- package/style-spec.ts +187 -74
- package/test.js +4 -0
- package/types.ts +74 -5
- package/util/geometry_util.ts +4 -0
- package/validate/validate.ts +3 -8
- package/validate/validate_appearance.ts +101 -0
- package/validate/validate_array.ts +6 -4
- package/validate/validate_enum.ts +2 -7
- package/validate/validate_expression.ts +48 -3
- package/validate/validate_filter.ts +5 -3
- package/validate/validate_fog.ts +6 -0
- package/validate/validate_function.ts +2 -0
- package/validate/validate_iconset.ts +1 -0
- package/validate/validate_import.ts +2 -2
- package/validate/validate_layer.ts +37 -4
- package/validate/validate_light.ts +6 -0
- package/validate/validate_lights.ts +9 -0
- package/validate/validate_model.ts +1 -2
- package/validate/validate_number.ts +4 -4
- package/validate/validate_object.ts +7 -0
- package/validate/validate_projection.ts +2 -0
- package/validate/validate_property.ts +15 -4
- package/validate/validate_rain.ts +5 -0
- package/validate/validate_snow.ts +5 -0
- package/validate/validate_source.ts +13 -3
- package/validate/validate_style.ts +1 -0
- package/validate/validate_terrain.ts +6 -0
- package/validate_mapbox_api_supported.ts +1 -0
- package/visit.ts +2 -0
- package/util/extend.ts +0 -9
package/dist/index.cjs
CHANGED
|
@@ -1275,6 +1275,125 @@
|
|
|
1275
1275
|
}
|
|
1276
1276
|
}
|
|
1277
1277
|
};
|
|
1278
|
+
var modelNodeOverride = {
|
|
1279
|
+
orientation: {
|
|
1280
|
+
type: "array",
|
|
1281
|
+
value: "number",
|
|
1282
|
+
length: 3,
|
|
1283
|
+
"default": [
|
|
1284
|
+
0,
|
|
1285
|
+
0,
|
|
1286
|
+
0
|
|
1287
|
+
],
|
|
1288
|
+
period: 360,
|
|
1289
|
+
units: "degrees",
|
|
1290
|
+
doc: "Override the orientation of the model node in euler angles [x, y, z]."
|
|
1291
|
+
}
|
|
1292
|
+
};
|
|
1293
|
+
var modelNodeOverrides = {
|
|
1294
|
+
"*": {
|
|
1295
|
+
type: "modelNodeOverride",
|
|
1296
|
+
doc: "An object defining model node properties to override. Object key is the node name as defined in the model."
|
|
1297
|
+
}
|
|
1298
|
+
};
|
|
1299
|
+
var modelMaterialOverride = {
|
|
1300
|
+
"model-color": {
|
|
1301
|
+
type: "color",
|
|
1302
|
+
doc: "Override the tint color of the material."
|
|
1303
|
+
},
|
|
1304
|
+
"model-color-mix-intensity": {
|
|
1305
|
+
type: "number",
|
|
1306
|
+
doc: "Override the intensity of model-color (on a scale from 0 to 1) in color mix with original 3D model's colors."
|
|
1307
|
+
},
|
|
1308
|
+
"model-opacity": {
|
|
1309
|
+
type: "number",
|
|
1310
|
+
doc: "Override the opacity of the material."
|
|
1311
|
+
},
|
|
1312
|
+
"model-emissive-strength": {
|
|
1313
|
+
type: "number",
|
|
1314
|
+
units: "intensity",
|
|
1315
|
+
doc: "Override strength of the emission of material."
|
|
1316
|
+
}
|
|
1317
|
+
};
|
|
1318
|
+
var modelMaterialOverrides = {
|
|
1319
|
+
"*": {
|
|
1320
|
+
type: "modelMaterialOverride",
|
|
1321
|
+
doc: "An object defining material properties to override. Object key is the material name as defined in the model."
|
|
1322
|
+
}
|
|
1323
|
+
};
|
|
1324
|
+
var modelSourceModel = {
|
|
1325
|
+
uri: {
|
|
1326
|
+
type: "string",
|
|
1327
|
+
required: true,
|
|
1328
|
+
doc: "A URL to a model resource. Supported protocols are `http:`, `https:`, and `mapbox://<Model ID>`."
|
|
1329
|
+
},
|
|
1330
|
+
position: {
|
|
1331
|
+
type: "array",
|
|
1332
|
+
value: "number",
|
|
1333
|
+
length: 2,
|
|
1334
|
+
required: false,
|
|
1335
|
+
"default": [
|
|
1336
|
+
0,
|
|
1337
|
+
0
|
|
1338
|
+
],
|
|
1339
|
+
minimum: [
|
|
1340
|
+
-180,
|
|
1341
|
+
-90
|
|
1342
|
+
],
|
|
1343
|
+
maximum: [
|
|
1344
|
+
180,
|
|
1345
|
+
90
|
|
1346
|
+
],
|
|
1347
|
+
doc: "Position of the model in longitude and latitude [lng, lat]."
|
|
1348
|
+
},
|
|
1349
|
+
orientation: {
|
|
1350
|
+
type: "array",
|
|
1351
|
+
value: "number",
|
|
1352
|
+
length: 3,
|
|
1353
|
+
required: false,
|
|
1354
|
+
"default": [
|
|
1355
|
+
0,
|
|
1356
|
+
0,
|
|
1357
|
+
0
|
|
1358
|
+
],
|
|
1359
|
+
period: 360,
|
|
1360
|
+
units: "degrees",
|
|
1361
|
+
doc: "Orientation of the model in euler angles [x, y, z]."
|
|
1362
|
+
},
|
|
1363
|
+
nodeOverrides: {
|
|
1364
|
+
type: "modelNodeOverrides",
|
|
1365
|
+
required: false,
|
|
1366
|
+
doc: "A collection of node overrides."
|
|
1367
|
+
},
|
|
1368
|
+
materialOverrides: {
|
|
1369
|
+
type: "modelMaterialOverrides",
|
|
1370
|
+
required: false,
|
|
1371
|
+
doc: "A collection of material overrides."
|
|
1372
|
+
},
|
|
1373
|
+
nodeOverrideNames: {
|
|
1374
|
+
type: "array",
|
|
1375
|
+
value: "string",
|
|
1376
|
+
doc: "An array of one or more model node names whose transform will be overridden from model layer paint properties.",
|
|
1377
|
+
required: false
|
|
1378
|
+
},
|
|
1379
|
+
materialOverrideNames: {
|
|
1380
|
+
type: "array",
|
|
1381
|
+
value: "string",
|
|
1382
|
+
doc: "An array of one or more model material names whose properties will be overridden from model layer paint properties.",
|
|
1383
|
+
required: false
|
|
1384
|
+
},
|
|
1385
|
+
featureProperties: {
|
|
1386
|
+
type: "*",
|
|
1387
|
+
doc: "An object defining custom properties of the model. Properties are accessible as feature properties in expressions.",
|
|
1388
|
+
required: false
|
|
1389
|
+
}
|
|
1390
|
+
};
|
|
1391
|
+
var modelSourceModels = {
|
|
1392
|
+
"*": {
|
|
1393
|
+
type: "modelSourceModel",
|
|
1394
|
+
doc: "A 3D model and its properties."
|
|
1395
|
+
}
|
|
1396
|
+
};
|
|
1278
1397
|
var source_model = {
|
|
1279
1398
|
type: {
|
|
1280
1399
|
required: true,
|
|
@@ -1302,7 +1421,11 @@
|
|
|
1302
1421
|
tiles: {
|
|
1303
1422
|
type: "array",
|
|
1304
1423
|
value: "string",
|
|
1305
|
-
doc: "An array of one or more tile source URLs, as in the TileJSON spec."
|
|
1424
|
+
doc: "An array of one or more tile source URLs, as in the TileJSON spec. Requires `batched-model` source type."
|
|
1425
|
+
},
|
|
1426
|
+
models: {
|
|
1427
|
+
type: "modelSourceModels",
|
|
1428
|
+
doc: "Defines properties of 3D models in collection. Requires `model` source type."
|
|
1306
1429
|
}
|
|
1307
1430
|
};
|
|
1308
1431
|
var layer = {
|
|
@@ -1377,6 +1500,9 @@
|
|
|
1377
1500
|
building: {
|
|
1378
1501
|
doc: "A procedural 3D building.",
|
|
1379
1502
|
"sdk-support": {
|
|
1503
|
+
js: "3.16.0",
|
|
1504
|
+
android: "11.16.0",
|
|
1505
|
+
ios: "11.16.0"
|
|
1380
1506
|
},
|
|
1381
1507
|
experimental: true,
|
|
1382
1508
|
"private": true
|
|
@@ -1526,12 +1652,25 @@
|
|
|
1526
1652
|
};
|
|
1527
1653
|
var appearance = {
|
|
1528
1654
|
condition: {
|
|
1529
|
-
type: "
|
|
1530
|
-
doc: "A boolean expression that determines when this appearance should be applied."
|
|
1655
|
+
type: "boolean",
|
|
1656
|
+
doc: "A boolean expression that determines when this appearance should be applied.",
|
|
1657
|
+
expression: {
|
|
1658
|
+
interpolated: false,
|
|
1659
|
+
parameters: [
|
|
1660
|
+
"zoom",
|
|
1661
|
+
"pitch",
|
|
1662
|
+
"feature",
|
|
1663
|
+
"feature-state",
|
|
1664
|
+
"measure-light",
|
|
1665
|
+
"distance-from-center"
|
|
1666
|
+
]
|
|
1667
|
+
},
|
|
1668
|
+
"property-type": "data-driven"
|
|
1531
1669
|
},
|
|
1532
1670
|
name: {
|
|
1533
1671
|
type: "string",
|
|
1534
|
-
doc: "Optional name for this appearance. Non-empty names should be unique within a layer."
|
|
1672
|
+
doc: "Optional name for this appearance. Non-empty names should be unique within a layer.",
|
|
1673
|
+
"property-type": "constant"
|
|
1535
1674
|
},
|
|
1536
1675
|
properties: {
|
|
1537
1676
|
type: "*",
|
|
@@ -1961,6 +2100,9 @@
|
|
|
1961
2100
|
doc: "Whether this layer is displayed.",
|
|
1962
2101
|
"sdk-support": {
|
|
1963
2102
|
"basic functionality": {
|
|
2103
|
+
js: "3.16.0",
|
|
2104
|
+
android: "11.16.0",
|
|
2105
|
+
ios: "11.16.0"
|
|
1964
2106
|
}
|
|
1965
2107
|
},
|
|
1966
2108
|
expression: {
|
|
@@ -1976,8 +2118,14 @@
|
|
|
1976
2118
|
"private": true,
|
|
1977
2119
|
"sdk-support": {
|
|
1978
2120
|
"basic functionality": {
|
|
2121
|
+
js: "3.16.0",
|
|
2122
|
+
android: "11.16.0",
|
|
2123
|
+
ios: "11.16.0"
|
|
1979
2124
|
},
|
|
1980
2125
|
"data-driven styling": {
|
|
2126
|
+
js: "3.16.0",
|
|
2127
|
+
android: "11.16.0",
|
|
2128
|
+
ios: "11.16.0"
|
|
1981
2129
|
}
|
|
1982
2130
|
},
|
|
1983
2131
|
expression: {
|
|
@@ -1998,8 +2146,44 @@
|
|
|
1998
2146
|
"property-type": "data-driven",
|
|
1999
2147
|
"sdk-support": {
|
|
2000
2148
|
"basic functionality": {
|
|
2149
|
+
js: "3.16.0",
|
|
2150
|
+
android: "11.16.0",
|
|
2151
|
+
ios: "11.16.0"
|
|
2152
|
+
},
|
|
2153
|
+
"data-driven styling": {
|
|
2154
|
+
js: "3.16.0",
|
|
2155
|
+
android: "11.16.0",
|
|
2156
|
+
ios: "11.16.0"
|
|
2157
|
+
}
|
|
2158
|
+
},
|
|
2159
|
+
expression: {
|
|
2160
|
+
interpolated: false,
|
|
2161
|
+
parameters: [
|
|
2162
|
+
"feature"
|
|
2163
|
+
]
|
|
2164
|
+
},
|
|
2165
|
+
requires: [
|
|
2166
|
+
"building-facade"
|
|
2167
|
+
]
|
|
2168
|
+
},
|
|
2169
|
+
"building-facade-unit-width": {
|
|
2170
|
+
type: "number",
|
|
2171
|
+
minimum: 1,
|
|
2172
|
+
maximum: 20,
|
|
2173
|
+
"default": 3.1,
|
|
2174
|
+
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).",
|
|
2175
|
+
experimental: true,
|
|
2176
|
+
"property-type": "data-driven",
|
|
2177
|
+
"sdk-support": {
|
|
2178
|
+
"basic functionality": {
|
|
2179
|
+
js: "3.16.0",
|
|
2180
|
+
android: "11.16.0",
|
|
2181
|
+
ios: "11.16.0"
|
|
2001
2182
|
},
|
|
2002
2183
|
"data-driven styling": {
|
|
2184
|
+
js: "3.16.0",
|
|
2185
|
+
android: "11.16.0",
|
|
2186
|
+
ios: "11.16.0"
|
|
2003
2187
|
}
|
|
2004
2188
|
},
|
|
2005
2189
|
expression: {
|
|
@@ -2022,13 +2206,19 @@
|
|
|
2022
2206
|
0.9,
|
|
2023
2207
|
0.9
|
|
2024
2208
|
],
|
|
2025
|
-
doc: "Given as fractions, specifies the percentage of
|
|
2209
|
+
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`.",
|
|
2026
2210
|
experimental: true,
|
|
2027
2211
|
"property-type": "data-driven",
|
|
2028
2212
|
"sdk-support": {
|
|
2029
2213
|
"basic functionality": {
|
|
2214
|
+
js: "3.16.0",
|
|
2215
|
+
android: "11.16.0",
|
|
2216
|
+
ios: "11.16.0"
|
|
2030
2217
|
},
|
|
2031
2218
|
"data-driven styling": {
|
|
2219
|
+
js: "3.16.0",
|
|
2220
|
+
android: "11.16.0",
|
|
2221
|
+
ios: "11.16.0"
|
|
2032
2222
|
}
|
|
2033
2223
|
},
|
|
2034
2224
|
expression: {
|
|
@@ -2072,8 +2262,14 @@
|
|
|
2072
2262
|
"private": true,
|
|
2073
2263
|
"sdk-support": {
|
|
2074
2264
|
"basic functionality": {
|
|
2265
|
+
js: "3.16.0",
|
|
2266
|
+
android: "11.16.0",
|
|
2267
|
+
ios: "11.16.0"
|
|
2075
2268
|
},
|
|
2076
2269
|
"data-driven styling": {
|
|
2270
|
+
js: "3.16.0",
|
|
2271
|
+
android: "11.16.0",
|
|
2272
|
+
ios: "11.16.0"
|
|
2077
2273
|
}
|
|
2078
2274
|
},
|
|
2079
2275
|
expression: {
|
|
@@ -2095,8 +2291,14 @@
|
|
|
2095
2291
|
"private": true,
|
|
2096
2292
|
"sdk-support": {
|
|
2097
2293
|
"basic functionality": {
|
|
2294
|
+
js: "3.16.0",
|
|
2295
|
+
android: "11.16.0",
|
|
2296
|
+
ios: "11.16.0"
|
|
2098
2297
|
},
|
|
2099
2298
|
"data-driven styling": {
|
|
2299
|
+
js: "3.16.0",
|
|
2300
|
+
android: "11.16.0",
|
|
2301
|
+
ios: "11.16.0"
|
|
2100
2302
|
}
|
|
2101
2303
|
},
|
|
2102
2304
|
expression: {
|
|
@@ -2118,14 +2320,114 @@
|
|
|
2118
2320
|
"private": true,
|
|
2119
2321
|
"sdk-support": {
|
|
2120
2322
|
"basic functionality": {
|
|
2323
|
+
js: "3.16.0",
|
|
2324
|
+
android: "11.16.0",
|
|
2325
|
+
ios: "11.16.0"
|
|
2121
2326
|
},
|
|
2122
2327
|
"data-driven styling": {
|
|
2328
|
+
js: "3.16.0",
|
|
2329
|
+
android: "11.16.0",
|
|
2330
|
+
ios: "11.16.0"
|
|
2123
2331
|
}
|
|
2124
2332
|
},
|
|
2125
2333
|
expression: {
|
|
2126
2334
|
interpolated: false
|
|
2127
2335
|
},
|
|
2128
2336
|
"property-type": "data-driven"
|
|
2337
|
+
},
|
|
2338
|
+
"building-flood-light-wall-radius": {
|
|
2339
|
+
"property-type": "data-driven",
|
|
2340
|
+
type: "number",
|
|
2341
|
+
experimental: true,
|
|
2342
|
+
units: "meters",
|
|
2343
|
+
"default": 0,
|
|
2344
|
+
minimum: 0,
|
|
2345
|
+
doc: "The extent of the flood light effect on the walls of the buildings in meters.",
|
|
2346
|
+
requires: [
|
|
2347
|
+
"lights"
|
|
2348
|
+
],
|
|
2349
|
+
transition: true,
|
|
2350
|
+
expression: {
|
|
2351
|
+
interpolated: true,
|
|
2352
|
+
parameters: [
|
|
2353
|
+
"feature",
|
|
2354
|
+
"feature-state"
|
|
2355
|
+
]
|
|
2356
|
+
},
|
|
2357
|
+
"sdk-support": {
|
|
2358
|
+
"basic functionality": {
|
|
2359
|
+
js: "3.16.0",
|
|
2360
|
+
android: "11.16.0",
|
|
2361
|
+
ios: "11.16.0"
|
|
2362
|
+
},
|
|
2363
|
+
"data-driven styling": {
|
|
2364
|
+
js: "3.16.0",
|
|
2365
|
+
android: "11.16.0",
|
|
2366
|
+
ios: "11.16.0"
|
|
2367
|
+
}
|
|
2368
|
+
}
|
|
2369
|
+
},
|
|
2370
|
+
"building-flood-light-ground-radius": {
|
|
2371
|
+
"property-type": "data-driven",
|
|
2372
|
+
type: "number",
|
|
2373
|
+
experimental: true,
|
|
2374
|
+
units: "meters",
|
|
2375
|
+
"default": 0,
|
|
2376
|
+
doc: "The extent of the flood light effect on the ground beneath the buildings in meters.",
|
|
2377
|
+
requires: [
|
|
2378
|
+
"lights"
|
|
2379
|
+
],
|
|
2380
|
+
transition: true,
|
|
2381
|
+
expression: {
|
|
2382
|
+
interpolated: true,
|
|
2383
|
+
parameters: [
|
|
2384
|
+
"feature",
|
|
2385
|
+
"feature-state"
|
|
2386
|
+
]
|
|
2387
|
+
},
|
|
2388
|
+
"sdk-support": {
|
|
2389
|
+
"basic functionality": {
|
|
2390
|
+
js: "3.16.0",
|
|
2391
|
+
android: "11.16.0",
|
|
2392
|
+
ios: "11.16.0"
|
|
2393
|
+
},
|
|
2394
|
+
"data-driven styling": {
|
|
2395
|
+
js: "3.16.0",
|
|
2396
|
+
android: "11.16.0",
|
|
2397
|
+
ios: "11.16.0"
|
|
2398
|
+
}
|
|
2399
|
+
}
|
|
2400
|
+
},
|
|
2401
|
+
"building-flip-roof-orientation": {
|
|
2402
|
+
"property-type": "data-driven",
|
|
2403
|
+
type: "boolean",
|
|
2404
|
+
experimental: true,
|
|
2405
|
+
units: "meters",
|
|
2406
|
+
"default": false,
|
|
2407
|
+
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.",
|
|
2408
|
+
transition: true,
|
|
2409
|
+
requires: [
|
|
2410
|
+
"building-roof-shape"
|
|
2411
|
+
],
|
|
2412
|
+
expression: {
|
|
2413
|
+
interpolated: true,
|
|
2414
|
+
parameters: [
|
|
2415
|
+
"feature",
|
|
2416
|
+
"feature-state"
|
|
2417
|
+
]
|
|
2418
|
+
},
|
|
2419
|
+
"sdk-support": {
|
|
2420
|
+
"basic functionality": {
|
|
2421
|
+
js: "3.16.0",
|
|
2422
|
+
android: "11.16.0",
|
|
2423
|
+
ios: "11.16.0"
|
|
2424
|
+
},
|
|
2425
|
+
"data-driven styling": {
|
|
2426
|
+
js: "3.16.0",
|
|
2427
|
+
android: "11.16.0",
|
|
2428
|
+
ios: "11.16.0"
|
|
2429
|
+
}
|
|
2430
|
+
}
|
|
2129
2431
|
}
|
|
2130
2432
|
};
|
|
2131
2433
|
var layout_line = {
|
|
@@ -2608,6 +2910,11 @@
|
|
|
2608
2910
|
ios: "11.9.0"
|
|
2609
2911
|
}
|
|
2610
2912
|
},
|
|
2913
|
+
requires: [
|
|
2914
|
+
{
|
|
2915
|
+
"symbol-z-elevate": true
|
|
2916
|
+
}
|
|
2917
|
+
],
|
|
2611
2918
|
expression: {
|
|
2612
2919
|
interpolated: false,
|
|
2613
2920
|
parameters: [
|
|
@@ -2760,9 +3067,15 @@
|
|
|
2760
3067
|
0.8,
|
|
2761
3068
|
2
|
|
2762
3069
|
],
|
|
2763
|
-
doc: "
|
|
2764
|
-
minimum:
|
|
2765
|
-
|
|
3070
|
+
doc: "Limits the possible scaling range for `icon-size`, `icon-halo-width`, `icon-halo-blur` properties to be within [min-scale, max-scale]",
|
|
3071
|
+
minimum: [
|
|
3072
|
+
0.1,
|
|
3073
|
+
0.1
|
|
3074
|
+
],
|
|
3075
|
+
maximum: [
|
|
3076
|
+
10,
|
|
3077
|
+
10
|
|
3078
|
+
],
|
|
2766
3079
|
experimental: true,
|
|
2767
3080
|
"private": true,
|
|
2768
3081
|
expression: {
|
|
@@ -3276,9 +3589,15 @@
|
|
|
3276
3589
|
0.8,
|
|
3277
3590
|
2
|
|
3278
3591
|
],
|
|
3279
|
-
doc: "
|
|
3280
|
-
minimum:
|
|
3281
|
-
|
|
3592
|
+
doc: "Limits the possible scaling range for `text-size`, `text-halo-width`, `text-halo-blur` properties to be within [min-scale, max-scale]",
|
|
3593
|
+
minimum: [
|
|
3594
|
+
0.1,
|
|
3595
|
+
0.1
|
|
3596
|
+
],
|
|
3597
|
+
maximum: [
|
|
3598
|
+
10,
|
|
3599
|
+
10
|
|
3600
|
+
],
|
|
3282
3601
|
experimental: true,
|
|
3283
3602
|
"private": true,
|
|
3284
3603
|
expression: {
|
|
@@ -6782,6 +7101,9 @@
|
|
|
6782
7101
|
"private": true,
|
|
6783
7102
|
"sdk-support": {
|
|
6784
7103
|
"basic functionality": {
|
|
7104
|
+
js: "3.16.0",
|
|
7105
|
+
android: "11.16.0",
|
|
7106
|
+
ios: "11.16.0"
|
|
6785
7107
|
}
|
|
6786
7108
|
},
|
|
6787
7109
|
expression: {
|
|
@@ -6809,6 +7131,9 @@
|
|
|
6809
7131
|
doc: "Controls the intensity of ambient occlusion when shading concave angles between walls and roof crevices and windows.",
|
|
6810
7132
|
"sdk-support": {
|
|
6811
7133
|
"basic functionality": {
|
|
7134
|
+
js: "3.16.0",
|
|
7135
|
+
android: "11.16.0",
|
|
7136
|
+
ios: "11.16.0"
|
|
6812
7137
|
}
|
|
6813
7138
|
}
|
|
6814
7139
|
},
|
|
@@ -6830,6 +7155,9 @@
|
|
|
6830
7155
|
doc: "Controls the intensity of shading near ground",
|
|
6831
7156
|
"sdk-support": {
|
|
6832
7157
|
"basic functionality": {
|
|
7158
|
+
js: "3.16.0",
|
|
7159
|
+
android: "11.16.0",
|
|
7160
|
+
ios: "11.16.0"
|
|
6833
7161
|
}
|
|
6834
7162
|
}
|
|
6835
7163
|
},
|
|
@@ -6850,6 +7178,9 @@
|
|
|
6850
7178
|
doc: "The extent of the ambient occlusion effect on the ground beneath the procedural buildings in meters.",
|
|
6851
7179
|
"sdk-support": {
|
|
6852
7180
|
"basic functionality": {
|
|
7181
|
+
js: "3.16.0",
|
|
7182
|
+
android: "11.16.0",
|
|
7183
|
+
ios: "11.16.0"
|
|
6853
7184
|
}
|
|
6854
7185
|
}
|
|
6855
7186
|
},
|
|
@@ -6871,6 +7202,9 @@
|
|
|
6871
7202
|
},
|
|
6872
7203
|
"sdk-support": {
|
|
6873
7204
|
"basic functionality": {
|
|
7205
|
+
js: "3.16.0",
|
|
7206
|
+
android: "11.16.0",
|
|
7207
|
+
ios: "11.16.0"
|
|
6874
7208
|
}
|
|
6875
7209
|
}
|
|
6876
7210
|
},
|
|
@@ -6891,6 +7225,9 @@
|
|
|
6891
7225
|
},
|
|
6892
7226
|
"sdk-support": {
|
|
6893
7227
|
"basic functionality": {
|
|
7228
|
+
js: "3.16.0",
|
|
7229
|
+
android: "11.16.0",
|
|
7230
|
+
ios: "11.16.0"
|
|
6894
7231
|
}
|
|
6895
7232
|
}
|
|
6896
7233
|
},
|
|
@@ -6903,6 +7240,9 @@
|
|
|
6903
7240
|
"private": true,
|
|
6904
7241
|
"sdk-support": {
|
|
6905
7242
|
"basic functionality": {
|
|
7243
|
+
js: "3.16.0",
|
|
7244
|
+
android: "11.16.0",
|
|
7245
|
+
ios: "11.16.0"
|
|
6906
7246
|
}
|
|
6907
7247
|
},
|
|
6908
7248
|
"property-type": "data-constant"
|
|
@@ -6917,8 +7257,14 @@
|
|
|
6917
7257
|
transition: false,
|
|
6918
7258
|
"sdk-support": {
|
|
6919
7259
|
"basic functionality": {
|
|
7260
|
+
js: "3.16.0",
|
|
7261
|
+
android: "11.16.0",
|
|
7262
|
+
ios: "11.16.0"
|
|
6920
7263
|
},
|
|
6921
7264
|
"data-driven styling": {
|
|
7265
|
+
js: "3.16.0",
|
|
7266
|
+
android: "11.16.0",
|
|
7267
|
+
ios: "11.16.0"
|
|
6922
7268
|
}
|
|
6923
7269
|
},
|
|
6924
7270
|
expression: {
|
|
@@ -6942,8 +7288,14 @@
|
|
|
6942
7288
|
"private": true,
|
|
6943
7289
|
"sdk-support": {
|
|
6944
7290
|
"basic functionality": {
|
|
7291
|
+
js: "3.16.0",
|
|
7292
|
+
android: "11.16.0",
|
|
7293
|
+
ios: "11.16.0"
|
|
6945
7294
|
},
|
|
6946
7295
|
"data-driven styling": {
|
|
7296
|
+
js: "3.16.0",
|
|
7297
|
+
android: "11.16.0",
|
|
7298
|
+
ios: "11.16.0"
|
|
6947
7299
|
}
|
|
6948
7300
|
},
|
|
6949
7301
|
expression: {
|
|
@@ -6966,6 +7318,9 @@
|
|
|
6966
7318
|
"property-type": "data-constant",
|
|
6967
7319
|
"sdk-support": {
|
|
6968
7320
|
"basic functionality": {
|
|
7321
|
+
js: "3.16.0",
|
|
7322
|
+
android: "11.16.0",
|
|
7323
|
+
ios: "11.16.0"
|
|
6969
7324
|
}
|
|
6970
7325
|
},
|
|
6971
7326
|
expression: {
|
|
@@ -6988,9 +7343,91 @@
|
|
|
6988
7343
|
},
|
|
6989
7344
|
"sdk-support": {
|
|
6990
7345
|
"basic functionality": {
|
|
7346
|
+
js: "3.16.0",
|
|
7347
|
+
android: "11.16.0",
|
|
7348
|
+
ios: "11.16.0"
|
|
6991
7349
|
}
|
|
6992
7350
|
},
|
|
6993
7351
|
"property-type": "data-constant"
|
|
7352
|
+
},
|
|
7353
|
+
"building-flood-light-color": {
|
|
7354
|
+
"property-type": "data-constant",
|
|
7355
|
+
type: "color",
|
|
7356
|
+
experimental: true,
|
|
7357
|
+
"default": "#ffffff",
|
|
7358
|
+
doc: "The color of the flood light effect on the walls of the buildings.",
|
|
7359
|
+
requires: [
|
|
7360
|
+
"lights"
|
|
7361
|
+
],
|
|
7362
|
+
"use-theme": true,
|
|
7363
|
+
transition: true,
|
|
7364
|
+
expression: {
|
|
7365
|
+
interpolated: true,
|
|
7366
|
+
parameters: [
|
|
7367
|
+
"zoom",
|
|
7368
|
+
"measure-light"
|
|
7369
|
+
]
|
|
7370
|
+
},
|
|
7371
|
+
"sdk-support": {
|
|
7372
|
+
"basic functionality": {
|
|
7373
|
+
js: "3.16.0",
|
|
7374
|
+
android: "11.16.0",
|
|
7375
|
+
ios: "11.16.0"
|
|
7376
|
+
}
|
|
7377
|
+
}
|
|
7378
|
+
},
|
|
7379
|
+
"building-flood-light-intensity": {
|
|
7380
|
+
"property-type": "data-constant",
|
|
7381
|
+
type: "number",
|
|
7382
|
+
experimental: true,
|
|
7383
|
+
"default": 0,
|
|
7384
|
+
minimum: 0,
|
|
7385
|
+
maximum: 1,
|
|
7386
|
+
doc: "The intensity of the flood light color.",
|
|
7387
|
+
requires: [
|
|
7388
|
+
"lights"
|
|
7389
|
+
],
|
|
7390
|
+
transition: true,
|
|
7391
|
+
expression: {
|
|
7392
|
+
interpolated: true,
|
|
7393
|
+
parameters: [
|
|
7394
|
+
"zoom",
|
|
7395
|
+
"measure-light"
|
|
7396
|
+
]
|
|
7397
|
+
},
|
|
7398
|
+
"sdk-support": {
|
|
7399
|
+
"basic functionality": {
|
|
7400
|
+
js: "3.16.0",
|
|
7401
|
+
android: "11.16.0",
|
|
7402
|
+
ios: "11.16.0"
|
|
7403
|
+
}
|
|
7404
|
+
}
|
|
7405
|
+
},
|
|
7406
|
+
"building-flood-light-ground-attenuation": {
|
|
7407
|
+
"property-type": "data-constant",
|
|
7408
|
+
type: "number",
|
|
7409
|
+
experimental: true,
|
|
7410
|
+
"default": 0.69,
|
|
7411
|
+
minimum: 0,
|
|
7412
|
+
maximum: 1,
|
|
7413
|
+
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.",
|
|
7414
|
+
requires: [
|
|
7415
|
+
"lights"
|
|
7416
|
+
],
|
|
7417
|
+
transition: true,
|
|
7418
|
+
expression: {
|
|
7419
|
+
interpolated: true,
|
|
7420
|
+
parameters: [
|
|
7421
|
+
"zoom"
|
|
7422
|
+
]
|
|
7423
|
+
},
|
|
7424
|
+
"sdk-support": {
|
|
7425
|
+
"basic functionality": {
|
|
7426
|
+
js: "3.16.0",
|
|
7427
|
+
android: "11.16.0",
|
|
7428
|
+
ios: "11.16.0"
|
|
7429
|
+
}
|
|
7430
|
+
}
|
|
6994
7431
|
}
|
|
6995
7432
|
};
|
|
6996
7433
|
var paint_line = {
|
|
@@ -8776,6 +9213,11 @@
|
|
|
8776
9213
|
ios: "11.7.0"
|
|
8777
9214
|
}
|
|
8778
9215
|
},
|
|
9216
|
+
requires: [
|
|
9217
|
+
{
|
|
9218
|
+
"symbol-z-elevate": true
|
|
9219
|
+
}
|
|
9220
|
+
],
|
|
8779
9221
|
expression: {
|
|
8780
9222
|
interpolated: true,
|
|
8781
9223
|
parameters: [
|
|
@@ -10070,6 +10512,32 @@
|
|
|
10070
10512
|
js: "3.5.0"
|
|
10071
10513
|
}
|
|
10072
10514
|
}
|
|
10515
|
+
},
|
|
10516
|
+
"model-elevation-reference": {
|
|
10517
|
+
type: "enum",
|
|
10518
|
+
doc: "Selects the base of the model. Some modes might require precomputed elevation data in the tileset.",
|
|
10519
|
+
values: {
|
|
10520
|
+
sea: {
|
|
10521
|
+
doc: "Elevated rendering is enabled. Use this mode to elevate models relative to the sea level."
|
|
10522
|
+
},
|
|
10523
|
+
ground: {
|
|
10524
|
+
doc: "Elevated rendering is enabled. Use this mode to elevate models relative to the ground's height below them."
|
|
10525
|
+
},
|
|
10526
|
+
"hd-road-markup": {
|
|
10527
|
+
doc: "Elevated rendering is enabled. Use this mode to describe additive and stackable features that should exist only on top of road polygons."
|
|
10528
|
+
}
|
|
10529
|
+
},
|
|
10530
|
+
"default": "ground",
|
|
10531
|
+
transition: false,
|
|
10532
|
+
expression: {
|
|
10533
|
+
interpolated: false
|
|
10534
|
+
},
|
|
10535
|
+
"property-type": "data-constant",
|
|
10536
|
+
experimental: true,
|
|
10537
|
+
"sdk-support": {
|
|
10538
|
+
"basic functionality": {
|
|
10539
|
+
}
|
|
10540
|
+
}
|
|
10073
10541
|
}
|
|
10074
10542
|
};
|
|
10075
10543
|
var transition = {
|
|
@@ -10214,6 +10682,12 @@
|
|
|
10214
10682
|
source_geojson: source_geojson,
|
|
10215
10683
|
source_video: source_video,
|
|
10216
10684
|
source_image: source_image,
|
|
10685
|
+
modelNodeOverride: modelNodeOverride,
|
|
10686
|
+
modelNodeOverrides: modelNodeOverrides,
|
|
10687
|
+
modelMaterialOverride: modelMaterialOverride,
|
|
10688
|
+
modelMaterialOverrides: modelMaterialOverrides,
|
|
10689
|
+
modelSourceModel: modelSourceModel,
|
|
10690
|
+
modelSourceModels: modelSourceModels,
|
|
10217
10691
|
source_model: source_model,
|
|
10218
10692
|
layer: layer,
|
|
10219
10693
|
appearance: appearance,
|
|
@@ -11623,15 +12097,6 @@
|
|
|
11623
12097
|
return style;
|
|
11624
12098
|
}
|
|
11625
12099
|
|
|
11626
|
-
function extend (output, ...inputs) {
|
|
11627
|
-
for (const input of inputs) {
|
|
11628
|
-
for (const k in input) {
|
|
11629
|
-
output[k] = input[k];
|
|
11630
|
-
}
|
|
11631
|
-
}
|
|
11632
|
-
return output;
|
|
11633
|
-
}
|
|
11634
|
-
|
|
11635
12100
|
let ParsingError$1 = class ParsingError extends Error {
|
|
11636
12101
|
constructor(key, message) {
|
|
11637
12102
|
super(message);
|
|
@@ -13644,7 +14109,11 @@
|
|
|
13644
14109
|
if (typeEquals(typeOf(evaluatedContent), ResolvedImageType)) {
|
|
13645
14110
|
return new FormattedSection('', evaluatedContent, null, null, null);
|
|
13646
14111
|
}
|
|
13647
|
-
return new FormattedSection(
|
|
14112
|
+
return new FormattedSection(// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
14113
|
+
toString(evaluatedContent), null, // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
14114
|
+
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
|
|
14115
|
+
section.font ? section.font.evaluate(ctx).join(',') : null, // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
14116
|
+
section.textColor ? section.textColor.evaluate(ctx) : null);
|
|
13648
14117
|
};
|
|
13649
14118
|
return new Formatted(this.sections.map(evaluateSection));
|
|
13650
14119
|
}
|
|
@@ -13802,10 +14271,12 @@
|
|
|
13802
14271
|
}
|
|
13803
14272
|
evaluate(ctx) {
|
|
13804
14273
|
const primaryId = {
|
|
14274
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
13805
14275
|
name: this.namePrimary.evaluate(ctx),
|
|
13806
14276
|
iconsetId: this.iconsetIdPrimary
|
|
13807
14277
|
};
|
|
13808
14278
|
const secondaryId = this.nameSecondary ? {
|
|
14279
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
13809
14280
|
name: this.nameSecondary.evaluate(ctx),
|
|
13810
14281
|
iconsetId: this.iconsetIdSecondary
|
|
13811
14282
|
} : void 0;
|
|
@@ -15950,7 +16421,8 @@
|
|
|
15950
16421
|
}
|
|
15951
16422
|
const ruler = new CheapRuler(lngLatLines[0][0][1], 'meters');
|
|
15952
16423
|
if (geometry.type === 'Point' || geometry.type === 'MultiPoint' || geometry.type === 'LineString') {
|
|
15953
|
-
return pointSetToLinesDistance(geometry.type === 'Point' ? [geometry.coordinates] : geometry.coordinates,
|
|
16424
|
+
return pointSetToLinesDistance(geometry.type === 'Point' ? [geometry.coordinates] : geometry.coordinates, // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
16425
|
+
geometry.type === 'LineString', lngLatLines, ruler);
|
|
15954
16426
|
}
|
|
15955
16427
|
if (geometry.type === 'MultiLineString') {
|
|
15956
16428
|
let dist = Infinity;
|
|
@@ -15987,7 +16459,8 @@
|
|
|
15987
16459
|
}
|
|
15988
16460
|
const ruler = new CheapRuler(lngLatPolygons[0][0][0][1], 'meters');
|
|
15989
16461
|
if (geometry.type === 'Point' || geometry.type === 'MultiPoint' || geometry.type === 'LineString') {
|
|
15990
|
-
return pointSetToPolygonsDistance(geometry.type === 'Point' ? [geometry.coordinates] : geometry.coordinates,
|
|
16462
|
+
return pointSetToPolygonsDistance(geometry.type === 'Point' ? [geometry.coordinates] : geometry.coordinates, // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
16463
|
+
geometry.type === 'LineString', lngLatPolygons, ruler);
|
|
15991
16464
|
}
|
|
15992
16465
|
if (geometry.type === 'MultiLineString') {
|
|
15993
16466
|
let dist = Infinity;
|
|
@@ -16001,7 +16474,8 @@
|
|
|
16001
16474
|
return dist;
|
|
16002
16475
|
}
|
|
16003
16476
|
if (geometry.type === 'Polygon' || geometry.type === 'MultiPolygon') {
|
|
16004
|
-
return polygonsToPolygonsDistance(geometry.type === 'Polygon' ? [geometry.coordinates] : geometry.coordinates,
|
|
16477
|
+
return polygonsToPolygonsDistance(geometry.type === 'Polygon' ? [geometry.coordinates] : geometry.coordinates, // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
16478
|
+
lngLatPolygons, ruler);
|
|
16005
16479
|
}
|
|
16006
16480
|
return null;
|
|
16007
16481
|
}
|
|
@@ -16153,12 +16627,14 @@
|
|
|
16153
16627
|
}
|
|
16154
16628
|
function coerceValue(type, value) {
|
|
16155
16629
|
switch (type) {
|
|
16630
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
16156
16631
|
case 'string':
|
|
16157
16632
|
return toString(value);
|
|
16158
16633
|
case 'number':
|
|
16159
16634
|
return +value;
|
|
16160
16635
|
case 'boolean':
|
|
16161
16636
|
return !!value;
|
|
16637
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
16162
16638
|
case 'color':
|
|
16163
16639
|
return Color.parse(value);
|
|
16164
16640
|
case 'formatted': {
|
|
@@ -16955,8 +17431,11 @@
|
|
|
16955
17431
|
outputType = outputType || parsed.type;
|
|
16956
17432
|
parsedArgs.push(parsed);
|
|
16957
17433
|
}
|
|
16958
|
-
const needsAnnotation = expectedType &&
|
|
16959
|
-
|
|
17434
|
+
const needsAnnotation = expectedType && // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
17435
|
+
parsedArgs.some(arg => checkSubtype(expectedType, arg.type));
|
|
17436
|
+
return needsAnnotation ? // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
17437
|
+
new Coalesce(ValueType, parsedArgs) : // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
17438
|
+
new Coalesce(outputType, parsedArgs);
|
|
16960
17439
|
}
|
|
16961
17440
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16962
17441
|
evaluate(ctx) {
|
|
@@ -17773,10 +18252,14 @@
|
|
|
17773
18252
|
evaluate(ctx) {
|
|
17774
18253
|
return new Intl.NumberFormat(this.locale ? this.locale.evaluate(ctx) : [], {
|
|
17775
18254
|
style: this.currency && 'currency' || this.unit && 'unit' || 'decimal',
|
|
18255
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
17776
18256
|
currency: this.currency ? this.currency.evaluate(ctx) : void 0,
|
|
18257
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
17777
18258
|
unit: this.unit ? this.unit.evaluate(ctx) : void 0,
|
|
18259
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
17778
18260
|
minimumFractionDigits: this.minFractionDigits ? this.minFractionDigits.evaluate(ctx) : void 0,
|
|
17779
|
-
|
|
18261
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
18262
|
+
maximumFractionDigits: this.maxFractionDigits ? this.maxFractionDigits.evaluate(ctx) : void 0 // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
17780
18263
|
}).format(this.number.evaluate(ctx));
|
|
17781
18264
|
}
|
|
17782
18265
|
eachChild(fn) {
|
|
@@ -17979,6 +18462,7 @@
|
|
|
17979
18462
|
'error': [
|
|
17980
18463
|
ErrorType,
|
|
17981
18464
|
[StringType],
|
|
18465
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
17982
18466
|
(ctx, [v]) => {
|
|
17983
18467
|
throw new RuntimeError(v.evaluate(ctx));
|
|
17984
18468
|
}
|
|
@@ -17986,6 +18470,7 @@
|
|
|
17986
18470
|
'typeof': [
|
|
17987
18471
|
StringType,
|
|
17988
18472
|
[ValueType],
|
|
18473
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
17989
18474
|
(ctx, [v]) => toString$1(typeOf(v.evaluate(ctx)))
|
|
17990
18475
|
],
|
|
17991
18476
|
'to-rgba': [
|
|
@@ -18045,6 +18530,7 @@
|
|
|
18045
18530
|
overloads: [
|
|
18046
18531
|
[
|
|
18047
18532
|
[StringType],
|
|
18533
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18048
18534
|
(ctx, [key]) => has(key.evaluate(ctx), ctx.properties())
|
|
18049
18535
|
],
|
|
18050
18536
|
[
|
|
@@ -18052,6 +18538,7 @@
|
|
|
18052
18538
|
StringType,
|
|
18053
18539
|
ObjectType
|
|
18054
18540
|
],
|
|
18541
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18055
18542
|
(ctx, [key, obj]) => has(key.evaluate(ctx), obj.evaluate(ctx))
|
|
18056
18543
|
]
|
|
18057
18544
|
]
|
|
@@ -18061,6 +18548,7 @@
|
|
|
18061
18548
|
overloads: [
|
|
18062
18549
|
[
|
|
18063
18550
|
[StringType],
|
|
18551
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18064
18552
|
(ctx, [key]) => get(key.evaluate(ctx), ctx.properties())
|
|
18065
18553
|
],
|
|
18066
18554
|
[
|
|
@@ -18068,7 +18556,7 @@
|
|
|
18068
18556
|
StringType,
|
|
18069
18557
|
ObjectType
|
|
18070
18558
|
],
|
|
18071
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
18559
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-argument
|
|
18072
18560
|
(ctx, [key, obj]) => get(key.evaluate(ctx), obj.evaluate(ctx))
|
|
18073
18561
|
]
|
|
18074
18562
|
]
|
|
@@ -18076,6 +18564,7 @@
|
|
|
18076
18564
|
'feature-state': [
|
|
18077
18565
|
ValueType,
|
|
18078
18566
|
[StringType],
|
|
18567
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18079
18568
|
(ctx, [key]) => get(key.evaluate(ctx), ctx.featureState || {})
|
|
18080
18569
|
],
|
|
18081
18570
|
'properties': [
|
|
@@ -18116,6 +18605,7 @@
|
|
|
18116
18605
|
'measure-light': [
|
|
18117
18606
|
NumberType,
|
|
18118
18607
|
[StringType],
|
|
18608
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18119
18609
|
(ctx, [s]) => ctx.measureLight(s.evaluate(ctx))
|
|
18120
18610
|
],
|
|
18121
18611
|
'heatmap-density': [
|
|
@@ -18223,73 +18713,85 @@
|
|
|
18223
18713
|
NumberType,
|
|
18224
18714
|
NumberType
|
|
18225
18715
|
],
|
|
18716
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18226
18717
|
(ctx, [b, e]) => Math.pow(b.evaluate(ctx), e.evaluate(ctx))
|
|
18227
18718
|
],
|
|
18228
18719
|
'sqrt': [
|
|
18229
18720
|
NumberType,
|
|
18230
18721
|
[NumberType],
|
|
18722
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18231
18723
|
(ctx, [x]) => Math.sqrt(x.evaluate(ctx))
|
|
18232
18724
|
],
|
|
18233
18725
|
'log10': [
|
|
18234
18726
|
NumberType,
|
|
18235
18727
|
[NumberType],
|
|
18728
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18236
18729
|
(ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN10
|
|
18237
18730
|
],
|
|
18238
18731
|
'ln': [
|
|
18239
18732
|
NumberType,
|
|
18240
18733
|
[NumberType],
|
|
18734
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18241
18735
|
(ctx, [n]) => Math.log(n.evaluate(ctx))
|
|
18242
18736
|
],
|
|
18243
18737
|
'log2': [
|
|
18244
18738
|
NumberType,
|
|
18245
18739
|
[NumberType],
|
|
18246
|
-
|
|
18740
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18741
|
+
(ctx, [n]) => Math.log2(n.evaluate(ctx))
|
|
18247
18742
|
],
|
|
18248
18743
|
'sin': [
|
|
18249
18744
|
NumberType,
|
|
18250
18745
|
[NumberType],
|
|
18746
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18251
18747
|
(ctx, [n]) => Math.sin(n.evaluate(ctx))
|
|
18252
18748
|
],
|
|
18253
18749
|
'cos': [
|
|
18254
18750
|
NumberType,
|
|
18255
18751
|
[NumberType],
|
|
18752
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18256
18753
|
(ctx, [n]) => Math.cos(n.evaluate(ctx))
|
|
18257
18754
|
],
|
|
18258
18755
|
'tan': [
|
|
18259
18756
|
NumberType,
|
|
18260
18757
|
[NumberType],
|
|
18758
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18261
18759
|
(ctx, [n]) => Math.tan(n.evaluate(ctx))
|
|
18262
18760
|
],
|
|
18263
18761
|
'asin': [
|
|
18264
18762
|
NumberType,
|
|
18265
18763
|
[NumberType],
|
|
18764
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18266
18765
|
(ctx, [n]) => Math.asin(n.evaluate(ctx))
|
|
18267
18766
|
],
|
|
18268
18767
|
'acos': [
|
|
18269
18768
|
NumberType,
|
|
18270
18769
|
[NumberType],
|
|
18770
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18271
18771
|
(ctx, [n]) => Math.acos(n.evaluate(ctx))
|
|
18272
18772
|
],
|
|
18273
18773
|
'atan': [
|
|
18274
18774
|
NumberType,
|
|
18275
18775
|
[NumberType],
|
|
18776
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18276
18777
|
(ctx, [n]) => Math.atan(n.evaluate(ctx))
|
|
18277
18778
|
],
|
|
18278
18779
|
'min': [
|
|
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.min(...args.map(arg => arg.evaluate(ctx)))
|
|
18283
18784
|
],
|
|
18284
18785
|
'max': [
|
|
18285
18786
|
NumberType,
|
|
18286
18787
|
varargs(NumberType),
|
|
18287
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
18788
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-argument
|
|
18288
18789
|
(ctx, args) => Math.max(...args.map(arg => arg.evaluate(ctx)))
|
|
18289
18790
|
],
|
|
18290
18791
|
'abs': [
|
|
18291
18792
|
NumberType,
|
|
18292
18793
|
[NumberType],
|
|
18794
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18293
18795
|
(ctx, [n]) => Math.abs(n.evaluate(ctx))
|
|
18294
18796
|
],
|
|
18295
18797
|
'round': [
|
|
@@ -18303,11 +18805,13 @@
|
|
|
18303
18805
|
'floor': [
|
|
18304
18806
|
NumberType,
|
|
18305
18807
|
[NumberType],
|
|
18808
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18306
18809
|
(ctx, [n]) => Math.floor(n.evaluate(ctx))
|
|
18307
18810
|
],
|
|
18308
18811
|
'ceil': [
|
|
18309
18812
|
NumberType,
|
|
18310
18813
|
[NumberType],
|
|
18814
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18311
18815
|
(ctx, [n]) => Math.ceil(n.evaluate(ctx))
|
|
18312
18816
|
],
|
|
18313
18817
|
'filter-==': [
|
|
@@ -18316,6 +18820,7 @@
|
|
|
18316
18820
|
StringType,
|
|
18317
18821
|
ValueType
|
|
18318
18822
|
],
|
|
18823
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
18319
18824
|
(ctx, [k, v]) => ctx.properties()[k.value] === v.value
|
|
18320
18825
|
],
|
|
18321
18826
|
'filter-id-==': [
|
|
@@ -18425,11 +18930,13 @@
|
|
|
18425
18930
|
'filter-type-in': [
|
|
18426
18931
|
BooleanType,
|
|
18427
18932
|
[array$1(StringType)],
|
|
18933
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
|
18428
18934
|
(ctx, [v]) => v.value.indexOf(ctx.geometryType()) >= 0
|
|
18429
18935
|
],
|
|
18430
18936
|
'filter-id-in': [
|
|
18431
18937
|
BooleanType,
|
|
18432
18938
|
[array$1(ValueType)],
|
|
18939
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
|
18433
18940
|
(ctx, [v]) => v.value.indexOf(ctx.id()) >= 0
|
|
18434
18941
|
],
|
|
18435
18942
|
'filter-in-small': [
|
|
@@ -18439,6 +18946,7 @@
|
|
|
18439
18946
|
array$1(ValueType)
|
|
18440
18947
|
],
|
|
18441
18948
|
// assumes v is an array literal
|
|
18949
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
|
18442
18950
|
(ctx, [k, v]) => v.value.indexOf(ctx.properties()[k.value]) >= 0
|
|
18443
18951
|
],
|
|
18444
18952
|
'filter-in-large': [
|
|
@@ -18448,6 +18956,7 @@
|
|
|
18448
18956
|
array$1(ValueType)
|
|
18449
18957
|
],
|
|
18450
18958
|
// assumes v is a array literal with values sorted in ascending order and of a single type
|
|
18959
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument
|
|
18451
18960
|
(ctx, [k, v]) => binarySearch(ctx.properties()[k.value], v.value, 0, v.value.length - 1)
|
|
18452
18961
|
],
|
|
18453
18962
|
'all': {
|
|
@@ -18516,24 +19025,25 @@
|
|
|
18516
19025
|
'upcase': [
|
|
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).toUpperCase()
|
|
18521
19030
|
],
|
|
18522
19031
|
'downcase': [
|
|
18523
19032
|
StringType,
|
|
18524
19033
|
[StringType],
|
|
18525
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
19034
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
|
18526
19035
|
(ctx, [s]) => s.evaluate(ctx).toLowerCase()
|
|
18527
19036
|
],
|
|
18528
19037
|
'concat': [
|
|
18529
19038
|
StringType,
|
|
18530
19039
|
varargs(ValueType),
|
|
19040
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18531
19041
|
(ctx, args) => args.map(arg => toString(arg.evaluate(ctx))).join('')
|
|
18532
19042
|
],
|
|
18533
19043
|
'resolved-locale': [
|
|
18534
19044
|
StringType,
|
|
18535
19045
|
[CollatorType],
|
|
18536
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
19046
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
|
18537
19047
|
(ctx, [collator]) => collator.evaluate(ctx).resolvedLocale()
|
|
18538
19048
|
],
|
|
18539
19049
|
'random': [
|
|
@@ -18610,7 +19120,7 @@
|
|
|
18610
19120
|
const zoomDependent = zoomAndFeatureDependent || !featureDependent;
|
|
18611
19121
|
const type = parameters.type || (supportsInterpolation(propertySpec) ? 'exponential' : 'interval');
|
|
18612
19122
|
if (isColor) {
|
|
18613
|
-
parameters =
|
|
19123
|
+
parameters = Object.assign({}, parameters);
|
|
18614
19124
|
if (parameters.stops) {
|
|
18615
19125
|
parameters.stops = parameters.stops.map(stop => {
|
|
18616
19126
|
return [
|
|
@@ -18656,9 +19166,13 @@
|
|
|
18656
19166
|
const zoom = stop[0].zoom;
|
|
18657
19167
|
if (featureFunctions[zoom] === void 0) {
|
|
18658
19168
|
featureFunctions[zoom] = {
|
|
19169
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
18659
19170
|
zoom,
|
|
19171
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
18660
19172
|
type: parameters.type,
|
|
19173
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
18661
19174
|
property: parameters.property,
|
|
19175
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
18662
19176
|
default: parameters.default,
|
|
18663
19177
|
stops: []
|
|
18664
19178
|
};
|
|
@@ -18680,28 +19194,32 @@
|
|
|
18680
19194
|
return {
|
|
18681
19195
|
kind: 'composite',
|
|
18682
19196
|
interpolationType,
|
|
19197
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
18683
19198
|
interpolationFactor: Interpolate.interpolationFactor.bind(void 0, interpolationType),
|
|
18684
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
19199
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access
|
|
18685
19200
|
zoomStops: featureFunctionStops.map(s => s[0]),
|
|
18686
19201
|
evaluate({zoom}, properties) {
|
|
18687
19202
|
return evaluateExponentialFunction({
|
|
18688
19203
|
stops: featureFunctionStops,
|
|
19204
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
18689
19205
|
base: parameters.base
|
|
18690
19206
|
}, propertySpec, zoom).evaluate(zoom, properties);
|
|
18691
19207
|
}
|
|
18692
19208
|
};
|
|
18693
19209
|
} else if (zoomDependent) {
|
|
18694
|
-
const interpolationType = type === 'exponential' ?
|
|
19210
|
+
const interpolationType = type === 'exponential' ? // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
19211
|
+
{
|
|
18695
19212
|
name: 'exponential',
|
|
18696
19213
|
base: parameters.base !== void 0 ? parameters.base : 1
|
|
18697
19214
|
} : null;
|
|
18698
19215
|
return {
|
|
18699
19216
|
kind: 'camera',
|
|
18700
19217
|
interpolationType,
|
|
19218
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
18701
19219
|
interpolationFactor: Interpolate.interpolationFactor.bind(void 0, interpolationType),
|
|
18702
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
19220
|
+
// 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
|
|
18703
19221
|
zoomStops: parameters.stops.map(s => s[0]),
|
|
18704
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
19222
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call
|
|
18705
19223
|
evaluate: ({zoom}) => innerFun(parameters, propertySpec, zoom, hashedStops, categoricalKeyType)
|
|
18706
19224
|
};
|
|
18707
19225
|
} else {
|
|
@@ -18754,7 +19272,9 @@
|
|
|
18754
19272
|
if (input >= parameters.stops[n - 1][0])
|
|
18755
19273
|
return parameters.stops[n - 1][1];
|
|
18756
19274
|
const index = findStopLessThanOrEqualTo(parameters.stops.map(stop => stop[0]), input);
|
|
18757
|
-
const t = interpolationFactor(input, base,
|
|
19275
|
+
const t = interpolationFactor(input, base, // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
19276
|
+
parameters.stops[index][0], // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
19277
|
+
parameters.stops[index + 1][0]);
|
|
18758
19278
|
const outputLower = parameters.stops[index][1];
|
|
18759
19279
|
const outputUpper = parameters.stops[index + 1][1];
|
|
18760
19280
|
let interp = interpolate$1[propertySpec.type] || identityFunction;
|
|
@@ -18938,16 +19458,20 @@
|
|
|
18938
19458
|
return error([new ParsingError$1('', '"interpolate" expressions cannot be used with this property')]);
|
|
18939
19459
|
}
|
|
18940
19460
|
if (!zoomCurve) {
|
|
18941
|
-
return success(isFeatureConstant$1 && isLineProgressConstant ?
|
|
19461
|
+
return success(isFeatureConstant$1 && isLineProgressConstant ? // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
19462
|
+
new ZoomConstantExpression('constant', expression.value, isLightConstant, isLineProgressConstant) : // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
19463
|
+
new ZoomConstantExpression('source', expression.value, isLightConstant, isLineProgressConstant));
|
|
18942
19464
|
}
|
|
18943
19465
|
const interpolationType = zoomCurve instanceof Interpolate ? zoomCurve.interpolation : void 0;
|
|
18944
|
-
return success(isFeatureConstant$1 && isLineProgressConstant ?
|
|
19466
|
+
return success(isFeatureConstant$1 && isLineProgressConstant ? // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
19467
|
+
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
|
|
19468
|
+
new ZoomDependentExpression('composite', expression.value, zoomCurve.labels, interpolationType, isLightConstant, isLineProgressConstant));
|
|
18945
19469
|
}
|
|
18946
19470
|
class StylePropertyFunction {
|
|
18947
19471
|
constructor(parameters, specification) {
|
|
18948
19472
|
this._parameters = parameters;
|
|
18949
19473
|
this._specification = specification;
|
|
18950
|
-
|
|
19474
|
+
Object.assign(this, createFunction(this._parameters, this._specification));
|
|
18951
19475
|
}
|
|
18952
19476
|
static deserialize(serialized) {
|
|
18953
19477
|
return new StylePropertyFunction(serialized._parameters, serialized._specification);
|
|
@@ -19437,7 +19961,9 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
19437
19961
|
filterFunc = filterFunc;
|
|
19438
19962
|
const needGeometry = geometryNeeded(staticFilter);
|
|
19439
19963
|
return {
|
|
19964
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
19440
19965
|
filter: filterFunc,
|
|
19966
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
19441
19967
|
dynamicFilter: dynamicFilterFunc ? dynamicFilterFunc : void 0,
|
|
19442
19968
|
needGeometry,
|
|
19443
19969
|
needFeature: !!needFeature
|
|
@@ -19552,9 +20078,17 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
19552
20078
|
const op = filter[0];
|
|
19553
20079
|
if (filter.length <= 1)
|
|
19554
20080
|
return op !== 'any';
|
|
19555
|
-
const converted =
|
|
20081
|
+
const converted = // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
20082
|
+
op === '==' ? convertComparisonOp$1(filter[1], filter[2], '==') : // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
20083
|
+
op === '!=' ? convertNegation(convertComparisonOp$1(filter[1], filter[2], '==')) : op === '<' || op === '>' || op === '<=' || // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
20084
|
+
op === '>=' ? convertComparisonOp$1(filter[1], filter[2], op) : // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
20085
|
+
op === 'any' ? convertDisjunctionOp(filter.slice(1)) : // @ts-expect-error - TS2769 - No overload matches this call.
|
|
19556
20086
|
op === 'all' ? ['all'].concat(filter.slice(1).map(convertFilter$1)) : // @ts-expect-error - TS2769 - No overload matches this call.
|
|
19557
|
-
op === 'none' ? ['all'].concat(filter.slice(1).map(convertFilter$1).map(convertNegation)) :
|
|
20087
|
+
op === 'none' ? ['all'].concat(filter.slice(1).map(convertFilter$1).map(convertNegation)) : // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
20088
|
+
op === 'in' ? convertInOp$1(filter[1], filter.slice(2)) : // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
20089
|
+
op === '!in' ? convertNegation(convertInOp$1(filter[1], filter.slice(2))) : // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
20090
|
+
op === 'has' ? convertHasOp$1(filter[1]) : // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
20091
|
+
op === '!has' ? convertNegation(convertHasOp$1(filter[1])) : true;
|
|
19558
20092
|
return converted;
|
|
19559
20093
|
}
|
|
19560
20094
|
function convertComparisonOp$1(property, value, op) {
|
|
@@ -20640,8 +21174,9 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
20640
21174
|
value: value.__line__,
|
|
20641
21175
|
enumerable: false
|
|
20642
21176
|
});
|
|
20643
|
-
let errors = validateObject(
|
|
21177
|
+
let errors = validateObject(Object.assign({}, options, {
|
|
20644
21178
|
value: importSpec,
|
|
21179
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
20645
21180
|
valueSpec: styleSpec.import
|
|
20646
21181
|
}));
|
|
20647
21182
|
if (unbundle(importSpec.id) === '') {
|
|
@@ -20689,6 +21224,7 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
20689
21224
|
errors = errors.concat(validateArrayElement({
|
|
20690
21225
|
array,
|
|
20691
21226
|
arrayIndex: i,
|
|
21227
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
20692
21228
|
value: array[i],
|
|
20693
21229
|
valueSpec: arrayElementSpec,
|
|
20694
21230
|
style,
|
|
@@ -20754,6 +21290,7 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
20754
21290
|
const errors = validateObject({
|
|
20755
21291
|
key: options.key,
|
|
20756
21292
|
value: options.value,
|
|
21293
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
20757
21294
|
valueSpec: options.styleSpec.function,
|
|
20758
21295
|
style: options.style,
|
|
20759
21296
|
styleSpec: options.styleSpec,
|
|
@@ -20917,15 +21454,20 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
20917
21454
|
});
|
|
20918
21455
|
}
|
|
20919
21456
|
const expressionObj = expression.value.expression || expression.value._styleExpression.expression;
|
|
20920
|
-
if (options.expressionContext === 'property' && options.propertyKey === 'text-font' &&
|
|
21457
|
+
if (options.expressionContext === 'property' && options.propertyKey === 'text-font' && // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
|
21458
|
+
!expressionObj.outputDefined()) {
|
|
20921
21459
|
return [new ValidationError(options.key, options.value, `Invalid data expression for "${ options.propertyKey }". Output values must be contained as literals within the expression.`)];
|
|
20922
21460
|
}
|
|
20923
|
-
if (options.expressionContext === 'property' && options.propertyType === 'layout' &&
|
|
21461
|
+
if (options.expressionContext === 'property' && options.propertyType === 'layout' && // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
21462
|
+
!isStateConstant(expressionObj)) {
|
|
20924
21463
|
return [new ValidationError(options.key, options.value, '"feature-state" data expressions are not supported with layout properties.')];
|
|
20925
21464
|
}
|
|
20926
21465
|
if (options.expressionContext === 'filter') {
|
|
20927
21466
|
return disallowedFilterParameters(expressionObj, options);
|
|
20928
21467
|
}
|
|
21468
|
+
if (options.expressionContext === 'appearance') {
|
|
21469
|
+
return checkDisallowedParameters(expressionObj, options);
|
|
21470
|
+
}
|
|
20929
21471
|
if (options.expressionContext && options.expressionContext.indexOf('cluster') === 0) {
|
|
20930
21472
|
if (!isGlobalPropertyConstant(expressionObj, [
|
|
20931
21473
|
'zoom',
|
|
@@ -20966,6 +21508,28 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
20966
21508
|
});
|
|
20967
21509
|
return errors;
|
|
20968
21510
|
}
|
|
21511
|
+
function checkDisallowedParameters(e, options) {
|
|
21512
|
+
const allowedParameters = /* @__PURE__ */
|
|
21513
|
+
new Set();
|
|
21514
|
+
if (options.valueSpec && options.valueSpec.expression) {
|
|
21515
|
+
for (const param of options.valueSpec.expression.parameters) {
|
|
21516
|
+
allowedParameters.add(param);
|
|
21517
|
+
}
|
|
21518
|
+
}
|
|
21519
|
+
if (allowedParameters.size === 0) {
|
|
21520
|
+
return [];
|
|
21521
|
+
}
|
|
21522
|
+
const errors = [];
|
|
21523
|
+
if (e instanceof CompoundExpression) {
|
|
21524
|
+
if (!allowedParameters.has(e.name)) {
|
|
21525
|
+
return [new ValidationError(options.key, options.value, `["${ e.name }"] is not an allowed parameter`)];
|
|
21526
|
+
}
|
|
21527
|
+
}
|
|
21528
|
+
e.eachChild(arg => {
|
|
21529
|
+
errors.push(...checkDisallowedParameters(arg, options));
|
|
21530
|
+
});
|
|
21531
|
+
return errors;
|
|
21532
|
+
}
|
|
20969
21533
|
|
|
20970
21534
|
function validateBoolean(options) {
|
|
20971
21535
|
const value = options.value;
|
|
@@ -21006,8 +21570,9 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
21006
21570
|
function validateFilter(options) {
|
|
21007
21571
|
if (isExpressionFilter(deepUnbundle(options.value))) {
|
|
21008
21572
|
const layerType = options.layerType || 'fill';
|
|
21009
|
-
return validateExpression(
|
|
21573
|
+
return validateExpression(Object.assign({}, options, {
|
|
21010
21574
|
expressionContext: 'filter',
|
|
21575
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
21011
21576
|
valueSpec: options.styleSpec[`filter_${ layerType }`]
|
|
21012
21577
|
}));
|
|
21013
21578
|
} else {
|
|
@@ -21027,6 +21592,7 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
21027
21592
|
let errors = validateEnum({
|
|
21028
21593
|
key: `${ key }[0]`,
|
|
21029
21594
|
value: value[0],
|
|
21595
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
21030
21596
|
valueSpec: styleSpec.filter_operator
|
|
21031
21597
|
});
|
|
21032
21598
|
switch (unbundle(value[0])) {
|
|
@@ -21058,6 +21624,7 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
21058
21624
|
errors = errors.concat(validateEnum({
|
|
21059
21625
|
key: `${ key }[${ i }]`,
|
|
21060
21626
|
value: value[i],
|
|
21627
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
21061
21628
|
valueSpec: styleSpec.geometry_type
|
|
21062
21629
|
}));
|
|
21063
21630
|
} else if (!isString(value[i]) && !isNumber(value[i]) && !isBoolean(value[i])) {
|
|
@@ -21137,6 +21704,7 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
21137
21704
|
return validate({
|
|
21138
21705
|
key,
|
|
21139
21706
|
value,
|
|
21707
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
21140
21708
|
valueSpec: styleSpec.transition,
|
|
21141
21709
|
style,
|
|
21142
21710
|
styleSpec
|
|
@@ -21174,6 +21742,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21174
21742
|
return errors.concat(validate({
|
|
21175
21743
|
key: options.key,
|
|
21176
21744
|
value,
|
|
21745
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
21177
21746
|
valueSpec,
|
|
21178
21747
|
style,
|
|
21179
21748
|
styleSpec,
|
|
@@ -21183,6 +21752,73 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21183
21752
|
}));
|
|
21184
21753
|
}
|
|
21185
21754
|
|
|
21755
|
+
function validateAppearance(options) {
|
|
21756
|
+
const {key, layer, layerType} = options;
|
|
21757
|
+
const value = unbundle(options.value);
|
|
21758
|
+
const name = unbundle(value.name);
|
|
21759
|
+
const condition = unbundle(value.condition);
|
|
21760
|
+
const errors = validateObject({
|
|
21761
|
+
key,
|
|
21762
|
+
value,
|
|
21763
|
+
valueSpec: options.styleSpec.appearance,
|
|
21764
|
+
style: options.style,
|
|
21765
|
+
styleSpec: options.styleSpec,
|
|
21766
|
+
objectElementValidators: {
|
|
21767
|
+
condition: options2 => validateCondition(Object.assign({
|
|
21768
|
+
layer,
|
|
21769
|
+
layerType
|
|
21770
|
+
}, options2)),
|
|
21771
|
+
properties: options2 => validateProperties(Object.assign({
|
|
21772
|
+
layer,
|
|
21773
|
+
layerType
|
|
21774
|
+
}, options2))
|
|
21775
|
+
}
|
|
21776
|
+
});
|
|
21777
|
+
if (name !== 'hidden' && !condition) {
|
|
21778
|
+
errors.push(new ValidationError(options.key, 'name', `Appearance with name different than "hidden" must have a condition`));
|
|
21779
|
+
}
|
|
21780
|
+
return errors;
|
|
21781
|
+
}
|
|
21782
|
+
function validateProperties(options) {
|
|
21783
|
+
const errors = [];
|
|
21784
|
+
const {styleSpec, layer, layerType} = options;
|
|
21785
|
+
const paintProperties = styleSpec[`paint_${ layerType }`];
|
|
21786
|
+
const layoutProperties = styleSpec[`layout_${ layerType }`];
|
|
21787
|
+
const properties = options.object[options.objectKey];
|
|
21788
|
+
for (const propertyKey in properties) {
|
|
21789
|
+
const propertyType = propertyKey in paintProperties ? 'paint' : propertyKey in layoutProperties ? 'layout' : void 0;
|
|
21790
|
+
if (!propertyType) {
|
|
21791
|
+
errors.push(new ValidationError(options.key, propertyKey, `unknown property "${ propertyKey }" for layer type "${ layerType }"`));
|
|
21792
|
+
continue;
|
|
21793
|
+
}
|
|
21794
|
+
const propertyValidationOptions = Object.assign({}, options, {
|
|
21795
|
+
key: `${ options.key }.${ propertyKey }`,
|
|
21796
|
+
object: properties,
|
|
21797
|
+
objectKey: propertyKey,
|
|
21798
|
+
layer,
|
|
21799
|
+
layerType,
|
|
21800
|
+
value: properties[propertyKey],
|
|
21801
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
21802
|
+
valueSpec: propertyType === 'paint' ? paintProperties[propertyKey] : layoutProperties[propertyKey]
|
|
21803
|
+
});
|
|
21804
|
+
errors.push(...validateProperty(propertyValidationOptions, propertyType));
|
|
21805
|
+
}
|
|
21806
|
+
return errors;
|
|
21807
|
+
}
|
|
21808
|
+
function validateCondition(options) {
|
|
21809
|
+
const errors = [];
|
|
21810
|
+
const appearance = options.object;
|
|
21811
|
+
const condition = appearance.condition;
|
|
21812
|
+
errors.push(...validateExpression({
|
|
21813
|
+
key: options.key,
|
|
21814
|
+
value: condition,
|
|
21815
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
21816
|
+
valueSpec: v8['appearance']['condition'],
|
|
21817
|
+
expressionContext: 'appearance'
|
|
21818
|
+
}));
|
|
21819
|
+
return errors;
|
|
21820
|
+
}
|
|
21821
|
+
|
|
21186
21822
|
function validatePaintProperty(options) {
|
|
21187
21823
|
return validateProperty(options, 'paint');
|
|
21188
21824
|
}
|
|
@@ -21272,6 +21908,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21272
21908
|
errors = errors.concat(validateObject({
|
|
21273
21909
|
key,
|
|
21274
21910
|
value: layer,
|
|
21911
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
21275
21912
|
valueSpec: styleSpec.layer,
|
|
21276
21913
|
style: options.style,
|
|
21277
21914
|
styleSpec: options.styleSpec,
|
|
@@ -21285,6 +21922,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21285
21922
|
return validate({
|
|
21286
21923
|
key: `${ key }.type`,
|
|
21287
21924
|
value: layer.type,
|
|
21925
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
21288
21926
|
valueSpec: styleSpec.layer.type,
|
|
21289
21927
|
style: options.style,
|
|
21290
21928
|
styleSpec: options.styleSpec,
|
|
@@ -21293,7 +21931,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21293
21931
|
});
|
|
21294
21932
|
},
|
|
21295
21933
|
filter(options2) {
|
|
21296
|
-
return validateFilter(
|
|
21934
|
+
return validateFilter(Object.assign({ layerType: type }, options2));
|
|
21297
21935
|
},
|
|
21298
21936
|
layout(options2) {
|
|
21299
21937
|
return validateObject({
|
|
@@ -21305,7 +21943,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21305
21943
|
styleSpec: options2.styleSpec,
|
|
21306
21944
|
objectElementValidators: {
|
|
21307
21945
|
'*'(options3) {
|
|
21308
|
-
return validateLayoutProperty(
|
|
21946
|
+
return validateLayoutProperty(Object.assign({ layerType: type }, options3));
|
|
21309
21947
|
}
|
|
21310
21948
|
}
|
|
21311
21949
|
});
|
|
@@ -21320,13 +21958,41 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21320
21958
|
styleSpec: options2.styleSpec,
|
|
21321
21959
|
objectElementValidators: {
|
|
21322
21960
|
'*'(options3) {
|
|
21323
|
-
return validatePaintProperty(
|
|
21961
|
+
return validatePaintProperty(Object.assign({
|
|
21324
21962
|
layerType: type,
|
|
21325
21963
|
layer
|
|
21326
21964
|
}, options3));
|
|
21327
21965
|
}
|
|
21328
21966
|
}
|
|
21329
21967
|
});
|
|
21968
|
+
},
|
|
21969
|
+
appearances(options2) {
|
|
21970
|
+
const validationErrors = validateArray({
|
|
21971
|
+
key: options2.key,
|
|
21972
|
+
value: options2.value,
|
|
21973
|
+
valueSpec: options2.valueSpec,
|
|
21974
|
+
style: options2.style,
|
|
21975
|
+
styleSpec: options2.styleSpec,
|
|
21976
|
+
arrayElementValidator: options3 => validateAppearance(Object.assign({
|
|
21977
|
+
layerType: type,
|
|
21978
|
+
layer
|
|
21979
|
+
}, options3))
|
|
21980
|
+
});
|
|
21981
|
+
const appearances = Array.isArray(options2.value) ? options2.value : [];
|
|
21982
|
+
const dedupedNames = /* @__PURE__ */
|
|
21983
|
+
new Set();
|
|
21984
|
+
appearances.forEach((a, index) => {
|
|
21985
|
+
const name = unbundle(a.name);
|
|
21986
|
+
if (name) {
|
|
21987
|
+
if (dedupedNames.has(name)) {
|
|
21988
|
+
const layerId = unbundle(layer.id);
|
|
21989
|
+
validationErrors.push(new ValidationError(options2.key, name, `Duplicated appearance name "${ name }" for layer "${ layerId }"`));
|
|
21990
|
+
} else {
|
|
21991
|
+
dedupedNames.add(name);
|
|
21992
|
+
}
|
|
21993
|
+
}
|
|
21994
|
+
});
|
|
21995
|
+
return validationErrors;
|
|
21330
21996
|
}
|
|
21331
21997
|
}
|
|
21332
21998
|
}));
|
|
@@ -21372,6 +22038,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21372
22038
|
errors = errors.concat(validateObject({
|
|
21373
22039
|
key,
|
|
21374
22040
|
value,
|
|
22041
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
21375
22042
|
valueSpec: styleSpec[`source_${ type.replace('-', '_') }`],
|
|
21376
22043
|
style: options.style,
|
|
21377
22044
|
styleSpec,
|
|
@@ -21382,6 +22049,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21382
22049
|
errors = validateObject({
|
|
21383
22050
|
key,
|
|
21384
22051
|
value,
|
|
22052
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
21385
22053
|
valueSpec: styleSpec.source_geojson,
|
|
21386
22054
|
style,
|
|
21387
22055
|
styleSpec,
|
|
@@ -21422,6 +22090,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21422
22090
|
return validateObject({
|
|
21423
22091
|
key,
|
|
21424
22092
|
value,
|
|
22093
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
21425
22094
|
valueSpec: styleSpec.source_video,
|
|
21426
22095
|
style,
|
|
21427
22096
|
styleSpec
|
|
@@ -21430,6 +22099,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21430
22099
|
return validateObject({
|
|
21431
22100
|
key,
|
|
21432
22101
|
value,
|
|
22102
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
21433
22103
|
valueSpec: styleSpec.source_image,
|
|
21434
22104
|
style,
|
|
21435
22105
|
styleSpec
|
|
@@ -21440,7 +22110,8 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21440
22110
|
return validateEnum({
|
|
21441
22111
|
key: `${ key }.type`,
|
|
21442
22112
|
value: value.type,
|
|
21443
|
-
valueSpec: { values: getSourceTypeValues(styleSpec) }
|
|
22113
|
+
valueSpec: { values: getSourceTypeValues(styleSpec) }
|
|
22114
|
+
});
|
|
21444
22115
|
}
|
|
21445
22116
|
}
|
|
21446
22117
|
function getSourceTypeValues(styleSpec) {
|
|
@@ -21550,6 +22221,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21550
22221
|
errors = errors.concat(validate({
|
|
21551
22222
|
key,
|
|
21552
22223
|
value: light[key],
|
|
22224
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
21553
22225
|
valueSpec: styleSpec.transition,
|
|
21554
22226
|
style,
|
|
21555
22227
|
styleSpec
|
|
@@ -21558,6 +22230,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21558
22230
|
errors = errors.concat(validate({
|
|
21559
22231
|
key,
|
|
21560
22232
|
value: light[key],
|
|
22233
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
21561
22234
|
valueSpec: lightSpec[key],
|
|
21562
22235
|
style,
|
|
21563
22236
|
styleSpec
|
|
@@ -21633,6 +22306,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21633
22306
|
errors = errors.concat(validate({
|
|
21634
22307
|
key: key2,
|
|
21635
22308
|
value: light[key2],
|
|
22309
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
21636
22310
|
valueSpec: styleSpec.transition,
|
|
21637
22311
|
style,
|
|
21638
22312
|
styleSpec
|
|
@@ -21643,6 +22317,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21643
22317
|
errors = errors.concat(validate({
|
|
21644
22318
|
key: propertyKey,
|
|
21645
22319
|
value: properties[propertyKey],
|
|
22320
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
21646
22321
|
valueSpec: lightPropertySpec[propertyKey],
|
|
21647
22322
|
style,
|
|
21648
22323
|
styleSpec
|
|
@@ -21654,6 +22329,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21654
22329
|
errors = errors.concat(validate({
|
|
21655
22330
|
key: key2,
|
|
21656
22331
|
value: light[key2],
|
|
22332
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
21657
22333
|
valueSpec: lightSpec[key2],
|
|
21658
22334
|
style,
|
|
21659
22335
|
styleSpec
|
|
@@ -21694,6 +22370,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21694
22370
|
errors = errors.concat(validate({
|
|
21695
22371
|
key: key2,
|
|
21696
22372
|
value: terrain[key2],
|
|
22373
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
21697
22374
|
valueSpec: styleSpec.transition,
|
|
21698
22375
|
style,
|
|
21699
22376
|
styleSpec
|
|
@@ -21702,6 +22379,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21702
22379
|
errors = errors.concat(validate({
|
|
21703
22380
|
key: key2,
|
|
21704
22381
|
value: terrain[key2],
|
|
22382
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
21705
22383
|
valueSpec: terrainSpec[key2],
|
|
21706
22384
|
style,
|
|
21707
22385
|
styleSpec
|
|
@@ -21753,6 +22431,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21753
22431
|
errors = errors.concat(validate({
|
|
21754
22432
|
key,
|
|
21755
22433
|
value: fog[key],
|
|
22434
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
21756
22435
|
valueSpec: styleSpec.transition,
|
|
21757
22436
|
style,
|
|
21758
22437
|
styleSpec
|
|
@@ -21761,6 +22440,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21761
22440
|
errors = errors.concat(validate({
|
|
21762
22441
|
key,
|
|
21763
22442
|
value: fog[key],
|
|
22443
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
21764
22444
|
valueSpec: fogSpec[key],
|
|
21765
22445
|
style,
|
|
21766
22446
|
styleSpec
|
|
@@ -21799,6 +22479,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21799
22479
|
errors = errors.concat(validate({
|
|
21800
22480
|
key,
|
|
21801
22481
|
value: projection[key],
|
|
22482
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
21802
22483
|
valueSpec: projectionSpec[key],
|
|
21803
22484
|
style,
|
|
21804
22485
|
styleSpec
|
|
@@ -21831,6 +22512,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21831
22512
|
errors = errors.concat(validateObject({
|
|
21832
22513
|
key,
|
|
21833
22514
|
value: iconset,
|
|
22515
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
21834
22516
|
valueSpec: styleSpec[`iconset_${ type }`],
|
|
21835
22517
|
style,
|
|
21836
22518
|
styleSpec
|
|
@@ -21888,7 +22570,10 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21888
22570
|
}
|
|
21889
22571
|
return errors2;
|
|
21890
22572
|
}
|
|
21891
|
-
const errors = validateObject(Object.assign({}, options, {
|
|
22573
|
+
const errors = validateObject(Object.assign({}, options, {
|
|
22574
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
22575
|
+
valueSpec: valueSpec.type ? styleSpec[valueSpec.type] : valueSpec
|
|
22576
|
+
}));
|
|
21892
22577
|
return errors;
|
|
21893
22578
|
}
|
|
21894
22579
|
|
|
@@ -21923,6 +22608,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21923
22608
|
errors = errors.concat(validateElement({
|
|
21924
22609
|
key: (key ? `${ key }.` : key) + objectKey,
|
|
21925
22610
|
value: object[objectKey],
|
|
22611
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
21926
22612
|
valueSpec: elementSpec,
|
|
21927
22613
|
style,
|
|
21928
22614
|
styleSpec,
|
|
@@ -21962,6 +22648,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21962
22648
|
const errors = validateObject({
|
|
21963
22649
|
key: options.key || '',
|
|
21964
22650
|
value: style,
|
|
22651
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
21965
22652
|
valueSpec: Object.assign(styleSpec.$root, // Skip validation of the root properties that are not defined in the style spec (e.g. 'owner').
|
|
21966
22653
|
{ '*': { type: '*' } }),
|
|
21967
22654
|
styleSpec,
|