@mapbox/mapbox-gl-style-spec 14.15.0 → 14.16.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,5 @@
1
+ Please refer to the Mapbox GL JS [CHANGELOG.md](../../CHANGELOG.md) for details on latest changes to the style specification.
2
+
1
3
  ## 13.27.0
2
4
 
3
5
  ### Bug fixes 🐞
package/dist/index.cjs CHANGED
@@ -3067,9 +3067,15 @@
3067
3067
  0.8,
3068
3068
  2
3069
3069
  ],
3070
- doc: "Defines the minimum and maximum scaling factors for icon related properties like `icon-size`, `icon-halo-width`, `icon-halo-blur`",
3071
- minimum: 0.1,
3072
- maximum: 10,
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
+ ],
3073
3079
  experimental: true,
3074
3080
  "private": true,
3075
3081
  expression: {
@@ -3583,9 +3589,15 @@
3583
3589
  0.8,
3584
3590
  2
3585
3591
  ],
3586
- doc: "Defines the minimum and maximum scaling factors for text related properties like `text-size`, `text-max-width`, `text-halo-width`, `font-size`",
3587
- minimum: 0.1,
3588
- maximum: 10,
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
+ ],
3589
3601
  experimental: true,
3590
3602
  "private": true,
3591
3603
  expression: {
@@ -5593,6 +5605,18 @@
5593
5605
  }
5594
5606
  }
5595
5607
  },
5608
+ "is-active-floor": {
5609
+ doc: "Experimental. Returns `true` if the input floor id belongs to one of the active indoor floors, `false` otherwise. In case of array of strings, returns `true` if any of the input floor ids belongs to one of the active indoor floors, `false` otherwise. Only supported in filters.",
5610
+ group: "Indoor",
5611
+ experimental: true,
5612
+ "sdk-support": {
5613
+ "basic functionality": {
5614
+ js: "3.16.0",
5615
+ android: "11.16.0",
5616
+ ios: "11.16.0"
5617
+ }
5618
+ }
5619
+ },
5596
5620
  random: {
5597
5621
  doc: "Returns a random value in the specified range (first two input numbers) based on a supplied seed (third input). The seed can be an expression or a constant number or string value.",
5598
5622
  group: "Math",
@@ -16575,23 +16599,6 @@
16575
16599
  });
16576
16600
  return result;
16577
16601
  }
16578
- function getConfigDependencies(e) {
16579
- if (e instanceof Config) {
16580
- const singleConfig = /* @__PURE__ */
16581
- new Set([e.key]);
16582
- return singleConfig;
16583
- }
16584
- let result = /* @__PURE__ */
16585
- new Set();
16586
- e.eachChild(arg => {
16587
- result = /* @__PURE__ */
16588
- new Set([
16589
- ...result,
16590
- ...getConfigDependencies(arg)
16591
- ]);
16592
- });
16593
- return result;
16594
- }
16595
16602
  function isGlobalPropertyConstant(e, properties) {
16596
16603
  if (e instanceof CompoundExpression && properties.indexOf(e.name) >= 0) {
16597
16604
  return false;
@@ -18570,6 +18577,21 @@
18570
18577
  [],
18571
18578
  ctx => ctx.globals.worldview || ''
18572
18579
  ],
18580
+ 'is-active-floor': [
18581
+ BooleanType,
18582
+ varargs(StringType),
18583
+ (ctx, args) => {
18584
+ const hasActiveFloors = ctx.globals.activeFloors && ctx.globals.activeFloors.size > 0;
18585
+ if (!hasActiveFloors) {
18586
+ return false;
18587
+ }
18588
+ const floorIds = ctx.globals.activeFloors;
18589
+ return args.some(arg => {
18590
+ const value = arg.evaluate(ctx);
18591
+ return floorIds.has(value);
18592
+ });
18593
+ }
18594
+ ],
18573
18595
  'id': [
18574
18596
  ValueType,
18575
18597
  [],
@@ -19063,6 +19085,36 @@
19063
19085
  ]
19064
19086
  });
19065
19087
 
19088
+ function getConfigDependencies(e) {
19089
+ if (e instanceof Config) {
19090
+ const singleConfig = /* @__PURE__ */
19091
+ new Set([e.key]);
19092
+ return singleConfig;
19093
+ }
19094
+ let result = /* @__PURE__ */
19095
+ new Set();
19096
+ e.eachChild(arg => {
19097
+ result = /* @__PURE__ */
19098
+ new Set([
19099
+ ...result,
19100
+ ...getConfigDependencies(arg)
19101
+ ]);
19102
+ });
19103
+ return result;
19104
+ }
19105
+ function isIndoorDependent(e) {
19106
+ if (e instanceof CompoundExpression && e.name === 'is-active-floor') {
19107
+ return true;
19108
+ }
19109
+ let result = false;
19110
+ e.eachChild(arg => {
19111
+ if (!result && isIndoorDependent(arg)) {
19112
+ result = true;
19113
+ }
19114
+ });
19115
+ return result;
19116
+ }
19117
+
19066
19118
  function success(value) {
19067
19119
  return {
19068
19120
  result: 'success',
@@ -19316,6 +19368,7 @@
19316
19368
  this._defaultValue = propertySpec ? getDefaultValue(propertySpec) : null;
19317
19369
  this._enumValues = propertySpec && propertySpec.type === 'enum' ? propertySpec.values : null;
19318
19370
  this.configDependencies = getConfigDependencies(expression);
19371
+ this.isIndoorDependent = isIndoorDependent(expression);
19319
19372
  }
19320
19373
  evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection, featureTileCoord, featureDistanceData) {
19321
19374
  this._evaluator.globals = globals;
@@ -19377,6 +19430,7 @@
19377
19430
  this.isLineProgressConstant = isLineProgressConstant;
19378
19431
  this.isStateDependent = kind !== 'constant' && !isStateConstant(expression.expression);
19379
19432
  this.configDependencies = getConfigDependencies(expression.expression);
19433
+ this.isIndoorDependent = isIndoorDependent(expression.expression);
19380
19434
  }
19381
19435
  evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {
19382
19436
  return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);
@@ -19391,6 +19445,7 @@
19391
19445
  this.zoomStops = zoomStops;
19392
19446
  this._styleExpression = expression;
19393
19447
  this.isStateDependent = kind !== 'camera' && !isStateConstant(expression.expression);
19448
+ this.isIndoorDependent = isIndoorDependent(expression.expression);
19394
19449
  this.isLightConstant = isLightConstant;
19395
19450
  this.isLineProgressConstant = isLineProgressConstant;
19396
19451
  this.configDependencies = getConfigDependencies(expression.expression);
@@ -19489,6 +19544,7 @@
19489
19544
  kind: 'constant',
19490
19545
  configDependencies: /* @__PURE__ */
19491
19546
  new Set(),
19547
+ isIndoorDependent: false,
19492
19548
  evaluate: () => constant
19493
19549
  };
19494
19550
  }
@@ -21958,7 +22014,6 @@ Use an identity property function instead: ${ example }.`)];
21958
22014
  const validationErrors = validateArray({
21959
22015
  key: options2.key,
21960
22016
  value: options2.value,
21961
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
21962
22017
  valueSpec: options2.valueSpec,
21963
22018
  style: options2.style,
21964
22019
  styleSpec: options2.styleSpec,
@@ -22099,7 +22154,8 @@ Use an identity property function instead: ${ example }.`)];
22099
22154
  return validateEnum({
22100
22155
  key: `${ key }.type`,
22101
22156
  value: value.type,
22102
- valueSpec: { values: getSourceTypeValues(styleSpec) }});
22157
+ valueSpec: { values: getSourceTypeValues(styleSpec) }
22158
+ });
22103
22159
  }
22104
22160
  }
22105
22161
  function getSourceTypeValues(styleSpec) {