@mapbox/mapbox-gl-style-spec 14.16.0-beta.1 → 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
@@ -5605,6 +5605,18 @@
5605
5605
  }
5606
5606
  }
5607
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
+ },
5608
5620
  random: {
5609
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.",
5610
5622
  group: "Math",
@@ -16587,23 +16599,6 @@
16587
16599
  });
16588
16600
  return result;
16589
16601
  }
16590
- function getConfigDependencies(e) {
16591
- if (e instanceof Config) {
16592
- const singleConfig = /* @__PURE__ */
16593
- new Set([e.key]);
16594
- return singleConfig;
16595
- }
16596
- let result = /* @__PURE__ */
16597
- new Set();
16598
- e.eachChild(arg => {
16599
- result = /* @__PURE__ */
16600
- new Set([
16601
- ...result,
16602
- ...getConfigDependencies(arg)
16603
- ]);
16604
- });
16605
- return result;
16606
- }
16607
16602
  function isGlobalPropertyConstant(e, properties) {
16608
16603
  if (e instanceof CompoundExpression && properties.indexOf(e.name) >= 0) {
16609
16604
  return false;
@@ -18582,6 +18577,21 @@
18582
18577
  [],
18583
18578
  ctx => ctx.globals.worldview || ''
18584
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
+ ],
18585
18595
  'id': [
18586
18596
  ValueType,
18587
18597
  [],
@@ -19075,6 +19085,36 @@
19075
19085
  ]
19076
19086
  });
19077
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
+
19078
19118
  function success(value) {
19079
19119
  return {
19080
19120
  result: 'success',
@@ -19328,6 +19368,7 @@
19328
19368
  this._defaultValue = propertySpec ? getDefaultValue(propertySpec) : null;
19329
19369
  this._enumValues = propertySpec && propertySpec.type === 'enum' ? propertySpec.values : null;
19330
19370
  this.configDependencies = getConfigDependencies(expression);
19371
+ this.isIndoorDependent = isIndoorDependent(expression);
19331
19372
  }
19332
19373
  evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection, featureTileCoord, featureDistanceData) {
19333
19374
  this._evaluator.globals = globals;
@@ -19389,6 +19430,7 @@
19389
19430
  this.isLineProgressConstant = isLineProgressConstant;
19390
19431
  this.isStateDependent = kind !== 'constant' && !isStateConstant(expression.expression);
19391
19432
  this.configDependencies = getConfigDependencies(expression.expression);
19433
+ this.isIndoorDependent = isIndoorDependent(expression.expression);
19392
19434
  }
19393
19435
  evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {
19394
19436
  return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);
@@ -19403,6 +19445,7 @@
19403
19445
  this.zoomStops = zoomStops;
19404
19446
  this._styleExpression = expression;
19405
19447
  this.isStateDependent = kind !== 'camera' && !isStateConstant(expression.expression);
19448
+ this.isIndoorDependent = isIndoorDependent(expression.expression);
19406
19449
  this.isLightConstant = isLightConstant;
19407
19450
  this.isLineProgressConstant = isLineProgressConstant;
19408
19451
  this.configDependencies = getConfigDependencies(expression.expression);
@@ -19501,6 +19544,7 @@
19501
19544
  kind: 'constant',
19502
19545
  configDependencies: /* @__PURE__ */
19503
19546
  new Set(),
19547
+ isIndoorDependent: false,
19504
19548
  evaluate: () => constant
19505
19549
  };
19506
19550
  }