@mapbox/mapbox-gl-style-spec 14.31.0-rc.1 → 14.32.0-rc.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/dist/index.cjs +173 -188
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +34 -15
- package/dist/index.es.js +173 -188
- package/dist/index.es.js.map +1 -1
- package/expression/definitions/index.ts +3 -2
- package/expression/expression_dependencies.ts +20 -23
- package/expression/index.ts +23 -30
- package/expression/is_constant.ts +20 -1
- package/expression/parsing_context.ts +73 -57
- package/expression/types.ts +14 -32
- package/feature_filter/index.ts +2 -1
- package/format.ts +10 -17
- package/function/index.ts +106 -155
- package/migrate/v8.ts +49 -80
- package/migrate/v9.ts +13 -13
- package/migrate.ts +2 -3
- package/package.json +1 -1
- package/reference/v8.json +39 -26
- package/validate/validate_appearance.ts +1 -2
- package/validate/validate_expression.ts +12 -11
- package/validate_mapbox_api_supported.ts +1 -1
package/dist/index.cjs
CHANGED
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"default": 0,
|
|
49
49
|
period: 360,
|
|
50
50
|
units: "degrees",
|
|
51
|
-
doc: "Default bearing
|
|
51
|
+
doc: "Default bearing. The bearing is the compass direction that is \"up\"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",
|
|
52
52
|
example: 29
|
|
53
53
|
},
|
|
54
54
|
pitch: {
|
|
55
55
|
type: "number",
|
|
56
56
|
"default": 0,
|
|
57
57
|
units: "degrees",
|
|
58
|
-
doc: "Default pitch
|
|
58
|
+
doc: "Default pitch. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",
|
|
59
59
|
example: 50
|
|
60
60
|
},
|
|
61
61
|
light: {
|
|
@@ -1875,9 +1875,9 @@
|
|
|
1875
1875
|
doc: "If true, the models will be reduced in density based on the zoom level. This is useful for large datasets that may be slow to render.",
|
|
1876
1876
|
"sdk-support": {
|
|
1877
1877
|
"basic functionality": {
|
|
1878
|
-
js: "
|
|
1879
|
-
android: "
|
|
1880
|
-
ios: "
|
|
1878
|
+
js: "3.18.0",
|
|
1879
|
+
android: "11.20.0",
|
|
1880
|
+
ios: "11.18.0"
|
|
1881
1881
|
}
|
|
1882
1882
|
},
|
|
1883
1883
|
"property-type": "data-constant"
|
|
@@ -2264,6 +2264,7 @@
|
|
|
2264
2264
|
maximum: 20,
|
|
2265
2265
|
"default": 3.1,
|
|
2266
2266
|
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).",
|
|
2267
|
+
units: "meters",
|
|
2267
2268
|
"private": true,
|
|
2268
2269
|
"property-type": "data-driven",
|
|
2269
2270
|
"sdk-support": {
|
|
@@ -2431,7 +2432,7 @@
|
|
|
2431
2432
|
units: "meters",
|
|
2432
2433
|
"default": 0,
|
|
2433
2434
|
minimum: 0,
|
|
2434
|
-
doc: "The extent of the flood light effect on the walls of the buildings
|
|
2435
|
+
doc: "The extent of the flood light effect on the walls of the buildings.",
|
|
2435
2436
|
requires: [
|
|
2436
2437
|
"lights"
|
|
2437
2438
|
],
|
|
@@ -2462,7 +2463,7 @@
|
|
|
2462
2463
|
"private": true,
|
|
2463
2464
|
units: "meters",
|
|
2464
2465
|
"default": 0,
|
|
2465
|
-
doc: "The extent of the flood light effect on the ground beneath the buildings
|
|
2466
|
+
doc: "The extent of the flood light effect on the ground beneath the buildings.",
|
|
2466
2467
|
requires: [
|
|
2467
2468
|
"lights"
|
|
2468
2469
|
],
|
|
@@ -2491,7 +2492,6 @@
|
|
|
2491
2492
|
"property-type": "data-driven",
|
|
2492
2493
|
type: "boolean",
|
|
2493
2494
|
"private": true,
|
|
2494
|
-
units: "meters",
|
|
2495
2495
|
"default": false,
|
|
2496
2496
|
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.",
|
|
2497
2497
|
transition: true,
|
|
@@ -2672,8 +2672,9 @@
|
|
|
2672
2672
|
},
|
|
2673
2673
|
"line-z-offset": {
|
|
2674
2674
|
type: "number",
|
|
2675
|
-
doc: "Vertical offset from ground
|
|
2675
|
+
doc: "Vertical offset from ground. Not supported for globe projection at the moment.",
|
|
2676
2676
|
"default": 0,
|
|
2677
|
+
units: "meters",
|
|
2677
2678
|
requires: [
|
|
2678
2679
|
"line-elevation-reference"
|
|
2679
2680
|
],
|
|
@@ -5963,7 +5964,8 @@
|
|
|
5963
5964
|
],
|
|
5964
5965
|
relaxZoomRestriction: true
|
|
5965
5966
|
},
|
|
5966
|
-
doc: "An array of two number values, specifying the vertical range
|
|
5967
|
+
doc: "An array of two number values, specifying the vertical range over which the fog should gradually fade out. When both parameters are set to zero, the fog will be rendered without any vertical constraints.",
|
|
5968
|
+
units: "meters",
|
|
5967
5969
|
"sdk-support": {
|
|
5968
5970
|
"basic functionality": {
|
|
5969
5971
|
js: "3.0.0",
|
|
@@ -7104,7 +7106,7 @@
|
|
|
7104
7106
|
]
|
|
7105
7107
|
},
|
|
7106
7108
|
requires: [
|
|
7107
|
-
"
|
|
7109
|
+
"fill-pattern"
|
|
7108
7110
|
],
|
|
7109
7111
|
"sdk-support": {
|
|
7110
7112
|
"basic functionality": {
|
|
@@ -7143,7 +7145,8 @@
|
|
|
7143
7145
|
},
|
|
7144
7146
|
"fill-z-offset": {
|
|
7145
7147
|
type: "number",
|
|
7146
|
-
doc: "Specifies an uniform elevation
|
|
7148
|
+
doc: "Specifies an uniform elevation. Note: If the value is zero, the layer will be rendered on the ground. Non-zero values will elevate the layer from the sea level, which can cause it to be rendered below the terrain.",
|
|
7149
|
+
units: "meters",
|
|
7147
7150
|
"default": 0,
|
|
7148
7151
|
minimum: 0,
|
|
7149
7152
|
transition: true,
|
|
@@ -7308,7 +7311,8 @@
|
|
|
7308
7311
|
]
|
|
7309
7312
|
},
|
|
7310
7313
|
transition: true,
|
|
7311
|
-
doc: "The extent of the ambient occlusion effect on the ground beneath the procedural buildings
|
|
7314
|
+
doc: "The extent of the ambient occlusion effect on the ground beneath the procedural buildings.",
|
|
7315
|
+
units: "meters",
|
|
7312
7316
|
"sdk-support": {
|
|
7313
7317
|
"basic functionality": {
|
|
7314
7318
|
js: "3.16.0",
|
|
@@ -7814,7 +7818,7 @@
|
|
|
7814
7818
|
minimum: 0,
|
|
7815
7819
|
transition: true,
|
|
7816
7820
|
units: "pixels",
|
|
7817
|
-
doc: "Blur applied to the line
|
|
7821
|
+
doc: "Blur applied to the line.",
|
|
7818
7822
|
"sdk-support": {
|
|
7819
7823
|
"basic functionality": {
|
|
7820
7824
|
js: "0.10.0",
|
|
@@ -8122,6 +8126,7 @@
|
|
|
8122
8126
|
"default": 0,
|
|
8123
8127
|
minimum: 0,
|
|
8124
8128
|
transition: true,
|
|
8129
|
+
units: "pixels",
|
|
8125
8130
|
"sdk-support": {
|
|
8126
8131
|
"basic functionality": {
|
|
8127
8132
|
js: "3.0.0",
|
|
@@ -8292,7 +8297,7 @@
|
|
|
8292
8297
|
"default": 0,
|
|
8293
8298
|
minimum: 0,
|
|
8294
8299
|
units: "meters",
|
|
8295
|
-
doc: "Depth offset along the camera
|
|
8300
|
+
doc: "Depth offset along the camera. When set to a non-zero value, applied cutout opacity is 0.",
|
|
8296
8301
|
experimental: true,
|
|
8297
8302
|
"private": true,
|
|
8298
8303
|
transition: true,
|
|
@@ -8662,7 +8667,7 @@
|
|
|
8662
8667
|
minimum: 1,
|
|
8663
8668
|
transition: true,
|
|
8664
8669
|
units: "pixels",
|
|
8665
|
-
doc: "Radius of influence of one heatmap point
|
|
8670
|
+
doc: "Radius of influence of one heatmap point. Increasing the value makes the heatmap smoother, but less detailed. `queryRenderedFeatures` on heatmap layers will return points within this radius.",
|
|
8666
8671
|
"sdk-support": {
|
|
8667
8672
|
"basic functionality": {
|
|
8668
8673
|
js: "0.41.0",
|
|
@@ -9499,7 +9504,8 @@
|
|
|
9499
9504
|
},
|
|
9500
9505
|
"symbol-z-offset": {
|
|
9501
9506
|
type: "number",
|
|
9502
|
-
doc: "Specifies an uniform elevation from the ground
|
|
9507
|
+
doc: "Specifies an uniform elevation from the ground.",
|
|
9508
|
+
units: "meters",
|
|
9503
9509
|
"default": 0,
|
|
9504
9510
|
minimum: 0,
|
|
9505
9511
|
transition: true,
|
|
@@ -9935,10 +9941,11 @@
|
|
|
9935
9941
|
},
|
|
9936
9942
|
"raster-elevation": {
|
|
9937
9943
|
type: "number",
|
|
9938
|
-
doc: "Defines an uniform elevation from the base specified in raster-elevation-reference
|
|
9944
|
+
doc: "Defines an uniform elevation from the base specified in raster-elevation-reference.",
|
|
9939
9945
|
"default": 0,
|
|
9940
9946
|
minimum: 0,
|
|
9941
9947
|
transition: true,
|
|
9948
|
+
units: "meters",
|
|
9942
9949
|
experimental: true,
|
|
9943
9950
|
"sdk-support": {
|
|
9944
9951
|
"basic functionality": {
|
|
@@ -9989,6 +9996,7 @@
|
|
|
9989
9996
|
minimum: 0,
|
|
9990
9997
|
maximum: 359,
|
|
9991
9998
|
doc: "The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map` and no 3d lights enabled. If `hillshade-illumination-anchor` is set to `map` and 3d lights enabled, the direction from 3d lights is used instead.",
|
|
9999
|
+
units: "degrees",
|
|
9992
10000
|
transition: false,
|
|
9993
10001
|
"sdk-support": {
|
|
9994
10002
|
"basic functionality": {
|
|
@@ -10404,7 +10412,8 @@
|
|
|
10404
10412
|
minimum: 0,
|
|
10405
10413
|
maximum: 180,
|
|
10406
10414
|
transition: false,
|
|
10407
|
-
doc: "The angular distance
|
|
10415
|
+
doc: "The angular distance from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.",
|
|
10416
|
+
units: "degrees",
|
|
10408
10417
|
"sdk-support": {
|
|
10409
10418
|
"basic functionality": {
|
|
10410
10419
|
js: "2.0.0",
|
|
@@ -10652,7 +10661,8 @@
|
|
|
10652
10661
|
}
|
|
10653
10662
|
},
|
|
10654
10663
|
transition: true,
|
|
10655
|
-
|
|
10664
|
+
units: "meters",
|
|
10665
|
+
doc: "The translation of the model in form of [longitudal, latitudal, altitude] offsets."
|
|
10656
10666
|
},
|
|
10657
10667
|
"model-color": {
|
|
10658
10668
|
type: "color",
|
|
@@ -11185,7 +11195,8 @@
|
|
|
11185
11195
|
"default": 0,
|
|
11186
11196
|
minimum: 0,
|
|
11187
11197
|
maximum: 1,
|
|
11188
|
-
doc: "Radius of a fill extrusion edge
|
|
11198
|
+
doc: "Radius of a fill extrusion edge. If not zero, rounds extrusion edges for a smoother appearance.",
|
|
11199
|
+
units: "meters",
|
|
11189
11200
|
"sdk-support": {
|
|
11190
11201
|
"basic functionality": {
|
|
11191
11202
|
js: "3.0.0",
|
|
@@ -11526,7 +11537,7 @@
|
|
|
11526
11537
|
]
|
|
11527
11538
|
},
|
|
11528
11539
|
requires: [
|
|
11529
|
-
"
|
|
11540
|
+
"fill-extrusion-pattern"
|
|
11530
11541
|
],
|
|
11531
11542
|
"sdk-support": {
|
|
11532
11543
|
"basic functionality": {
|
|
@@ -11753,7 +11764,8 @@
|
|
|
11753
11764
|
]
|
|
11754
11765
|
},
|
|
11755
11766
|
transition: true,
|
|
11756
|
-
doc: "The extent of the ambient occlusion effect on the ground beneath the extruded buildings
|
|
11767
|
+
doc: "The extent of the ambient occlusion effect on the ground beneath the extruded buildings.",
|
|
11768
|
+
units: "meters",
|
|
11757
11769
|
requires: [
|
|
11758
11770
|
"lights"
|
|
11759
11771
|
],
|
|
@@ -11851,7 +11863,7 @@
|
|
|
11851
11863
|
units: "meters",
|
|
11852
11864
|
"default": 0,
|
|
11853
11865
|
minimum: 0,
|
|
11854
|
-
doc: "The extent of the flood light effect on the walls of the extruded buildings
|
|
11866
|
+
doc: "The extent of the flood light effect on the walls of the extruded buildings.",
|
|
11855
11867
|
requires: [
|
|
11856
11868
|
"lights"
|
|
11857
11869
|
],
|
|
@@ -11882,7 +11894,7 @@
|
|
|
11882
11894
|
experimental: true,
|
|
11883
11895
|
units: "meters",
|
|
11884
11896
|
"default": 0,
|
|
11885
|
-
doc: "The extent of the flood light effect on the ground beneath the extruded buildings
|
|
11897
|
+
doc: "The extent of the flood light effect on the ground beneath the extruded buildings. Note: this experimental property is evaluated once per tile, during tile initialization. Changing the property value could trigger tile reload. The `feature-state` styling is deprecated and will get removed soon.",
|
|
11886
11898
|
requires: [
|
|
11887
11899
|
"lights"
|
|
11888
11900
|
],
|
|
@@ -12250,10 +12262,11 @@
|
|
|
12250
12262
|
},
|
|
12251
12263
|
"raster-particle-elevation": {
|
|
12252
12264
|
type: "number",
|
|
12253
|
-
doc: "Defines an uniform elevation from sea level
|
|
12265
|
+
doc: "Defines an uniform elevation from sea level.",
|
|
12254
12266
|
"default": 0,
|
|
12255
12267
|
minimum: 0,
|
|
12256
12268
|
transition: true,
|
|
12269
|
+
units: "meters",
|
|
12257
12270
|
"sdk-support": {
|
|
12258
12271
|
"basic functionality": {
|
|
12259
12272
|
js: "3.7.0",
|
|
@@ -12411,11 +12424,11 @@
|
|
|
12411
12424
|
return result;
|
|
12412
12425
|
}
|
|
12413
12426
|
function format(style, space = 2) {
|
|
12414
|
-
|
|
12415
|
-
if (
|
|
12416
|
-
|
|
12427
|
+
const sorted = sortKeysBy(style, v8.$root);
|
|
12428
|
+
if (sorted.layers) {
|
|
12429
|
+
sorted.layers = sorted.layers.map((layer) => sortKeysBy(layer, v8.layer));
|
|
12417
12430
|
}
|
|
12418
|
-
return stringify(
|
|
12431
|
+
return stringify(sorted, { indent: space });
|
|
12419
12432
|
}
|
|
12420
12433
|
|
|
12421
12434
|
function getPropertyReference(propertyName) {
|
|
@@ -12668,34 +12681,15 @@
|
|
|
12668
12681
|
return type.kind;
|
|
12669
12682
|
}
|
|
12670
12683
|
}
|
|
12671
|
-
const valueMemberTypes = [
|
|
12672
|
-
NullType,
|
|
12673
|
-
NumberType,
|
|
12674
|
-
StringType,
|
|
12675
|
-
BooleanType,
|
|
12676
|
-
ColorType,
|
|
12677
|
-
FormattedType,
|
|
12678
|
-
ObjectType,
|
|
12679
|
-
array$1(ValueType),
|
|
12680
|
-
ResolvedImageType
|
|
12681
|
-
];
|
|
12682
12684
|
function checkSubtype(expected, t) {
|
|
12683
|
-
|
|
12684
|
-
|
|
12685
|
-
|
|
12686
|
-
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
} else if (expected.kind === t.kind) {
|
|
12690
|
-
return null;
|
|
12691
|
-
} else if (expected.kind === "value") {
|
|
12692
|
-
for (const memberType of valueMemberTypes) {
|
|
12693
|
-
if (!checkSubtype(memberType, t)) {
|
|
12694
|
-
return null;
|
|
12695
|
-
}
|
|
12696
|
-
}
|
|
12685
|
+
return isSubtype(expected, t) ? null : `Expected ${toString$1(expected)} but found ${toString$1(t)} instead.`;
|
|
12686
|
+
}
|
|
12687
|
+
function isSubtype(expected, t) {
|
|
12688
|
+
if (t.kind === "error") return true;
|
|
12689
|
+
if (expected.kind === "array") {
|
|
12690
|
+
return t.kind === "array" && (t.N === 0 && t.itemType.kind === "value" || isSubtype(expected.itemType, t.itemType)) && (typeof expected.N !== "number" || expected.N === t.N);
|
|
12697
12691
|
}
|
|
12698
|
-
return
|
|
12692
|
+
return expected.kind === t.kind || expected.kind === "value" && t.kind !== "collator";
|
|
12699
12693
|
}
|
|
12700
12694
|
function isValidType(provided, allowedTypes) {
|
|
12701
12695
|
return allowedTypes.some((t) => t.kind === provided.kind);
|
|
@@ -15214,6 +15208,21 @@
|
|
|
15214
15208
|
function isGlobalPropertyConstant(e, properties) {
|
|
15215
15209
|
return isGlobalPropertyConstantSet(e, new Set(properties));
|
|
15216
15210
|
}
|
|
15211
|
+
const GlobalDependency = { Zoom: 1, Light: 2, LineProgress: 4 };
|
|
15212
|
+
const globalDependencyFlags = {
|
|
15213
|
+
"zoom": GlobalDependency.Zoom,
|
|
15214
|
+
"pitch": GlobalDependency.Zoom,
|
|
15215
|
+
"distance-from-center": GlobalDependency.Zoom,
|
|
15216
|
+
"measure-light": GlobalDependency.Light,
|
|
15217
|
+
"line-progress": GlobalDependency.LineProgress
|
|
15218
|
+
};
|
|
15219
|
+
function getGlobalDependencies(e) {
|
|
15220
|
+
let flags = e instanceof CompoundExpression ? globalDependencyFlags[e.name] || 0 : 0;
|
|
15221
|
+
e.eachChild((arg) => {
|
|
15222
|
+
flags |= getGlobalDependencies(arg);
|
|
15223
|
+
});
|
|
15224
|
+
return flags;
|
|
15225
|
+
}
|
|
15217
15226
|
|
|
15218
15227
|
const RE = 6378.137;
|
|
15219
15228
|
const FE = 1 / 298.257223563;
|
|
@@ -15896,7 +15905,7 @@
|
|
|
15896
15905
|
* @param options.omitTypeAnnotations set true to omit inferred type annotations. Caller beware: with this option set, the parsed expression's type will NOT satisfy `expectedType` if it would normally be wrapped in an inferred annotation.
|
|
15897
15906
|
* @private
|
|
15898
15907
|
*/
|
|
15899
|
-
parse(expr, index, expectedType, bindings, options
|
|
15908
|
+
parse(expr, index, expectedType, bindings, options) {
|
|
15900
15909
|
if (index || expectedType) {
|
|
15901
15910
|
const prevExpectedType = this.expectedType;
|
|
15902
15911
|
const prevScope = this.scope;
|
|
@@ -15920,7 +15929,7 @@
|
|
|
15920
15929
|
* @param options.omitTypeAnnotations set true to omit inferred type annotations. Caller beware: with this option set, the parsed expression's type will NOT satisfy `expectedType` if it would normally be wrapped in an inferred annotation.
|
|
15921
15930
|
* @private
|
|
15922
15931
|
*/
|
|
15923
|
-
parseObjectValue(expr, index, key, expectedType, bindings, options
|
|
15932
|
+
parseObjectValue(expr, index, key, expectedType, bindings, options) {
|
|
15924
15933
|
const prevExpectedType = this.expectedType;
|
|
15925
15934
|
const prevScope = this.scope;
|
|
15926
15935
|
if (bindings) this.scope = this.scope.concat(bindings);
|
|
@@ -15934,41 +15943,34 @@
|
|
|
15934
15943
|
this.scope = prevScope;
|
|
15935
15944
|
return result;
|
|
15936
15945
|
}
|
|
15937
|
-
|
|
15938
|
-
|
|
15939
|
-
|
|
15946
|
+
// Applies `expectedType` to a freshly parsed expression, wrapping it in an inferred assertion
|
|
15947
|
+
// or coercion where that is what the expected type calls for. Returns null if the type is wrong.
|
|
15948
|
+
_annotateToExpectedType(parsed, options) {
|
|
15949
|
+
const expected = this.expectedType;
|
|
15950
|
+
if (!expected) return parsed;
|
|
15951
|
+
const actual = parsed.type;
|
|
15952
|
+
if ((expected.kind === "string" || expected.kind === "number" || expected.kind === "boolean" || expected.kind === "object" || expected.kind === "array") && actual.kind === "value") {
|
|
15953
|
+
return annotate(parsed, expected, options?.typeAnnotation || "assert");
|
|
15954
|
+
} else if ((expected.kind === "color" || expected.kind === "formatted" || expected.kind === "resolvedImage") && (actual.kind === "value" || actual.kind === "string")) {
|
|
15955
|
+
return annotate(parsed, expected, options?.typeAnnotation || "coerce");
|
|
15956
|
+
} else if (this.checkSubtype(expected, actual)) {
|
|
15957
|
+
return null;
|
|
15940
15958
|
}
|
|
15941
|
-
|
|
15959
|
+
return parsed;
|
|
15960
|
+
}
|
|
15961
|
+
_parse(expr, options) {
|
|
15962
|
+
const scalarType = expr === null ? NullType : typeof expr === "string" ? StringType : typeof expr === "boolean" ? BooleanType : typeof expr === "number" ? NumberType : null;
|
|
15963
|
+
let result;
|
|
15964
|
+
if (scalarType) {
|
|
15965
|
+
result = new Literal(scalarType, expr);
|
|
15966
|
+
} else if (Array.isArray(expr)) {
|
|
15942
15967
|
if (expr.length === 0) {
|
|
15943
15968
|
return this.error(`Expected an array with at least one element. If you wanted a literal array, use ["literal", []].`);
|
|
15944
15969
|
}
|
|
15945
|
-
const Expr =
|
|
15946
|
-
if (Expr)
|
|
15947
|
-
|
|
15948
|
-
|
|
15949
|
-
if (this.expectedType) {
|
|
15950
|
-
const expected = this.expectedType;
|
|
15951
|
-
const actual = parsed.type;
|
|
15952
|
-
if ((expected.kind === "string" || expected.kind === "number" || expected.kind === "boolean" || expected.kind === "object" || expected.kind === "array") && actual.kind === "value") {
|
|
15953
|
-
parsed = annotate(parsed, expected, options.typeAnnotation || "assert");
|
|
15954
|
-
} else if ((expected.kind === "color" || expected.kind === "formatted" || expected.kind === "resolvedImage") && (actual.kind === "value" || actual.kind === "string")) {
|
|
15955
|
-
parsed = annotate(parsed, expected, options.typeAnnotation || "coerce");
|
|
15956
|
-
} else if (this.checkSubtype(expected, actual)) {
|
|
15957
|
-
return null;
|
|
15958
|
-
}
|
|
15959
|
-
}
|
|
15960
|
-
if (!(parsed instanceof Literal) && parsed.type.kind !== "resolvedImage" && isConstant(parsed)) {
|
|
15961
|
-
const ec = new EvaluationContext(this._scope, this.options, this.iconImageUseTheme);
|
|
15962
|
-
try {
|
|
15963
|
-
parsed = new Literal(parsed.type, parsed.evaluate(ec));
|
|
15964
|
-
} catch (e) {
|
|
15965
|
-
this.error(e.message);
|
|
15966
|
-
return null;
|
|
15967
|
-
}
|
|
15968
|
-
}
|
|
15969
|
-
return parsed;
|
|
15970
|
-
}
|
|
15971
|
-
return Coercion.parse(["to-array", expr], this);
|
|
15970
|
+
const Expr = this.registry[expr[0]];
|
|
15971
|
+
if (!Expr) return Coercion.parse(["to-array", expr], this);
|
|
15972
|
+
result = Expr.parse(expr, this);
|
|
15973
|
+
if (!result) return null;
|
|
15972
15974
|
} else if (typeof expr === "undefined") {
|
|
15973
15975
|
return this.error(`'undefined' value invalid. Use null instead.`);
|
|
15974
15976
|
} else if (typeof expr === "object") {
|
|
@@ -15976,6 +15978,18 @@
|
|
|
15976
15978
|
} else {
|
|
15977
15979
|
return this.error(`Expected an array, but found ${typeof expr} instead.`);
|
|
15978
15980
|
}
|
|
15981
|
+
let parsed = this._annotateToExpectedType(result, options);
|
|
15982
|
+
if (!parsed) return null;
|
|
15983
|
+
if (!(parsed instanceof Literal) && parsed.type.kind !== "resolvedImage" && isConstant(parsed)) {
|
|
15984
|
+
const ec = new EvaluationContext(this._scope, this.options, this.iconImageUseTheme);
|
|
15985
|
+
try {
|
|
15986
|
+
parsed = new Literal(parsed.type, parsed.evaluate(ec));
|
|
15987
|
+
} catch (e) {
|
|
15988
|
+
this.error(e.message);
|
|
15989
|
+
return null;
|
|
15990
|
+
}
|
|
15991
|
+
}
|
|
15992
|
+
return parsed;
|
|
15979
15993
|
}
|
|
15980
15994
|
/**
|
|
15981
15995
|
* Returns a copy of this context suitable for parsing the subexpression at
|
|
@@ -16007,10 +16021,12 @@
|
|
|
16007
16021
|
* overload signatures without polluting the parent errors list.
|
|
16008
16022
|
* @private
|
|
16009
16023
|
*/
|
|
16024
|
+
// `path` is shared rather than copied: argument parsing pushes and pops it in balance, and
|
|
16025
|
+
// `error` snapshots `key` into the message eagerly, so the fork never observes a stale path.
|
|
16010
16026
|
_forkForSignature() {
|
|
16011
16027
|
return new ParsingContext(
|
|
16012
16028
|
this.registry,
|
|
16013
|
-
this.path
|
|
16029
|
+
this.path,
|
|
16014
16030
|
null,
|
|
16015
16031
|
this.scope,
|
|
16016
16032
|
[],
|
|
@@ -17234,7 +17250,7 @@
|
|
|
17234
17250
|
};
|
|
17235
17251
|
}
|
|
17236
17252
|
|
|
17237
|
-
const expressions = {
|
|
17253
|
+
const expressions = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
17238
17254
|
// special forms
|
|
17239
17255
|
"==": Equals,
|
|
17240
17256
|
"!=": NotEquals,
|
|
@@ -17272,7 +17288,7 @@
|
|
|
17272
17288
|
"within": Within,
|
|
17273
17289
|
"distance": Distance,
|
|
17274
17290
|
"config": Config
|
|
17275
|
-
};
|
|
17291
|
+
});
|
|
17276
17292
|
function rgba(ctx, [r, g, b, a]) {
|
|
17277
17293
|
r = r.evaluate(ctx);
|
|
17278
17294
|
g = g.evaluate(ctx);
|
|
@@ -17945,28 +17961,22 @@
|
|
|
17945
17961
|
]
|
|
17946
17962
|
});
|
|
17947
17963
|
|
|
17948
|
-
|
|
17964
|
+
const NO_CONFIG_DEPENDENCIES = /* @__PURE__ */ new Set();
|
|
17965
|
+
function collect(e, deps) {
|
|
17949
17966
|
if (e instanceof Config) {
|
|
17950
|
-
|
|
17951
|
-
|
|
17967
|
+
if (deps.configDependencies === NO_CONFIG_DEPENDENCIES) deps.configDependencies = /* @__PURE__ */ new Set();
|
|
17968
|
+
deps.configDependencies.add(e.key);
|
|
17969
|
+
return;
|
|
17952
17970
|
}
|
|
17953
|
-
|
|
17971
|
+
if (e instanceof CompoundExpression && e.name === "is-active-floor") deps.isIndoorDependent = true;
|
|
17954
17972
|
e.eachChild((arg) => {
|
|
17955
|
-
|
|
17973
|
+
collect(arg, deps);
|
|
17956
17974
|
});
|
|
17957
|
-
return result;
|
|
17958
17975
|
}
|
|
17959
|
-
function
|
|
17960
|
-
|
|
17961
|
-
|
|
17962
|
-
|
|
17963
|
-
let result = false;
|
|
17964
|
-
e.eachChild((arg) => {
|
|
17965
|
-
if (!result && isIndoorDependent(arg)) {
|
|
17966
|
-
result = true;
|
|
17967
|
-
}
|
|
17968
|
-
});
|
|
17969
|
-
return result;
|
|
17976
|
+
function getExpressionDependencies(e) {
|
|
17977
|
+
const deps = { configDependencies: NO_CONFIG_DEPENDENCIES, isIndoorDependent: false };
|
|
17978
|
+
collect(e, deps);
|
|
17979
|
+
return deps;
|
|
17970
17980
|
}
|
|
17971
17981
|
|
|
17972
17982
|
function success(value) {
|
|
@@ -18003,7 +18013,8 @@
|
|
|
18003
18013
|
function identityFunction(x) {
|
|
18004
18014
|
return x;
|
|
18005
18015
|
}
|
|
18006
|
-
function createFunction(
|
|
18016
|
+
function createFunction(input, propertySpec) {
|
|
18017
|
+
let parameters = input;
|
|
18007
18018
|
const isColor = propertySpec.type === "color";
|
|
18008
18019
|
const zoomAndFeatureDependent = parameters.stops && typeof parameters.stops[0][0] === "object";
|
|
18009
18020
|
const featureDependent = zoomAndFeatureDependent || parameters.property !== void 0;
|
|
@@ -18052,13 +18063,9 @@
|
|
|
18052
18063
|
const zoom = stop[0].zoom;
|
|
18053
18064
|
if (featureFunctions[zoom] === void 0) {
|
|
18054
18065
|
featureFunctions[zoom] = {
|
|
18055
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
18056
18066
|
zoom,
|
|
18057
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
18058
18067
|
type: parameters.type,
|
|
18059
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
18060
18068
|
property: parameters.property,
|
|
18061
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
18062
18069
|
default: parameters.default,
|
|
18063
18070
|
stops: []
|
|
18064
18071
|
};
|
|
@@ -18075,29 +18082,21 @@
|
|
|
18075
18082
|
kind: "composite",
|
|
18076
18083
|
interpolationType,
|
|
18077
18084
|
interpolationFactor: Interpolate.interpolationFactor.bind(void 0, interpolationType),
|
|
18078
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
18079
18085
|
zoomStops: featureFunctionStops.map((s) => s[0]),
|
|
18080
18086
|
evaluate({ zoom }, properties) {
|
|
18081
18087
|
return evaluateExponentialFunction({
|
|
18082
18088
|
stops: featureFunctionStops,
|
|
18083
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
18084
18089
|
base: parameters.base
|
|
18085
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
18086
18090
|
}, propertySpec, zoom).evaluate(zoom, properties);
|
|
18087
18091
|
}
|
|
18088
18092
|
};
|
|
18089
18093
|
} else if (zoomDependent) {
|
|
18090
|
-
const interpolationType = type === "exponential" ?
|
|
18091
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
18092
|
-
{ name: "exponential", base: parameters.base !== void 0 ? parameters.base : 1 }
|
|
18093
|
-
) : null;
|
|
18094
|
+
const interpolationType = type === "exponential" ? { name: "exponential", base: parameters.base !== void 0 ? parameters.base : 1 } : null;
|
|
18094
18095
|
return {
|
|
18095
18096
|
kind: "camera",
|
|
18096
18097
|
interpolationType,
|
|
18097
18098
|
interpolationFactor: Interpolate.interpolationFactor.bind(void 0, interpolationType),
|
|
18098
|
-
// 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
|
|
18099
18099
|
zoomStops: parameters.stops.map((s) => s[0]),
|
|
18100
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
18101
18100
|
evaluate: ({ zoom }) => innerFun(parameters, propertySpec, zoom, hashedStops, categoricalKeyType)
|
|
18102
18101
|
};
|
|
18103
18102
|
} else {
|
|
@@ -18124,31 +18123,26 @@
|
|
|
18124
18123
|
}
|
|
18125
18124
|
function evaluateIntervalFunction(parameters, propertySpec, input) {
|
|
18126
18125
|
if (!isNumber(input)) return coalesce$1(parameters.default, propertySpec.default);
|
|
18127
|
-
const
|
|
18128
|
-
|
|
18129
|
-
if (
|
|
18130
|
-
if (input
|
|
18131
|
-
|
|
18132
|
-
|
|
18126
|
+
const stops = parameters.stops;
|
|
18127
|
+
const n = stops.length;
|
|
18128
|
+
if (n === 1) return stops[0][1];
|
|
18129
|
+
if (input <= stops[0][0]) return stops[0][1];
|
|
18130
|
+
if (input >= stops[n - 1][0]) return stops[n - 1][1];
|
|
18131
|
+
const index = findStopLessThanOrEqualTo(stops.map((stop) => stop[0]), input);
|
|
18132
|
+
return stops[index][1];
|
|
18133
18133
|
}
|
|
18134
18134
|
function evaluateExponentialFunction(parameters, propertySpec, input) {
|
|
18135
18135
|
const base = parameters.base !== void 0 ? parameters.base : 1;
|
|
18136
18136
|
if (!isNumber(input)) return coalesce$1(parameters.default, propertySpec.default);
|
|
18137
|
-
const
|
|
18138
|
-
|
|
18139
|
-
if (
|
|
18140
|
-
if (input
|
|
18141
|
-
|
|
18142
|
-
const
|
|
18143
|
-
|
|
18144
|
-
|
|
18145
|
-
|
|
18146
|
-
parameters.stops[index][0],
|
|
18147
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
18148
|
-
parameters.stops[index + 1][0]
|
|
18149
|
-
);
|
|
18150
|
-
const outputLower = parameters.stops[index][1];
|
|
18151
|
-
const outputUpper = parameters.stops[index + 1][1];
|
|
18137
|
+
const stops = parameters.stops;
|
|
18138
|
+
const n = stops.length;
|
|
18139
|
+
if (n === 1) return stops[0][1];
|
|
18140
|
+
if (input <= stops[0][0]) return stops[0][1];
|
|
18141
|
+
if (input >= stops[n - 1][0]) return stops[n - 1][1];
|
|
18142
|
+
const index = findStopLessThanOrEqualTo(stops.map((stop) => stop[0]), input);
|
|
18143
|
+
const t = interpolationFactor(input, base, stops[index][0], stops[index + 1][0]);
|
|
18144
|
+
const outputLower = stops[index][1];
|
|
18145
|
+
const outputUpper = stops[index + 1][1];
|
|
18152
18146
|
let interp = interpolate[propertySpec.type] || identityFunction;
|
|
18153
18147
|
if (parameters.colorSpace && parameters.colorSpace !== "rgb") {
|
|
18154
18148
|
const colorspace = colorSpaces[parameters.colorSpace];
|
|
@@ -18202,8 +18196,9 @@
|
|
|
18202
18196
|
this._evaluator = new EvaluationContext(scope, options, iconImageUseTheme);
|
|
18203
18197
|
this._defaultValue = propertySpec ? getDefaultValue(propertySpec) : null;
|
|
18204
18198
|
this._enumValues = propertySpec && propertySpec.type === "enum" ? propertySpec.values : null;
|
|
18205
|
-
|
|
18206
|
-
this.
|
|
18199
|
+
const dependencies = getExpressionDependencies(expression);
|
|
18200
|
+
this.configDependencies = dependencies.configDependencies;
|
|
18201
|
+
this.isIndoorDependent = dependencies.isIndoorDependent;
|
|
18207
18202
|
}
|
|
18208
18203
|
evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection, featureTileCoord, featureDistanceData) {
|
|
18209
18204
|
const evaluator = this._evaluator;
|
|
@@ -18275,8 +18270,8 @@
|
|
|
18275
18270
|
this.isLightConstant = isLightConstant;
|
|
18276
18271
|
this.isLineProgressConstant = isLineProgressConstant;
|
|
18277
18272
|
this.isStateDependent = kind !== "constant" && !isStateConstant(expression.expression);
|
|
18278
|
-
this.configDependencies =
|
|
18279
|
-
this.isIndoorDependent =
|
|
18273
|
+
this.configDependencies = expression.configDependencies;
|
|
18274
|
+
this.isIndoorDependent = expression.isIndoorDependent;
|
|
18280
18275
|
}
|
|
18281
18276
|
evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {
|
|
18282
18277
|
return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);
|
|
@@ -18291,10 +18286,10 @@
|
|
|
18291
18286
|
this.zoomStops = zoomStops;
|
|
18292
18287
|
this._styleExpression = expression;
|
|
18293
18288
|
this.isStateDependent = kind !== "camera" && !isStateConstant(expression.expression);
|
|
18294
|
-
this.isIndoorDependent =
|
|
18289
|
+
this.isIndoorDependent = expression.isIndoorDependent;
|
|
18295
18290
|
this.isLightConstant = isLightConstant;
|
|
18296
18291
|
this.isLineProgressConstant = isLineProgressConstant;
|
|
18297
|
-
this.configDependencies =
|
|
18292
|
+
this.configDependencies = expression.configDependencies;
|
|
18298
18293
|
this.interpolationType = interpolationType;
|
|
18299
18294
|
}
|
|
18300
18295
|
evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {
|
|
@@ -18312,24 +18307,25 @@
|
|
|
18312
18307
|
}
|
|
18313
18308
|
}
|
|
18314
18309
|
function createPropertyExpression(expression, propertySpec, scope, options, iconImageUseTheme) {
|
|
18315
|
-
|
|
18316
|
-
if (
|
|
18317
|
-
return
|
|
18310
|
+
const styleExpression = createExpression(expression, propertySpec, scope, options, iconImageUseTheme);
|
|
18311
|
+
if (styleExpression.result === "error") {
|
|
18312
|
+
return styleExpression;
|
|
18318
18313
|
}
|
|
18319
|
-
const parsed =
|
|
18314
|
+
const parsed = styleExpression.value.expression;
|
|
18320
18315
|
const isFeatureConstant$1 = isFeatureConstant(parsed);
|
|
18321
18316
|
if (!isFeatureConstant$1 && !supportsPropertyExpression(propertySpec)) {
|
|
18322
18317
|
return error([new ParsingError$1("", "data expressions not supported")]);
|
|
18323
18318
|
}
|
|
18324
|
-
const
|
|
18319
|
+
const globalDependencies = getGlobalDependencies(parsed);
|
|
18320
|
+
const isZoomConstant = (globalDependencies & GlobalDependency.Zoom) === 0;
|
|
18325
18321
|
if (!isZoomConstant && !supportsZoomExpression(propertySpec)) {
|
|
18326
18322
|
return error([new ParsingError$1("", "zoom expressions not supported")]);
|
|
18327
18323
|
}
|
|
18328
|
-
const isLightConstant =
|
|
18324
|
+
const isLightConstant = (globalDependencies & GlobalDependency.Light) === 0;
|
|
18329
18325
|
if (!isLightConstant && !supportsLightExpression(propertySpec)) {
|
|
18330
18326
|
return error([new ParsingError$1("", "measure-light expression not supported")]);
|
|
18331
18327
|
}
|
|
18332
|
-
const isLineProgressConstant =
|
|
18328
|
+
const isLineProgressConstant = (globalDependencies & GlobalDependency.LineProgress) === 0;
|
|
18333
18329
|
if (!isLineProgressConstant && !supportsLineProgressExpression(propertySpec)) {
|
|
18334
18330
|
return error([new ParsingError$1("", "line-progress expression not supported")]);
|
|
18335
18331
|
}
|
|
@@ -18343,22 +18339,10 @@
|
|
|
18343
18339
|
return error([new ParsingError$1("", '"interpolate" expressions cannot be used with this property')]);
|
|
18344
18340
|
}
|
|
18345
18341
|
if (!zoomCurve) {
|
|
18346
|
-
return success(isFeatureConstant$1 && isLineProgressConstant ? (
|
|
18347
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
18348
|
-
new ZoomConstantExpression("constant", expression.value, isLightConstant, isLineProgressConstant)
|
|
18349
|
-
) : (
|
|
18350
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
18351
|
-
new ZoomConstantExpression("source", expression.value, isLightConstant, isLineProgressConstant)
|
|
18352
|
-
));
|
|
18342
|
+
return success(isFeatureConstant$1 && isLineProgressConstant ? new ZoomConstantExpression("constant", styleExpression.value, isLightConstant, isLineProgressConstant) : new ZoomConstantExpression("source", styleExpression.value, isLightConstant, isLineProgressConstant));
|
|
18353
18343
|
}
|
|
18354
18344
|
const interpolationType = zoomCurve instanceof Interpolate ? zoomCurve.interpolation : void 0;
|
|
18355
|
-
return success(isFeatureConstant$1 && isLineProgressConstant ? (
|
|
18356
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
18357
|
-
new ZoomDependentExpression("camera", expression.value, zoomCurve.labels, interpolationType, isLightConstant, isLineProgressConstant)
|
|
18358
|
-
) : (
|
|
18359
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
18360
|
-
new ZoomDependentExpression("composite", expression.value, zoomCurve.labels, interpolationType, isLightConstant, isLineProgressConstant)
|
|
18361
|
-
));
|
|
18345
|
+
return success(isFeatureConstant$1 && isLineProgressConstant ? new ZoomDependentExpression("camera", styleExpression.value, zoomCurve.labels, interpolationType, isLightConstant, isLineProgressConstant) : new ZoomDependentExpression("composite", styleExpression.value, zoomCurve.labels, interpolationType, isLightConstant, isLineProgressConstant));
|
|
18362
18346
|
}
|
|
18363
18347
|
class StylePropertyFunction {
|
|
18364
18348
|
constructor(parameters, specification) {
|
|
@@ -18799,6 +18783,7 @@ ${JSON.stringify(filterExp, null, 2)}
|
|
|
18799
18783
|
}
|
|
18800
18784
|
}
|
|
18801
18785
|
function unionDynamicBranches(filter) {
|
|
18786
|
+
if (!Array.isArray(filter)) return;
|
|
18802
18787
|
let isBranchingDynamically = false;
|
|
18803
18788
|
const branches = [];
|
|
18804
18789
|
if (filter[0] === "case") {
|
|
@@ -20030,32 +20015,32 @@ ${JSON.stringify(filterExp, null, 2)}
|
|
|
20030
20015
|
return errors;
|
|
20031
20016
|
}
|
|
20032
20017
|
const FEATURE_OPERATORS = /* @__PURE__ */ new Set(["get", "has", "properties", "geometry-type", "id"]);
|
|
20033
|
-
const APPEARANCES_DISALLOWED_PARAMETERS = /* @__PURE__ */ new Set([
|
|
20034
|
-
"zoom",
|
|
20035
|
-
"pitch",
|
|
20036
|
-
"distance-from-center",
|
|
20037
|
-
"feature",
|
|
20038
|
-
"feature-state",
|
|
20039
|
-
"measure-light",
|
|
20040
|
-
"heatmap-density",
|
|
20041
|
-
"line-progress",
|
|
20042
|
-
"raster-value",
|
|
20043
|
-
"raster-particle-speed",
|
|
20044
|
-
"sky-radial-progress"
|
|
20045
|
-
]);
|
|
20046
20018
|
function checkDisallowedAppearancesParameters(e, options) {
|
|
20019
|
+
const disallowedParameters = /* @__PURE__ */ new Set([
|
|
20020
|
+
"zoom",
|
|
20021
|
+
"pitch",
|
|
20022
|
+
"distance-from-center",
|
|
20023
|
+
"feature",
|
|
20024
|
+
"feature-state",
|
|
20025
|
+
"measure-light",
|
|
20026
|
+
"heatmap-density",
|
|
20027
|
+
"line-progress",
|
|
20028
|
+
"raster-value",
|
|
20029
|
+
"raster-particle-speed",
|
|
20030
|
+
"sky-radial-progress"
|
|
20031
|
+
]);
|
|
20047
20032
|
if (options.valueSpec && options.valueSpec.expression) {
|
|
20048
20033
|
for (const param of options.valueSpec.expression.parameters) {
|
|
20049
|
-
|
|
20034
|
+
disallowedParameters.delete(param);
|
|
20050
20035
|
}
|
|
20051
20036
|
}
|
|
20052
|
-
if (
|
|
20037
|
+
if (disallowedParameters.size === 0) {
|
|
20053
20038
|
return [];
|
|
20054
20039
|
}
|
|
20055
20040
|
const errors = [];
|
|
20056
20041
|
if (e instanceof CompoundExpression) {
|
|
20057
20042
|
const param = FEATURE_OPERATORS.has(e.name) ? "feature" : e.name;
|
|
20058
|
-
if (
|
|
20043
|
+
if (disallowedParameters.has(param)) {
|
|
20059
20044
|
return [new ValidationError(options.key, options.value, `["${e.name}"] is not an allowed parameter`)];
|
|
20060
20045
|
}
|
|
20061
20046
|
}
|
|
@@ -20347,7 +20332,7 @@ Use an identity property function instead: ${example}.`
|
|
|
20347
20332
|
errors.push(...validateExpression({
|
|
20348
20333
|
key: options.key,
|
|
20349
20334
|
value: condition,
|
|
20350
|
-
valueSpec:
|
|
20335
|
+
valueSpec: options.styleSpec["appearance"]["condition"],
|
|
20351
20336
|
expressionContext: "appearance"
|
|
20352
20337
|
}));
|
|
20353
20338
|
return errors;
|