From 09260ffabbb900baed7a8d75b6cb674debc3ac95 Mon Sep 17 00:00:00 2001 From: Ivan Persidskii Date: Thu, 9 Jan 2025 15:50:30 +0200 Subject: [PATCH] Fix experimental properties generation, bump style spec (#2399) --- CHANGELOG.md | 5 + .../ContentBuilders/MapContent/Puck3D.swift | 2 + .../API Catalogs/Layer Property Values.md | 3 + .../Expressions/AllExpressions.swift | 2 +- .../Generated/Layers/BackgroundLayer.swift | 13 +- .../Style/Generated/Layers/CircleLayer.swift | 24 +- .../Generated/Layers/FillExtrusionLayer.swift | 42 +-- .../Style/Generated/Layers/FillLayer.swift | 36 ++- .../Style/Generated/Layers/HeatmapLayer.swift | 6 +- .../Generated/Layers/HillshadeLayer.swift | 6 +- .../Style/Generated/Layers/LineLayer.swift | 147 ++++++++-- .../Layers/LocationIndicatorLayer.swift | 42 +-- .../Style/Generated/Layers/ModelLayer.swift | 6 +- .../Style/Generated/Layers/RasterLayer.swift | 18 +- .../Style/Generated/Layers/SkyLayer.swift | 12 +- .../Style/Generated/Layers/SymbolLayer.swift | 180 ++++++++----- .../Generated/Light/DirectionalLight.swift | 23 ++ .../Generated/Properties/Properties.swift | 254 ++++++++++-------- Sources/MapboxMaps/Style/Generated/Rain.swift | 168 ++++++++++-- Sources/MapboxMaps/Style/Generated/Snow.swift | 116 ++++++-- .../Generated/Sources/RasterArraySource.swift | 2 +- .../Generated/Sources/RasterDemSource.swift | 2 +- .../Generated/Sources/RasterSource.swift | 2 +- .../Style/Fixtures/Value+Fixtures.swift | 2 +- .../BackgroundLayerIntegrationTests.swift | 2 +- .../Layers/FillLayerIntegrationTests.swift | 1 + .../Layers/LineLayerIntegrationTests.swift | 3 + .../RainIntegrationTests.swift | 6 + .../SnowIntegrationTests.swift | 4 + .../Generated/Layers/FillLayerTests.swift | 4 + .../Generated/Layers/LineLayerTests.swift | 12 + .../Generated/Layers/SymbolLayerTests.swift | 8 + .../Light/DirectionalLightTests.swift | 4 +- .../Properties/PropertiesTests.swift | 61 ++++- .../Style/Generated/RainTests.swift | 48 ++++ .../Style/Generated/SnowTests.swift | 32 +++ .../breakage_allowlist.txt | 88 ++++++ 37 files changed, 1036 insertions(+), 350 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0303ec0b220e..5e4fe5446d32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ Mapbox welcomes participation and contributions from everyone. ## main +* Mark `SymbolElevationReference`, `FillExtrusionBaseAlignment`, `FillExtrusionHeightAlignment`, `ModelScaleMode`, `ModelType`, `ClipLayerTypes`, `BackgroundPitchAlignment` types as Experimental. Initially they were exposed as stable by mistake. If you use them, please import `MapboxMaps` with `Experimental` SPI: +``` +@_spi(Experimental) import MapboxMaps +``` + * Localize geofencing attribution dialog. * Support dictionary expression literals. diff --git a/Sources/MapboxMaps/ContentBuilders/MapContent/Puck3D.swift b/Sources/MapboxMaps/ContentBuilders/MapContent/Puck3D.swift index edd8db39cfd4..afb760d05b3f 100644 --- a/Sources/MapboxMaps/ContentBuilders/MapContent/Puck3D.swift +++ b/Sources/MapboxMaps/ContentBuilders/MapContent/Puck3D.swift @@ -48,6 +48,8 @@ public struct Puck3D: MapContent, PrimitiveMapContent { } /// Defines scaling mode. Only applies to location-indicator type layers. Defaults to ``ModelScaleMode/viewport``. + @_documentation(visibility: public) + @_spi(Experimental) public func modelScaleMode(_ modelScaleMode: ModelScaleMode) -> Puck3D { copyAssigned(self, \.configuration.modelScaleMode, .constant(modelScaleMode)) } diff --git a/Sources/MapboxMaps/Documentation.docc/API Catalogs/Layer Property Values.md b/Sources/MapboxMaps/Documentation.docc/API Catalogs/Layer Property Values.md index 22423251f835..f7781c874a23 100644 --- a/Sources/MapboxMaps/Documentation.docc/API Catalogs/Layer Property Values.md +++ b/Sources/MapboxMaps/Documentation.docc/API Catalogs/Layer Property Values.md @@ -45,6 +45,9 @@ - ``BackgroundPitchAlignment`` - ``FillExtrusionBaseAlignment`` - ``FillExtrusionHeightAlignment`` +- ``FillElevationReference`` +- ``LineElevationReference`` +- ``LineWidthUnit`` - ``ImageContent`` diff --git a/Sources/MapboxMaps/Style/Generated/Expressions/AllExpressions.swift b/Sources/MapboxMaps/Style/Generated/Expressions/AllExpressions.swift index f58caff113df..48a16e9d6f74 100644 --- a/Sources/MapboxMaps/Style/Generated/Expressions/AllExpressions.swift +++ b/Sources/MapboxMaps/Style/Generated/Expressions/AllExpressions.swift @@ -168,7 +168,7 @@ public extension Exp { /// Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"]. public static let letExpression = Operator(rawValue: "let") - /// Returns the progress along a gradient line. Can only be used in the `line-gradient` property. + /// Returns the progress along a gradient line. Can only be used in the `line-gradient` and `line-z-offset` properties. public static let lineProgress = Operator(rawValue: "line-progress") /// Provides a literal array or object value. diff --git a/Sources/MapboxMaps/Style/Generated/Layers/BackgroundLayer.swift b/Sources/MapboxMaps/Style/Generated/Layers/BackgroundLayer.swift index 54b16af6ff60..30b7d370b164 100644 --- a/Sources/MapboxMaps/Style/Generated/Layers/BackgroundLayer.swift +++ b/Sources/MapboxMaps/Style/Generated/Layers/BackgroundLayer.swift @@ -33,7 +33,7 @@ public struct BackgroundLayer: Layer, Equatable { public var backgroundColorTransition: StyleTransition? /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of backgroundEmissiveStrength is in intensity. public var backgroundEmissiveStrength: Value? /// Transition options for `backgroundEmissiveStrength`. @@ -51,7 +51,8 @@ public struct BackgroundLayer: Layer, Equatable { /// Orientation of background layer. /// Default value: "map". - public var backgroundPitchAlignment: Value? + @_documentation(visibility: public) + @_spi(Experimental) public var backgroundPitchAlignment: Value? public init(id: String) { self.id = id @@ -175,7 +176,7 @@ extension BackgroundLayer { } /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of backgroundEmissiveStrength is in intensity. public func backgroundEmissiveStrength(_ constant: Double) -> Self { with(self, setter(\.backgroundEmissiveStrength, .constant(constant))) } @@ -186,7 +187,7 @@ extension BackgroundLayer { } /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of backgroundEmissiveStrength is in intensity. public func backgroundEmissiveStrength(_ expression: Exp) -> Self { with(self, setter(\.backgroundEmissiveStrength, .expression(expression))) } @@ -220,12 +221,16 @@ extension BackgroundLayer { /// Orientation of background layer. /// Default value: "map". + @_documentation(visibility: public) + @_spi(Experimental) public func backgroundPitchAlignment(_ constant: BackgroundPitchAlignment) -> Self { with(self, setter(\.backgroundPitchAlignment, .constant(constant))) } /// Orientation of background layer. /// Default value: "map". + @_documentation(visibility: public) + @_spi(Experimental) public func backgroundPitchAlignment(_ expression: Exp) -> Self { with(self, setter(\.backgroundPitchAlignment, .expression(expression))) } diff --git a/Sources/MapboxMaps/Style/Generated/Layers/CircleLayer.swift b/Sources/MapboxMaps/Style/Generated/Layers/CircleLayer.swift index 695a9f9e250c..1595b67e9b6d 100644 --- a/Sources/MapboxMaps/Style/Generated/Layers/CircleLayer.swift +++ b/Sources/MapboxMaps/Style/Generated/Layers/CircleLayer.swift @@ -57,7 +57,7 @@ public struct CircleLayer: Layer, Equatable { public var circleColorTransition: StyleTransition? /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of circleEmissiveStrength is in intensity. public var circleEmissiveStrength: Value? /// Transition options for `circleEmissiveStrength`. @@ -79,7 +79,7 @@ public struct CircleLayer: Layer, Equatable { public var circlePitchScale: Value? /// Circle radius. - /// Default value: 5. Minimum value: 0. + /// Default value: 5. Minimum value: 0. The unit of circleRadius is in pixels. public var circleRadius: Value? /// Transition options for `circleRadius`. @@ -100,14 +100,14 @@ public struct CircleLayer: Layer, Equatable { public var circleStrokeOpacityTransition: StyleTransition? /// The width of the circle's stroke. Strokes are placed outside of the `circle-radius`. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of circleStrokeWidth is in pixels. public var circleStrokeWidth: Value? /// Transition options for `circleStrokeWidth`. public var circleStrokeWidthTransition: StyleTransition? /// The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of circleTranslate is in pixels. public var circleTranslate: Value<[Double]>? /// Transition options for `circleTranslate`. @@ -337,7 +337,7 @@ extension CircleLayer { } /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of circleEmissiveStrength is in intensity. public func circleEmissiveStrength(_ constant: Double) -> Self { with(self, setter(\.circleEmissiveStrength, .constant(constant))) } @@ -348,7 +348,7 @@ extension CircleLayer { } /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of circleEmissiveStrength is in intensity. public func circleEmissiveStrength(_ expression: Exp) -> Self { with(self, setter(\.circleEmissiveStrength, .expression(expression))) } @@ -395,7 +395,7 @@ extension CircleLayer { } /// Circle radius. - /// Default value: 5. Minimum value: 0. + /// Default value: 5. Minimum value: 0. The unit of circleRadius is in pixels. public func circleRadius(_ constant: Double) -> Self { with(self, setter(\.circleRadius, .constant(constant))) } @@ -406,7 +406,7 @@ extension CircleLayer { } /// Circle radius. - /// Default value: 5. Minimum value: 0. + /// Default value: 5. Minimum value: 0. The unit of circleRadius is in pixels. public func circleRadius(_ expression: Exp) -> Self { with(self, setter(\.circleRadius, .expression(expression))) } @@ -452,7 +452,7 @@ extension CircleLayer { } /// The width of the circle's stroke. Strokes are placed outside of the `circle-radius`. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of circleStrokeWidth is in pixels. public func circleStrokeWidth(_ constant: Double) -> Self { with(self, setter(\.circleStrokeWidth, .constant(constant))) } @@ -463,13 +463,13 @@ extension CircleLayer { } /// The width of the circle's stroke. Strokes are placed outside of the `circle-radius`. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of circleStrokeWidth is in pixels. public func circleStrokeWidth(_ expression: Exp) -> Self { with(self, setter(\.circleStrokeWidth, .expression(expression))) } /// The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of circleTranslate is in pixels. public func circleTranslate(x: Double, y: Double) -> Self { with(self, setter(\.circleTranslate, .constant([x, y]))) } @@ -480,7 +480,7 @@ extension CircleLayer { } /// The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of circleTranslate is in pixels. public func circleTranslate(_ expression: Exp) -> Self { with(self, setter(\.circleTranslate, .expression(expression))) } diff --git a/Sources/MapboxMaps/Style/Generated/Layers/FillExtrusionLayer.swift b/Sources/MapboxMaps/Style/Generated/Layers/FillExtrusionLayer.swift index 03e2c9118c01..162391b3344a 100644 --- a/Sources/MapboxMaps/Style/Generated/Layers/FillExtrusionLayer.swift +++ b/Sources/MapboxMaps/Style/Generated/Layers/FillExtrusionLayer.swift @@ -86,7 +86,7 @@ public struct FillExtrusionLayer: Layer, Equatable { @_spi(Experimental) public var fillExtrusionAmbientOcclusionWallRadiusTransition: StyleTransition? /// The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of fillExtrusionBase is in meters. public var fillExtrusionBase: Value? /// Transition options for `fillExtrusionBase`. @@ -109,7 +109,7 @@ public struct FillExtrusionLayer: Layer, Equatable { public var fillExtrusionCutoffFadeRange: Value? /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of fillExtrusionEmissiveStrength is in intensity. public var fillExtrusionEmissiveStrength: Value? /// Transition options for `fillExtrusionEmissiveStrength`. @@ -134,7 +134,7 @@ public struct FillExtrusionLayer: Layer, Equatable { @_spi(Experimental) public var fillExtrusionFloodLightGroundAttenuationTransition: StyleTransition? /// The extent of the flood light effect on the ground beneath the extruded buildings in meters. 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. - /// Default value: 0. + /// Default value: 0. The unit of fillExtrusionFloodLightGroundRadius is in meters. @_documentation(visibility: public) @_spi(Experimental) public var fillExtrusionFloodLightGroundRadius: Value? @@ -152,7 +152,7 @@ public struct FillExtrusionLayer: Layer, Equatable { @_spi(Experimental) public var fillExtrusionFloodLightIntensityTransition: StyleTransition? /// The extent of the flood light effect on the walls of the extruded buildings in meters. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of fillExtrusionFloodLightWallRadius is in meters. @_documentation(visibility: public) @_spi(Experimental) public var fillExtrusionFloodLightWallRadius: Value? @@ -161,7 +161,7 @@ public struct FillExtrusionLayer: Layer, Equatable { @_spi(Experimental) public var fillExtrusionFloodLightWallRadiusTransition: StyleTransition? /// The height with which to extrude this layer. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of fillExtrusionHeight is in meters. public var fillExtrusionHeight: Value? /// Transition options for `fillExtrusionHeight`. @@ -173,7 +173,7 @@ public struct FillExtrusionLayer: Layer, Equatable { @_spi(Experimental) public var fillExtrusionHeightAlignment: Value? /// If a non-zero value is provided, it sets the fill-extrusion layer into wall rendering mode. The value is used to render the feature with the given width over the outlines of the geometry. Note: This property is experimental and some other fill-extrusion properties might not be supported with non-zero line width. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of fillExtrusionLineWidth is in meters. @_documentation(visibility: public) @_spi(Experimental) public var fillExtrusionLineWidth: Value? @@ -197,7 +197,7 @@ public struct FillExtrusionLayer: Layer, Equatable { @_spi(Experimental) public var fillExtrusionRoundedRoof: Value? /// The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of fillExtrusionTranslate is in pixels. public var fillExtrusionTranslate: Value<[Double]>? /// Transition options for `fillExtrusionTranslate`. @@ -575,7 +575,7 @@ extension FillExtrusionLayer { } /// The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of fillExtrusionBase is in meters. public func fillExtrusionBase(_ constant: Double) -> Self { with(self, setter(\.fillExtrusionBase, .constant(constant))) } @@ -586,7 +586,7 @@ extension FillExtrusionLayer { } /// The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of fillExtrusionBase is in meters. public func fillExtrusionBase(_ expression: Exp) -> Self { with(self, setter(\.fillExtrusionBase, .expression(expression))) } @@ -643,7 +643,7 @@ extension FillExtrusionLayer { } /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of fillExtrusionEmissiveStrength is in intensity. public func fillExtrusionEmissiveStrength(_ constant: Double) -> Self { with(self, setter(\.fillExtrusionEmissiveStrength, .constant(constant))) } @@ -654,7 +654,7 @@ extension FillExtrusionLayer { } /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of fillExtrusionEmissiveStrength is in intensity. public func fillExtrusionEmissiveStrength(_ expression: Exp) -> Self { with(self, setter(\.fillExtrusionEmissiveStrength, .expression(expression))) } @@ -714,7 +714,7 @@ extension FillExtrusionLayer { } /// The extent of the flood light effect on the ground beneath the extruded buildings in meters. 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. - /// Default value: 0. + /// Default value: 0. The unit of fillExtrusionFloodLightGroundRadius is in meters. @_documentation(visibility: public) @_spi(Experimental) public func fillExtrusionFloodLightGroundRadius(_ constant: Double) -> Self { @@ -729,7 +729,7 @@ extension FillExtrusionLayer { } /// The extent of the flood light effect on the ground beneath the extruded buildings in meters. 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. - /// Default value: 0. + /// Default value: 0. The unit of fillExtrusionFloodLightGroundRadius is in meters. @_documentation(visibility: public) @_spi(Experimental) public func fillExtrusionFloodLightGroundRadius(_ expression: Exp) -> Self { @@ -760,7 +760,7 @@ extension FillExtrusionLayer { } /// The extent of the flood light effect on the walls of the extruded buildings in meters. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of fillExtrusionFloodLightWallRadius is in meters. @_documentation(visibility: public) @_spi(Experimental) public func fillExtrusionFloodLightWallRadius(_ constant: Double) -> Self { @@ -775,7 +775,7 @@ extension FillExtrusionLayer { } /// The extent of the flood light effect on the walls of the extruded buildings in meters. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of fillExtrusionFloodLightWallRadius is in meters. @_documentation(visibility: public) @_spi(Experimental) public func fillExtrusionFloodLightWallRadius(_ expression: Exp) -> Self { @@ -783,7 +783,7 @@ extension FillExtrusionLayer { } /// The height with which to extrude this layer. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of fillExtrusionHeight is in meters. public func fillExtrusionHeight(_ constant: Double) -> Self { with(self, setter(\.fillExtrusionHeight, .constant(constant))) } @@ -794,7 +794,7 @@ extension FillExtrusionLayer { } /// The height with which to extrude this layer. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of fillExtrusionHeight is in meters. public func fillExtrusionHeight(_ expression: Exp) -> Self { with(self, setter(\.fillExtrusionHeight, .expression(expression))) } @@ -816,7 +816,7 @@ extension FillExtrusionLayer { } /// If a non-zero value is provided, it sets the fill-extrusion layer into wall rendering mode. The value is used to render the feature with the given width over the outlines of the geometry. Note: This property is experimental and some other fill-extrusion properties might not be supported with non-zero line width. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of fillExtrusionLineWidth is in meters. @_documentation(visibility: public) @_spi(Experimental) public func fillExtrusionLineWidth(_ constant: Double) -> Self { @@ -831,7 +831,7 @@ extension FillExtrusionLayer { } /// If a non-zero value is provided, it sets the fill-extrusion layer into wall rendering mode. The value is used to render the feature with the given width over the outlines of the geometry. Note: This property is experimental and some other fill-extrusion properties might not be supported with non-zero line width. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of fillExtrusionLineWidth is in meters. @_documentation(visibility: public) @_spi(Experimental) public func fillExtrusionLineWidth(_ expression: Exp) -> Self { @@ -882,7 +882,7 @@ extension FillExtrusionLayer { } /// The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of fillExtrusionTranslate is in pixels. public func fillExtrusionTranslate(x: Double, y: Double) -> Self { with(self, setter(\.fillExtrusionTranslate, .constant([x, y]))) } @@ -893,7 +893,7 @@ extension FillExtrusionLayer { } /// The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of fillExtrusionTranslate is in pixels. public func fillExtrusionTranslate(_ expression: Exp) -> Self { with(self, setter(\.fillExtrusionTranslate, .expression(expression))) } diff --git a/Sources/MapboxMaps/Style/Generated/Layers/FillLayer.swift b/Sources/MapboxMaps/Style/Generated/Layers/FillLayer.swift index 54856d87b73e..1c5e39d24fba 100644 --- a/Sources/MapboxMaps/Style/Generated/Layers/FillLayer.swift +++ b/Sources/MapboxMaps/Style/Generated/Layers/FillLayer.swift @@ -39,6 +39,11 @@ public struct FillLayer: Layer, Equatable { /// Whether this layer is displayed. public var visibility: Value + /// Selects the base of fill-elevation. Some modes might require precomputed elevation data in the tileset. + /// Default value: "none". + @_documentation(visibility: public) + @_spi(Experimental) public var fillElevationReference: Value? + /// Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key. public var fillSortKey: Value? @@ -54,7 +59,7 @@ public struct FillLayer: Layer, Equatable { public var fillColorTransition: StyleTransition? /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of fillEmissiveStrength is in intensity. public var fillEmissiveStrength: Value? /// Transition options for `fillEmissiveStrength`. @@ -77,7 +82,7 @@ public struct FillLayer: Layer, Equatable { public var fillPattern: Value? /// The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of fillTranslate is in pixels. public var fillTranslate: Value<[Double]>? /// Transition options for `fillTranslate`. @@ -133,6 +138,7 @@ public struct FillLayer: Layer, Equatable { var layoutContainer = container.nestedContainer(keyedBy: LayoutCodingKeys.self, forKey: .layout) try layoutContainer.encode(visibility, forKey: .visibility) + try layoutContainer.encodeIfPresent(fillElevationReference, forKey: .fillElevationReference) try layoutContainer.encodeIfPresent(fillSortKey, forKey: .fillSortKey) } @@ -168,6 +174,7 @@ public struct FillLayer: Layer, Equatable { var visibilityEncoded: Value? if let layoutContainer = try? container.nestedContainer(keyedBy: LayoutCodingKeys.self, forKey: .layout) { visibilityEncoded = try layoutContainer.decodeIfPresent(Value.self, forKey: .visibility) + fillElevationReference = try layoutContainer.decodeIfPresent(Value.self, forKey: .fillElevationReference) fillSortKey = try layoutContainer.decodeIfPresent(Value.self, forKey: .fillSortKey) } visibility = visibilityEncoded ?? .constant(.visible) @@ -187,6 +194,7 @@ public struct FillLayer: Layer, Equatable { } enum LayoutCodingKeys: String, CodingKey { + case fillElevationReference = "fill-elevation-reference" case fillSortKey = "fill-sort-key" case visibility = "visibility" } @@ -247,6 +255,22 @@ extension FillLayer { with(self, setter(\.maxZoom, newValue)) } + /// Selects the base of fill-elevation. Some modes might require precomputed elevation data in the tileset. + /// Default value: "none". + @_documentation(visibility: public) + @_spi(Experimental) + public func fillElevationReference(_ constant: FillElevationReference) -> Self { + with(self, setter(\.fillElevationReference, .constant(constant))) + } + + /// Selects the base of fill-elevation. Some modes might require precomputed elevation data in the tileset. + /// Default value: "none". + @_documentation(visibility: public) + @_spi(Experimental) + public func fillElevationReference(_ expression: Exp) -> Self { + with(self, setter(\.fillElevationReference, .expression(expression))) + } + /// Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key. public func fillSortKey(_ constant: Double) -> Self { with(self, setter(\.fillSortKey, .constant(constant))) @@ -293,7 +317,7 @@ extension FillLayer { } /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of fillEmissiveStrength is in intensity. public func fillEmissiveStrength(_ constant: Double) -> Self { with(self, setter(\.fillEmissiveStrength, .constant(constant))) } @@ -304,7 +328,7 @@ extension FillLayer { } /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of fillEmissiveStrength is in intensity. public func fillEmissiveStrength(_ expression: Exp) -> Self { with(self, setter(\.fillEmissiveStrength, .expression(expression))) } @@ -357,7 +381,7 @@ extension FillLayer { } /// The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of fillTranslate is in pixels. public func fillTranslate(x: Double, y: Double) -> Self { with(self, setter(\.fillTranslate, .constant([x, y]))) } @@ -368,7 +392,7 @@ extension FillLayer { } /// The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of fillTranslate is in pixels. public func fillTranslate(_ expression: Exp) -> Self { with(self, setter(\.fillTranslate, .expression(expression))) } diff --git a/Sources/MapboxMaps/Style/Generated/Layers/HeatmapLayer.swift b/Sources/MapboxMaps/Style/Generated/Layers/HeatmapLayer.swift index 85d497016b24..06d41d1aefdc 100644 --- a/Sources/MapboxMaps/Style/Generated/Layers/HeatmapLayer.swift +++ b/Sources/MapboxMaps/Style/Generated/Layers/HeatmapLayer.swift @@ -58,7 +58,7 @@ public struct HeatmapLayer: Layer, Equatable { public var heatmapOpacityTransition: StyleTransition? /// Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed. `queryRenderedFeatures` on heatmap layers will return points within this radius. - /// Default value: 30. Minimum value: 1. + /// Default value: 30. Minimum value: 1. The unit of heatmapRadius is in pixels. public var heatmapRadius: Value? /// Transition options for `heatmapRadius`. @@ -248,7 +248,7 @@ extension HeatmapLayer { } /// Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed. `queryRenderedFeatures` on heatmap layers will return points within this radius. - /// Default value: 30. Minimum value: 1. + /// Default value: 30. Minimum value: 1. The unit of heatmapRadius is in pixels. public func heatmapRadius(_ constant: Double) -> Self { with(self, setter(\.heatmapRadius, .constant(constant))) } @@ -259,7 +259,7 @@ extension HeatmapLayer { } /// Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed. `queryRenderedFeatures` on heatmap layers will return points within this radius. - /// Default value: 30. Minimum value: 1. + /// Default value: 30. Minimum value: 1. The unit of heatmapRadius is in pixels. public func heatmapRadius(_ expression: Exp) -> Self { with(self, setter(\.heatmapRadius, .expression(expression))) } diff --git a/Sources/MapboxMaps/Style/Generated/Layers/HillshadeLayer.swift b/Sources/MapboxMaps/Style/Generated/Layers/HillshadeLayer.swift index c2c5b3351e28..2e79a272ef96 100644 --- a/Sources/MapboxMaps/Style/Generated/Layers/HillshadeLayer.swift +++ b/Sources/MapboxMaps/Style/Generated/Layers/HillshadeLayer.swift @@ -47,7 +47,7 @@ public struct HillshadeLayer: Layer, Equatable { public var hillshadeAccentColorTransition: StyleTransition? /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of hillshadeEmissiveStrength is in intensity. public var hillshadeEmissiveStrength: Value? /// Transition options for `hillshadeEmissiveStrength`. @@ -245,7 +245,7 @@ extension HillshadeLayer { } /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of hillshadeEmissiveStrength is in intensity. public func hillshadeEmissiveStrength(_ constant: Double) -> Self { with(self, setter(\.hillshadeEmissiveStrength, .constant(constant))) } @@ -256,7 +256,7 @@ extension HillshadeLayer { } /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of hillshadeEmissiveStrength is in intensity. public func hillshadeEmissiveStrength(_ expression: Exp) -> Self { with(self, setter(\.hillshadeEmissiveStrength, .expression(expression))) } diff --git a/Sources/MapboxMaps/Style/Generated/Layers/LineLayer.swift b/Sources/MapboxMaps/Style/Generated/Layers/LineLayer.swift index 4f2067e0405e..62b259410ba2 100644 --- a/Sources/MapboxMaps/Style/Generated/Layers/LineLayer.swift +++ b/Sources/MapboxMaps/Style/Generated/Layers/LineLayer.swift @@ -43,6 +43,17 @@ public struct LineLayer: Layer, Equatable { /// Default value: "butt". public var lineCap: Value? + /// Defines the slope of an elevated line. A value of 0 creates a horizontal line. A value of 1 creates a vertical line. Other values are currently not supported. If undefined, the line follows the terrain slope. This is an experimental property with some known issues: + /// - Vertical lines don't support line caps + /// - `line-join: round` is not supported with this property + @_documentation(visibility: public) + @_spi(Experimental) public var lineCrossSlope: Value? + + /// Selects the base of line-elevation. Some modes might require precomputed elevation data in the tileset. + /// Default value: "none". + @_documentation(visibility: public) + @_spi(Experimental) public var lineElevationReference: Value? + /// The display of lines when joining. /// Default value: "miter". public var lineJoin: Value? @@ -58,12 +69,25 @@ public struct LineLayer: Layer, Equatable { /// Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key. public var lineSortKey: Value? - /// Vertical offset from ground, in meters. Defaults to 0. Not supported for globe projection at the moment. + /// Selects the unit of line-width. The same unit is automatically used for line-blur and line-offset. Note: This is an experimental property and might be removed in a future release. + /// Default value: "pixels". + @_documentation(visibility: public) + @_spi(Experimental) public var lineWidthUnit: Value? + + /// Vertical offset from ground, in meters. Defaults to 0. This is an experimental property with some known issues: + /// - Not supported for globe projection at the moment + /// - Elevated line discontinuity is possible on tile borders with terrain enabled + /// - Rendering artifacts can happen near line joins and line caps depending on the line styling + /// - Rendering artifacts relating to `line-opacity` and `line-blur` + /// - Elevated line visibility is determined by layer order + /// - Z-fighting issues can happen with intersecting elevated lines + /// - Elevated lines don't cast shadows + /// Default value: 0. @_documentation(visibility: public) @_spi(Experimental) public var lineZOffset: Value? /// Blur applied to the line, in pixels. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of lineBlur is in pixels. public var lineBlur: Value? /// Transition options for `lineBlur`. @@ -91,7 +115,7 @@ public struct LineLayer: Layer, Equatable { public var lineColorTransition: StyleTransition? /// Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels. - /// Minimum value: 0. + /// Minimum value: 0. The unit of lineDasharray is in line widths. public var lineDasharray: Value<[Double]>? /// Decrease line layer opacity based on occlusion from 3D objects. Value 0 disables occlusion, value 1 means fully occluded. @@ -102,14 +126,14 @@ public struct LineLayer: Layer, Equatable { public var lineDepthOcclusionFactorTransition: StyleTransition? /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of lineEmissiveStrength is in intensity. public var lineEmissiveStrength: Value? /// Transition options for `lineEmissiveStrength`. public var lineEmissiveStrengthTransition: StyleTransition? /// Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of lineGapWidth is in pixels. public var lineGapWidth: Value? /// Transition options for `lineGapWidth`. @@ -126,7 +150,7 @@ public struct LineLayer: Layer, Equatable { public var lineOcclusionOpacityTransition: StyleTransition? /// The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset. - /// Default value: 0. + /// Default value: 0. The unit of lineOffset is in pixels. public var lineOffset: Value? /// Transition options for `lineOffset`. @@ -143,7 +167,7 @@ public struct LineLayer: Layer, Equatable { public var linePattern: Value? /// The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of lineTranslate is in pixels. public var lineTranslate: Value<[Double]>? /// Transition options for `lineTranslate`. @@ -172,7 +196,7 @@ public struct LineLayer: Layer, Equatable { public var lineTrimOffset: Value<[Double]>? /// Stroke thickness. - /// Default value: 1. Minimum value: 0. + /// Default value: 1. Minimum value: 0. The unit of lineWidth is in pixels. public var lineWidth: Value? /// Transition options for `lineWidth`. @@ -233,10 +257,13 @@ public struct LineLayer: Layer, Equatable { var layoutContainer = container.nestedContainer(keyedBy: LayoutCodingKeys.self, forKey: .layout) try layoutContainer.encode(visibility, forKey: .visibility) try layoutContainer.encodeIfPresent(lineCap, forKey: .lineCap) + try layoutContainer.encodeIfPresent(lineCrossSlope, forKey: .lineCrossSlope) + try layoutContainer.encodeIfPresent(lineElevationReference, forKey: .lineElevationReference) try layoutContainer.encodeIfPresent(lineJoin, forKey: .lineJoin) try layoutContainer.encodeIfPresent(lineMiterLimit, forKey: .lineMiterLimit) try layoutContainer.encodeIfPresent(lineRoundLimit, forKey: .lineRoundLimit) try layoutContainer.encodeIfPresent(lineSortKey, forKey: .lineSortKey) + try layoutContainer.encodeIfPresent(lineWidthUnit, forKey: .lineWidthUnit) try layoutContainer.encodeIfPresent(lineZOffset, forKey: .lineZOffset) } @@ -290,10 +317,13 @@ public struct LineLayer: Layer, Equatable { if let layoutContainer = try? container.nestedContainer(keyedBy: LayoutCodingKeys.self, forKey: .layout) { visibilityEncoded = try layoutContainer.decodeIfPresent(Value.self, forKey: .visibility) lineCap = try layoutContainer.decodeIfPresent(Value.self, forKey: .lineCap) + lineCrossSlope = try layoutContainer.decodeIfPresent(Value.self, forKey: .lineCrossSlope) + lineElevationReference = try layoutContainer.decodeIfPresent(Value.self, forKey: .lineElevationReference) lineJoin = try layoutContainer.decodeIfPresent(Value.self, forKey: .lineJoin) lineMiterLimit = try layoutContainer.decodeIfPresent(Value.self, forKey: .lineMiterLimit) lineRoundLimit = try layoutContainer.decodeIfPresent(Value.self, forKey: .lineRoundLimit) lineSortKey = try layoutContainer.decodeIfPresent(Value.self, forKey: .lineSortKey) + lineWidthUnit = try layoutContainer.decodeIfPresent(Value.self, forKey: .lineWidthUnit) lineZOffset = try layoutContainer.decodeIfPresent(Value.self, forKey: .lineZOffset) } visibility = visibilityEncoded ?? .constant(.visible) @@ -314,10 +344,13 @@ public struct LineLayer: Layer, Equatable { enum LayoutCodingKeys: String, CodingKey { case lineCap = "line-cap" + case lineCrossSlope = "line-cross-slope" + case lineElevationReference = "line-elevation-reference" case lineJoin = "line-join" case lineMiterLimit = "line-miter-limit" case lineRoundLimit = "line-round-limit" case lineSortKey = "line-sort-key" + case lineWidthUnit = "line-width-unit" case lineZOffset = "line-z-offset" case visibility = "visibility" } @@ -407,6 +440,40 @@ extension LineLayer { with(self, setter(\.lineCap, .expression(expression))) } + /// Defines the slope of an elevated line. A value of 0 creates a horizontal line. A value of 1 creates a vertical line. Other values are currently not supported. If undefined, the line follows the terrain slope. This is an experimental property with some known issues: + /// - Vertical lines don't support line caps + /// - `line-join: round` is not supported with this property + @_documentation(visibility: public) + @_spi(Experimental) + public func lineCrossSlope(_ constant: Double) -> Self { + with(self, setter(\.lineCrossSlope, .constant(constant))) + } + + /// Defines the slope of an elevated line. A value of 0 creates a horizontal line. A value of 1 creates a vertical line. Other values are currently not supported. If undefined, the line follows the terrain slope. This is an experimental property with some known issues: + /// - Vertical lines don't support line caps + /// - `line-join: round` is not supported with this property + @_documentation(visibility: public) + @_spi(Experimental) + public func lineCrossSlope(_ expression: Exp) -> Self { + with(self, setter(\.lineCrossSlope, .expression(expression))) + } + + /// Selects the base of line-elevation. Some modes might require precomputed elevation data in the tileset. + /// Default value: "none". + @_documentation(visibility: public) + @_spi(Experimental) + public func lineElevationReference(_ constant: LineElevationReference) -> Self { + with(self, setter(\.lineElevationReference, .constant(constant))) + } + + /// Selects the base of line-elevation. Some modes might require precomputed elevation data in the tileset. + /// Default value: "none". + @_documentation(visibility: public) + @_spi(Experimental) + public func lineElevationReference(_ expression: Exp) -> Self { + with(self, setter(\.lineElevationReference, .expression(expression))) + } + /// The display of lines when joining. /// Default value: "miter". public func lineJoin(_ constant: LineJoin) -> Self { @@ -453,14 +520,46 @@ extension LineLayer { with(self, setter(\.lineSortKey, .expression(expression))) } - /// Vertical offset from ground, in meters. Defaults to 0. Not supported for globe projection at the moment. + /// Selects the unit of line-width. The same unit is automatically used for line-blur and line-offset. Note: This is an experimental property and might be removed in a future release. + /// Default value: "pixels". + @_documentation(visibility: public) + @_spi(Experimental) + public func lineWidthUnit(_ constant: LineWidthUnit) -> Self { + with(self, setter(\.lineWidthUnit, .constant(constant))) + } + + /// Selects the unit of line-width. The same unit is automatically used for line-blur and line-offset. Note: This is an experimental property and might be removed in a future release. + /// Default value: "pixels". + @_documentation(visibility: public) + @_spi(Experimental) + public func lineWidthUnit(_ expression: Exp) -> Self { + with(self, setter(\.lineWidthUnit, .expression(expression))) + } + + /// Vertical offset from ground, in meters. Defaults to 0. This is an experimental property with some known issues: + /// - Not supported for globe projection at the moment + /// - Elevated line discontinuity is possible on tile borders with terrain enabled + /// - Rendering artifacts can happen near line joins and line caps depending on the line styling + /// - Rendering artifacts relating to `line-opacity` and `line-blur` + /// - Elevated line visibility is determined by layer order + /// - Z-fighting issues can happen with intersecting elevated lines + /// - Elevated lines don't cast shadows + /// Default value: 0. @_documentation(visibility: public) @_spi(Experimental) public func lineZOffset(_ constant: Double) -> Self { with(self, setter(\.lineZOffset, .constant(constant))) } - /// Vertical offset from ground, in meters. Defaults to 0. Not supported for globe projection at the moment. + /// Vertical offset from ground, in meters. Defaults to 0. This is an experimental property with some known issues: + /// - Not supported for globe projection at the moment + /// - Elevated line discontinuity is possible on tile borders with terrain enabled + /// - Rendering artifacts can happen near line joins and line caps depending on the line styling + /// - Rendering artifacts relating to `line-opacity` and `line-blur` + /// - Elevated line visibility is determined by layer order + /// - Z-fighting issues can happen with intersecting elevated lines + /// - Elevated lines don't cast shadows + /// Default value: 0. @_documentation(visibility: public) @_spi(Experimental) public func lineZOffset(_ expression: Exp) -> Self { @@ -468,7 +567,7 @@ extension LineLayer { } /// Blur applied to the line, in pixels. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of lineBlur is in pixels. public func lineBlur(_ constant: Double) -> Self { with(self, setter(\.lineBlur, .constant(constant))) } @@ -479,7 +578,7 @@ extension LineLayer { } /// Blur applied to the line, in pixels. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of lineBlur is in pixels. public func lineBlur(_ expression: Exp) -> Self { with(self, setter(\.lineBlur, .expression(expression))) } @@ -548,13 +647,13 @@ extension LineLayer { } /// Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels. - /// Minimum value: 0. + /// Minimum value: 0. The unit of lineDasharray is in line widths. public func lineDashArray(_ constant: [Double]) -> Self { with(self, setter(\.lineDasharray, .constant(constant))) } /// Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels. - /// Minimum value: 0. + /// Minimum value: 0. The unit of lineDasharray is in line widths. public func lineDashArray(_ expression: Exp) -> Self { with(self, setter(\.lineDasharray, .expression(expression))) } @@ -577,7 +676,7 @@ extension LineLayer { } /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of lineEmissiveStrength is in intensity. public func lineEmissiveStrength(_ constant: Double) -> Self { with(self, setter(\.lineEmissiveStrength, .constant(constant))) } @@ -588,13 +687,13 @@ extension LineLayer { } /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of lineEmissiveStrength is in intensity. public func lineEmissiveStrength(_ expression: Exp) -> Self { with(self, setter(\.lineEmissiveStrength, .expression(expression))) } /// Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of lineGapWidth is in pixels. public func lineGapWidth(_ constant: Double) -> Self { with(self, setter(\.lineGapWidth, .constant(constant))) } @@ -605,7 +704,7 @@ extension LineLayer { } /// Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of lineGapWidth is in pixels. public func lineGapWidth(_ expression: Exp) -> Self { with(self, setter(\.lineGapWidth, .expression(expression))) } @@ -643,7 +742,7 @@ extension LineLayer { } /// The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset. - /// Default value: 0. + /// Default value: 0. The unit of lineOffset is in pixels. public func lineOffset(_ constant: Double) -> Self { with(self, setter(\.lineOffset, .constant(constant))) } @@ -654,7 +753,7 @@ extension LineLayer { } /// The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset. - /// Default value: 0. + /// Default value: 0. The unit of lineOffset is in pixels. public func lineOffset(_ expression: Exp) -> Self { with(self, setter(\.lineOffset, .expression(expression))) } @@ -687,7 +786,7 @@ extension LineLayer { } /// The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of lineTranslate is in pixels. public func lineTranslate(x: Double, y: Double) -> Self { with(self, setter(\.lineTranslate, .constant([x, y]))) } @@ -698,7 +797,7 @@ extension LineLayer { } /// The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of lineTranslate is in pixels. public func lineTranslate(_ expression: Exp) -> Self { with(self, setter(\.lineTranslate, .expression(expression))) } @@ -775,7 +874,7 @@ extension LineLayer { } /// Stroke thickness. - /// Default value: 1. Minimum value: 0. + /// Default value: 1. Minimum value: 0. The unit of lineWidth is in pixels. public func lineWidth(_ constant: Double) -> Self { with(self, setter(\.lineWidth, .constant(constant))) } @@ -786,7 +885,7 @@ extension LineLayer { } /// Stroke thickness. - /// Default value: 1. Minimum value: 0. + /// Default value: 1. Minimum value: 0. The unit of lineWidth is in pixels. public func lineWidth(_ expression: Exp) -> Self { with(self, setter(\.lineWidth, .expression(expression))) } diff --git a/Sources/MapboxMaps/Style/Generated/Layers/LocationIndicatorLayer.swift b/Sources/MapboxMaps/Style/Generated/Layers/LocationIndicatorLayer.swift index 6a62cb5c75a1..b18a2b7dc707 100644 --- a/Sources/MapboxMaps/Style/Generated/Layers/LocationIndicatorLayer.swift +++ b/Sources/MapboxMaps/Style/Generated/Layers/LocationIndicatorLayer.swift @@ -35,7 +35,7 @@ public struct LocationIndicatorLayer: Layer, Equatable { public var topImage: Value? /// The accuracy, in meters, of the position source used to retrieve the position of the location indicator. - /// Default value: 0. + /// Default value: 0. The unit of accuracyRadius is in meters. public var accuracyRadius: Value? /// Transition options for `accuracyRadius`. @@ -56,14 +56,14 @@ public struct LocationIndicatorLayer: Layer, Equatable { public var accuracyRadiusColorTransition: StyleTransition? /// The bearing of the location indicator. Values under 0.01 degree variation are ignored. - /// Default value: 0. + /// Default value: 0. The unit of bearing is in degrees. public var bearing: Value? /// Transition options for `bearing`. public var bearingTransition: StyleTransition? /// The size of the bearing image, as a scale factor applied to the size of the specified image. - /// Default value: 1. + /// Default value: 1. The unit of bearingImageSize is in factor of the original icon size. public var bearingImageSize: Value? /// Transition options for `bearingImageSize`. @@ -84,14 +84,14 @@ public struct LocationIndicatorLayer: Layer, Equatable { public var emphasisCircleGlowRangeTransition: StyleTransition? /// The radius, in pixel, of the circle emphasizing the indicator, drawn between the accuracy radius and the indicator shadow. - /// Default value: 0. + /// Default value: 0. The unit of emphasisCircleRadius is in pixels. public var emphasisCircleRadius: Value? /// Transition options for `emphasisCircleRadius`. public var emphasisCircleRadiusTransition: StyleTransition? /// The displacement off the center of the top image and the shadow image when the pitch of the map is greater than 0. This helps producing a three-dimensional appearence. - /// Default value: "0". + /// Default value: "0". The unit of imagePitchDisplacement is in pixels. public var imagePitchDisplacement: Value? /// An array of [latitude, longitude, altitude] position of the location indicator. Values under 0.000001 variation are ignored. @@ -113,14 +113,14 @@ public struct LocationIndicatorLayer: Layer, Equatable { public var perspectiveCompensation: Value? /// The size of the shadow image, as a scale factor applied to the size of the specified image. - /// Default value: 1. + /// Default value: 1. The unit of shadowImageSize is in factor of the original icon size. public var shadowImageSize: Value? /// Transition options for `shadowImageSize`. public var shadowImageSizeTransition: StyleTransition? /// The size of the top image, as a scale factor applied to the size of the specified image. - /// Default value: 1. + /// Default value: 1. The unit of topImageSize is in factor of the original icon size. public var topImageSize: Value? /// Transition options for `topImageSize`. @@ -318,7 +318,7 @@ extension LocationIndicatorLayer { } /// The accuracy, in meters, of the position source used to retrieve the position of the location indicator. - /// Default value: 0. + /// Default value: 0. The unit of accuracyRadius is in meters. public func accuracyRadius(_ constant: Double) -> Self { with(self, setter(\.accuracyRadius, .constant(constant))) } @@ -329,7 +329,7 @@ extension LocationIndicatorLayer { } /// The accuracy, in meters, of the position source used to retrieve the position of the location indicator. - /// Default value: 0. + /// Default value: 0. The unit of accuracyRadius is in meters. public func accuracyRadius(_ expression: Exp) -> Self { with(self, setter(\.accuracyRadius, .expression(expression))) } @@ -381,7 +381,7 @@ extension LocationIndicatorLayer { } /// The bearing of the location indicator. Values under 0.01 degree variation are ignored. - /// Default value: 0. + /// Default value: 0. The unit of bearing is in degrees. public func bearing(_ constant: Double) -> Self { with(self, setter(\.bearing, .constant(constant))) } @@ -392,13 +392,13 @@ extension LocationIndicatorLayer { } /// The bearing of the location indicator. Values under 0.01 degree variation are ignored. - /// Default value: 0. + /// Default value: 0. The unit of bearing is in degrees. public func bearing(_ expression: Exp) -> Self { with(self, setter(\.bearing, .expression(expression))) } /// The size of the bearing image, as a scale factor applied to the size of the specified image. - /// Default value: 1. + /// Default value: 1. The unit of bearingImageSize is in factor of the original icon size. public func bearingImageSize(_ constant: Double) -> Self { with(self, setter(\.bearingImageSize, .constant(constant))) } @@ -409,7 +409,7 @@ extension LocationIndicatorLayer { } /// The size of the bearing image, as a scale factor applied to the size of the specified image. - /// Default value: 1. + /// Default value: 1. The unit of bearingImageSize is in factor of the original icon size. public func bearingImageSize(_ expression: Exp) -> Self { with(self, setter(\.bearingImageSize, .expression(expression))) } @@ -455,7 +455,7 @@ extension LocationIndicatorLayer { } /// The radius, in pixel, of the circle emphasizing the indicator, drawn between the accuracy radius and the indicator shadow. - /// Default value: 0. + /// Default value: 0. The unit of emphasisCircleRadius is in pixels. public func emphasisCircleRadius(_ constant: Double) -> Self { with(self, setter(\.emphasisCircleRadius, .constant(constant))) } @@ -466,19 +466,19 @@ extension LocationIndicatorLayer { } /// The radius, in pixel, of the circle emphasizing the indicator, drawn between the accuracy radius and the indicator shadow. - /// Default value: 0. + /// Default value: 0. The unit of emphasisCircleRadius is in pixels. public func emphasisCircleRadius(_ expression: Exp) -> Self { with(self, setter(\.emphasisCircleRadius, .expression(expression))) } /// The displacement off the center of the top image and the shadow image when the pitch of the map is greater than 0. This helps producing a three-dimensional appearence. - /// Default value: "0". + /// Default value: "0". The unit of imagePitchDisplacement is in pixels. public func imagePitchDisplacement(_ constant: Double) -> Self { with(self, setter(\.imagePitchDisplacement, .constant(constant))) } /// The displacement off the center of the top image and the shadow image when the pitch of the map is greater than 0. This helps producing a three-dimensional appearence. - /// Default value: "0". + /// Default value: "0". The unit of imagePitchDisplacement is in pixels. public func imagePitchDisplacement(_ expression: Exp) -> Self { with(self, setter(\.imagePitchDisplacement, .expression(expression))) } @@ -530,7 +530,7 @@ extension LocationIndicatorLayer { } /// The size of the shadow image, as a scale factor applied to the size of the specified image. - /// Default value: 1. + /// Default value: 1. The unit of shadowImageSize is in factor of the original icon size. public func shadowImageSize(_ constant: Double) -> Self { with(self, setter(\.shadowImageSize, .constant(constant))) } @@ -541,13 +541,13 @@ extension LocationIndicatorLayer { } /// The size of the shadow image, as a scale factor applied to the size of the specified image. - /// Default value: 1. + /// Default value: 1. The unit of shadowImageSize is in factor of the original icon size. public func shadowImageSize(_ expression: Exp) -> Self { with(self, setter(\.shadowImageSize, .expression(expression))) } /// The size of the top image, as a scale factor applied to the size of the specified image. - /// Default value: 1. + /// Default value: 1. The unit of topImageSize is in factor of the original icon size. public func topImageSize(_ constant: Double) -> Self { with(self, setter(\.topImageSize, .constant(constant))) } @@ -558,7 +558,7 @@ extension LocationIndicatorLayer { } /// The size of the top image, as a scale factor applied to the size of the specified image. - /// Default value: 1. + /// Default value: 1. The unit of topImageSize is in factor of the original icon size. public func topImageSize(_ expression: Exp) -> Self { with(self, setter(\.topImageSize, .expression(expression))) } diff --git a/Sources/MapboxMaps/Style/Generated/Layers/ModelLayer.swift b/Sources/MapboxMaps/Style/Generated/Layers/ModelLayer.swift index 5a0a4d888bdd..2ef25aa7f13c 100644 --- a/Sources/MapboxMaps/Style/Generated/Layers/ModelLayer.swift +++ b/Sources/MapboxMaps/Style/Generated/Layers/ModelLayer.swift @@ -122,7 +122,7 @@ import UIKit public var modelReceiveShadows: Value? /// The rotation of the model in euler angles [lon, lat, z]. - /// Default value: [0,0,0]. + /// Default value: [0,0,0]. The unit of modelRotation is in degrees. @_documentation(visibility: public) public var modelRotation: Value<[Double]>? @@ -560,7 +560,7 @@ extension ModelLayer { } /// The rotation of the model in euler angles [lon, lat, z]. - /// Default value: [0,0,0]. + /// Default value: [0,0,0]. The unit of modelRotation is in degrees. @_documentation(visibility: public) @_spi(Experimental) public func modelRotation(x: Double, y: Double, z: Double) -> Self { @@ -575,7 +575,7 @@ extension ModelLayer { } /// The rotation of the model in euler angles [lon, lat, z]. - /// Default value: [0,0,0]. + /// Default value: [0,0,0]. The unit of modelRotation is in degrees. @_documentation(visibility: public) @_spi(Experimental) public func modelRotation(_ expression: Exp) -> Self { diff --git a/Sources/MapboxMaps/Style/Generated/Layers/RasterLayer.swift b/Sources/MapboxMaps/Style/Generated/Layers/RasterLayer.swift index 9027855c9a28..2c4a269fcfbe 100644 --- a/Sources/MapboxMaps/Style/Generated/Layers/RasterLayer.swift +++ b/Sources/MapboxMaps/Style/Generated/Layers/RasterLayer.swift @@ -90,18 +90,18 @@ public struct RasterLayer: Layer, Equatable { @_spi(Experimental) public var rasterElevationTransition: StyleTransition? /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of rasterEmissiveStrength is in intensity. public var rasterEmissiveStrength: Value? /// Transition options for `rasterEmissiveStrength`. public var rasterEmissiveStrengthTransition: StyleTransition? /// Fade duration when a new tile is added. - /// Default value: 300. Minimum value: 0. + /// Default value: 300. Minimum value: 0. The unit of rasterFadeDuration is in milliseconds. public var rasterFadeDuration: Value? /// Rotates hues around the color wheel. - /// Default value: 0. + /// Default value: 0. The unit of rasterHueRotate is in degrees. public var rasterHueRotate: Value? /// Transition options for `rasterHueRotate`. @@ -436,7 +436,7 @@ extension RasterLayer { } /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of rasterEmissiveStrength is in intensity. public func rasterEmissiveStrength(_ constant: Double) -> Self { with(self, setter(\.rasterEmissiveStrength, .constant(constant))) } @@ -447,25 +447,25 @@ extension RasterLayer { } /// Controls the intensity of light emitted on the source features. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of rasterEmissiveStrength is in intensity. public func rasterEmissiveStrength(_ expression: Exp) -> Self { with(self, setter(\.rasterEmissiveStrength, .expression(expression))) } /// Fade duration when a new tile is added. - /// Default value: 300. Minimum value: 0. + /// Default value: 300. Minimum value: 0. The unit of rasterFadeDuration is in milliseconds. public func rasterFadeDuration(_ constant: Double) -> Self { with(self, setter(\.rasterFadeDuration, .constant(constant))) } /// Fade duration when a new tile is added. - /// Default value: 300. Minimum value: 0. + /// Default value: 300. Minimum value: 0. The unit of rasterFadeDuration is in milliseconds. public func rasterFadeDuration(_ expression: Exp) -> Self { with(self, setter(\.rasterFadeDuration, .expression(expression))) } /// Rotates hues around the color wheel. - /// Default value: 0. + /// Default value: 0. The unit of rasterHueRotate is in degrees. public func rasterHueRotate(_ constant: Double) -> Self { with(self, setter(\.rasterHueRotate, .constant(constant))) } @@ -476,7 +476,7 @@ extension RasterLayer { } /// Rotates hues around the color wheel. - /// Default value: 0. + /// Default value: 0. The unit of rasterHueRotate is in degrees. public func rasterHueRotate(_ expression: Exp) -> Self { with(self, setter(\.rasterHueRotate, .expression(expression))) } diff --git a/Sources/MapboxMaps/Style/Generated/Layers/SkyLayer.swift b/Sources/MapboxMaps/Style/Generated/Layers/SkyLayer.swift index 4e37bf62a015..10ac63bfe8bc 100644 --- a/Sources/MapboxMaps/Style/Generated/Layers/SkyLayer.swift +++ b/Sources/MapboxMaps/Style/Generated/Layers/SkyLayer.swift @@ -35,7 +35,7 @@ public struct SkyLayer: Layer, Equatable { public var skyAtmosphereHaloColor: Value? /// Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0 degree north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0 degree is directly above, at zenith, and 90 degree at the horizon. When this property is ommitted, the sun center is directly inherited from the light position. - /// Minimum value: [0,0]. Maximum value: [360,180]. + /// Minimum value: [0,0]. Maximum value: [360,180]. The unit of skyAtmosphereSun is in degrees. public var skyAtmosphereSun: Value<[Double]>? /// Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky. @@ -47,7 +47,7 @@ public struct SkyLayer: Layer, Equatable { public var skyGradient: Value? /// Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0 degree north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0 degree is directly above, at zenith, and 90 degree at the horizon. - /// Default value: [0,0]. Minimum value: [0,0]. Maximum value: [360,180]. + /// Default value: [0,0]. Minimum value: [0,0]. Maximum value: [360,180]. The unit of skyGradientCenter is in degrees. public var skyGradientCenter: Value<[Double]>? /// The angular distance (measured in degrees) 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`. @@ -206,13 +206,13 @@ extension SkyLayer { } /// Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0 degree north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0 degree is directly above, at zenith, and 90 degree at the horizon. When this property is ommitted, the sun center is directly inherited from the light position. - /// Minimum value: [0,0]. Maximum value: [360,180]. + /// Minimum value: [0,0]. Maximum value: [360,180]. The unit of skyAtmosphereSun is in degrees. public func skyAtmosphereSun(azimuthal: Double, polar: Double) -> Self { with(self, setter(\.skyAtmosphereSun, .constant([azimuthal, polar]))) } /// Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0 degree north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0 degree is directly above, at zenith, and 90 degree at the horizon. When this property is ommitted, the sun center is directly inherited from the light position. - /// Minimum value: [0,0]. Maximum value: [360,180]. + /// Minimum value: [0,0]. Maximum value: [360,180]. The unit of skyAtmosphereSun is in degrees. public func skyAtmosphereSun(_ expression: Exp) -> Self { with(self, setter(\.skyAtmosphereSun, .expression(expression))) } @@ -248,13 +248,13 @@ extension SkyLayer { } /// Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0 degree north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0 degree is directly above, at zenith, and 90 degree at the horizon. - /// Default value: [0,0]. Minimum value: [0,0]. Maximum value: [360,180]. + /// Default value: [0,0]. Minimum value: [0,0]. Maximum value: [360,180]. The unit of skyGradientCenter is in degrees. public func skyGradientCenter(azimuthal: Double, polar: Double) -> Self { with(self, setter(\.skyGradientCenter, .constant([azimuthal, polar]))) } /// Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0 degree north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0 degree is directly above, at zenith, and 90 degree at the horizon. - /// Default value: [0,0]. Minimum value: [0,0]. Maximum value: [360,180]. + /// Default value: [0,0]. Minimum value: [0,0]. Maximum value: [360,180]. The unit of skyGradientCenter is in degrees. public func skyGradientCenter(_ expression: Exp) -> Self { with(self, setter(\.skyGradientCenter, .expression(expression))) } diff --git a/Sources/MapboxMaps/Style/Generated/Layers/SymbolLayer.swift b/Sources/MapboxMaps/Style/Generated/Layers/SymbolLayer.swift index 183deb718573..e4a3f4b805ca 100644 --- a/Sources/MapboxMaps/Style/Generated/Layers/SymbolLayer.swift +++ b/Sources/MapboxMaps/Style/Generated/Layers/SymbolLayer.swift @@ -67,7 +67,7 @@ public struct SymbolLayer: Layer, Equatable { public var iconOptional: Value? /// Size of the additional area around the icon bounding box used for detecting symbol collisions. - /// Default value: 2. Minimum value: 0. + /// Default value: 2. Minimum value: 0. The unit of iconPadding is in pixels. public var iconPadding: Value? /// Orientation of icon when map is pitched. @@ -75,7 +75,7 @@ public struct SymbolLayer: Layer, Equatable { public var iconPitchAlignment: Value? /// Rotates the icon clockwise. - /// Default value: 0. + /// Default value: 0. The unit of iconRotate is in degrees. public var iconRotate: Value? /// In combination with `symbol-placement`, determines the rotation behavior of icons. @@ -83,15 +83,20 @@ public struct SymbolLayer: Layer, Equatable { public var iconRotationAlignment: Value? /// Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image. - /// Default value: 1. Minimum value: 0. + /// Default value: 1. Minimum value: 0. The unit of iconSize is in factor of the original icon size. public var iconSize: Value? + /// Defines the minimum and maximum scaling factors for icon related properties like `icon-size`, `icon-halo-width`, `icon-halo-blur` + /// Default value: [0.8,2]. Value range: [0.1, 10] + @_documentation(visibility: public) + @_spi(Experimental) public var iconSizeScaleRange: Value<[Double]>? + /// Scales the icon to fit around the associated text. /// Default value: "none". public var iconTextFit: Value? /// Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left. - /// Default value: [0,0,0,0]. + /// Default value: [0,0,0,0]. The unit of iconTextFitPadding is in pixels. public var iconTextFitPadding: Value<[Double]>? /// If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries. @@ -111,7 +116,7 @@ public struct SymbolLayer: Layer, Equatable { public var symbolSortKey: Value? /// Distance between two symbol anchors. - /// Default value: 250. Minimum value: 1. + /// Default value: 250. Minimum value: 1. The unit of symbolSpacing is in pixels. public var symbolSpacing: Value? /// Position symbol on buildings (both fill extrusions and models) rooftops. In order to have minimal impact on performance, this is supported only when `fill-extrusion-height` is not zoom-dependent and remains unchanged. For fading in buildings when zooming in, fill-extrusion-vertical-scale should be used and symbols would raise with building rooftops. Symbols are sorted by elevation, except in cases when `viewport-y` sorting or `symbol-sort-key` are applied. @@ -150,23 +155,23 @@ public struct SymbolLayer: Layer, Equatable { public var textKeepUpright: Value? /// Text tracking amount. - /// Default value: 0. + /// Default value: 0. The unit of textLetterSpacing is in ems. public var textLetterSpacing: Value? /// Text leading value for multi-line text. - /// Default value: 1.2. + /// Default value: 1.2. The unit of textLineHeight is in ems. public var textLineHeight: Value? /// Maximum angle change between adjacent characters. - /// Default value: 45. + /// Default value: 45. The unit of textMaxAngle is in degrees. public var textMaxAngle: Value? /// The maximum line width for text wrapping. - /// Default value: 10. Minimum value: 0. + /// Default value: 10. Minimum value: 0. The unit of textMaxWidth is in ems. public var textMaxWidth: Value? /// Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of textOffset is in ems. public var textOffset: Value<[Double]>? /// If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not. @@ -174,7 +179,7 @@ public struct SymbolLayer: Layer, Equatable { public var textOptional: Value? /// Size of the additional area around the text bounding box used for detecting symbol collisions. - /// Default value: 2. Minimum value: 0. + /// Default value: 2. Minimum value: 0. The unit of textPadding is in pixels. public var textPadding: Value? /// Orientation of text when map is pitched. @@ -182,11 +187,11 @@ public struct SymbolLayer: Layer, Equatable { public var textPitchAlignment: Value? /// Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present. - /// Default value: 0. + /// Default value: 0. The unit of textRadialOffset is in ems. public var textRadialOffset: Value? /// Rotates the text clockwise. - /// Default value: 0. + /// Default value: 0. The unit of textRotate is in degrees. public var textRotate: Value? /// In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text. @@ -194,9 +199,14 @@ public struct SymbolLayer: Layer, Equatable { public var textRotationAlignment: Value? /// Font size. - /// Default value: 16. Minimum value: 0. + /// Default value: 16. Minimum value: 0. The unit of textSize is in pixels. public var textSize: Value? + /// Defines the minimum and maximum scaling factors for text related properties like `text-size`, `text-max-width`, `text-halo-width`, `font-size` + /// Default value: [0.8,2]. Value range: [0.1, 10] + @_documentation(visibility: public) + @_spi(Experimental) public var textSizeScaleRange: Value<[Double]>? + /// Specifies how to capitalize text, similar to the CSS `text-transform` property. /// Default value: "none". public var textTransform: Value? @@ -222,14 +232,14 @@ public struct SymbolLayer: Layer, Equatable { public var iconColorSaturationTransition: StyleTransition? /// Controls the intensity of light emitted on the source features. - /// Default value: 1. Minimum value: 0. + /// Default value: 1. Minimum value: 0. The unit of iconEmissiveStrength is in intensity. public var iconEmissiveStrength: Value? /// Transition options for `iconEmissiveStrength`. public var iconEmissiveStrengthTransition: StyleTransition? /// Fade out the halo towards the outside. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of iconHaloBlur is in pixels. public var iconHaloBlur: Value? /// Transition options for `iconHaloBlur`. @@ -243,7 +253,7 @@ public struct SymbolLayer: Layer, Equatable { public var iconHaloColorTransition: StyleTransition? /// Distance of halo to the icon outline. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of iconHaloWidth is in pixels. public var iconHaloWidth: Value? /// Transition options for `iconHaloWidth`. @@ -271,7 +281,7 @@ public struct SymbolLayer: Layer, Equatable { public var iconOpacityTransition: StyleTransition? /// Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of iconTranslate is in pixels. public var iconTranslate: Value<[Double]>? /// Transition options for `iconTranslate`. @@ -298,14 +308,14 @@ public struct SymbolLayer: Layer, Equatable { public var textColorTransition: StyleTransition? /// Controls the intensity of light emitted on the source features. - /// Default value: 1. Minimum value: 0. + /// Default value: 1. Minimum value: 0. The unit of textEmissiveStrength is in intensity. public var textEmissiveStrength: Value? /// Transition options for `textEmissiveStrength`. public var textEmissiveStrengthTransition: StyleTransition? /// The halo's fadeout distance towards the outside. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of textHaloBlur is in pixels. public var textHaloBlur: Value? /// Transition options for `textHaloBlur`. @@ -319,7 +329,7 @@ public struct SymbolLayer: Layer, Equatable { public var textHaloColorTransition: StyleTransition? /// Distance of halo to the font outline. Max text halo width is 1/4 of the font-size. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of textHaloWidth is in pixels. public var textHaloWidth: Value? /// Transition options for `textHaloWidth`. @@ -340,7 +350,7 @@ public struct SymbolLayer: Layer, Equatable { public var textOpacityTransition: StyleTransition? /// Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of textTranslate is in pixels. public var textTranslate: Value<[Double]>? /// Transition options for `textTranslate`. @@ -424,6 +434,7 @@ public struct SymbolLayer: Layer, Equatable { try layoutContainer.encodeIfPresent(iconRotate, forKey: .iconRotate) try layoutContainer.encodeIfPresent(iconRotationAlignment, forKey: .iconRotationAlignment) try layoutContainer.encodeIfPresent(iconSize, forKey: .iconSize) + try layoutContainer.encodeIfPresent(iconSizeScaleRange, forKey: .iconSizeScaleRange) try layoutContainer.encodeIfPresent(iconTextFit, forKey: .iconTextFit) try layoutContainer.encodeIfPresent(iconTextFitPadding, forKey: .iconTextFitPadding) try layoutContainer.encodeIfPresent(symbolAvoidEdges, forKey: .symbolAvoidEdges) @@ -452,6 +463,7 @@ public struct SymbolLayer: Layer, Equatable { try layoutContainer.encodeIfPresent(textRotate, forKey: .textRotate) try layoutContainer.encodeIfPresent(textRotationAlignment, forKey: .textRotationAlignment) try layoutContainer.encodeIfPresent(textSize, forKey: .textSize) + try layoutContainer.encodeIfPresent(textSizeScaleRange, forKey: .textSizeScaleRange) try layoutContainer.encodeIfPresent(textTransform, forKey: .textTransform) try layoutContainer.encodeIfPresent(textVariableAnchor, forKey: .textVariableAnchor) try layoutContainer.encodeIfPresent(textWritingMode, forKey: .textWritingMode) @@ -526,6 +538,7 @@ public struct SymbolLayer: Layer, Equatable { iconRotate = try layoutContainer.decodeIfPresent(Value.self, forKey: .iconRotate) iconRotationAlignment = try layoutContainer.decodeIfPresent(Value.self, forKey: .iconRotationAlignment) iconSize = try layoutContainer.decodeIfPresent(Value.self, forKey: .iconSize) + iconSizeScaleRange = try layoutContainer.decodeIfPresent(Value<[Double]>.self, forKey: .iconSizeScaleRange) iconTextFit = try layoutContainer.decodeIfPresent(Value.self, forKey: .iconTextFit) iconTextFitPadding = try layoutContainer.decodeIfPresent(Value<[Double]>.self, forKey: .iconTextFitPadding) symbolAvoidEdges = try layoutContainer.decodeIfPresent(Value.self, forKey: .symbolAvoidEdges) @@ -554,6 +567,7 @@ public struct SymbolLayer: Layer, Equatable { textRotate = try layoutContainer.decodeIfPresent(Value.self, forKey: .textRotate) textRotationAlignment = try layoutContainer.decodeIfPresent(Value.self, forKey: .textRotationAlignment) textSize = try layoutContainer.decodeIfPresent(Value.self, forKey: .textSize) + textSizeScaleRange = try layoutContainer.decodeIfPresent(Value<[Double]>.self, forKey: .textSizeScaleRange) textTransform = try layoutContainer.decodeIfPresent(Value.self, forKey: .textTransform) textVariableAnchor = try layoutContainer.decodeIfPresent(Value<[TextAnchor]>.self, forKey: .textVariableAnchor) textWritingMode = try layoutContainer.decodeIfPresent(Value<[TextWritingMode]>.self, forKey: .textWritingMode) @@ -587,6 +601,7 @@ public struct SymbolLayer: Layer, Equatable { case iconRotate = "icon-rotate" case iconRotationAlignment = "icon-rotation-alignment" case iconSize = "icon-size" + case iconSizeScaleRange = "icon-size-scale-range" case iconTextFit = "icon-text-fit" case iconTextFitPadding = "icon-text-fit-padding" case symbolAvoidEdges = "symbol-avoid-edges" @@ -615,6 +630,7 @@ public struct SymbolLayer: Layer, Equatable { case textRotate = "text-rotate" case textRotationAlignment = "text-rotation-alignment" case textSize = "text-size" + case textSizeScaleRange = "text-size-scale-range" case textTransform = "text-transform" case textVariableAnchor = "text-variable-anchor" case textWritingMode = "text-writing-mode" @@ -785,13 +801,13 @@ extension SymbolLayer { } /// Size of the additional area around the icon bounding box used for detecting symbol collisions. - /// Default value: 2. Minimum value: 0. + /// Default value: 2. Minimum value: 0. The unit of iconPadding is in pixels. public func iconPadding(_ constant: Double) -> Self { with(self, setter(\.iconPadding, .constant(constant))) } /// Size of the additional area around the icon bounding box used for detecting symbol collisions. - /// Default value: 2. Minimum value: 0. + /// Default value: 2. Minimum value: 0. The unit of iconPadding is in pixels. public func iconPadding(_ expression: Exp) -> Self { with(self, setter(\.iconPadding, .expression(expression))) } @@ -809,13 +825,13 @@ extension SymbolLayer { } /// Rotates the icon clockwise. - /// Default value: 0. + /// Default value: 0. The unit of iconRotate is in degrees. public func iconRotate(_ constant: Double) -> Self { with(self, setter(\.iconRotate, .constant(constant))) } /// Rotates the icon clockwise. - /// Default value: 0. + /// Default value: 0. The unit of iconRotate is in degrees. public func iconRotate(_ expression: Exp) -> Self { with(self, setter(\.iconRotate, .expression(expression))) } @@ -833,17 +849,33 @@ extension SymbolLayer { } /// Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image. - /// Default value: 1. Minimum value: 0. + /// Default value: 1. Minimum value: 0. The unit of iconSize is in factor of the original icon size. public func iconSize(_ constant: Double) -> Self { with(self, setter(\.iconSize, .constant(constant))) } /// Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image. - /// Default value: 1. Minimum value: 0. + /// Default value: 1. Minimum value: 0. The unit of iconSize is in factor of the original icon size. public func iconSize(_ expression: Exp) -> Self { with(self, setter(\.iconSize, .expression(expression))) } + /// Defines the minimum and maximum scaling factors for icon related properties like `icon-size`, `icon-halo-width`, `icon-halo-blur` + /// Default value: [0.8,2]. Value range: [0.1, 10] + @_documentation(visibility: public) + @_spi(Experimental) + public func iconSizeScaleRange(min: Double, max: Double) -> Self { + with(self, setter(\.iconSizeScaleRange, .constant([min, max]))) + } + + /// Defines the minimum and maximum scaling factors for icon related properties like `icon-size`, `icon-halo-width`, `icon-halo-blur` + /// Default value: [0.8,2]. Value range: [0.1, 10] + @_documentation(visibility: public) + @_spi(Experimental) + public func iconSizeScaleRange(_ expression: Exp) -> Self { + with(self, setter(\.iconSizeScaleRange, .expression(expression))) + } + /// Scales the icon to fit around the associated text. /// Default value: "none". public func iconTextFit(_ constant: IconTextFit) -> Self { @@ -857,13 +889,13 @@ extension SymbolLayer { } /// Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left. - /// Default value: [0,0,0,0]. + /// Default value: [0,0,0,0]. The unit of iconTextFitPadding is in pixels. public func iconTextFitPadding(_ padding: UIEdgeInsets) -> Self { with(self, setter(\.iconTextFitPadding, .constant([padding.top, padding.right, padding.bottom, padding.left]))) } /// Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left. - /// Default value: [0,0,0,0]. + /// Default value: [0,0,0,0]. The unit of iconTextFitPadding is in pixels. public func iconTextFitPadding(_ expression: Exp) -> Self { with(self, setter(\.iconTextFitPadding, .expression(expression))) } @@ -919,13 +951,13 @@ extension SymbolLayer { } /// Distance between two symbol anchors. - /// Default value: 250. Minimum value: 1. + /// Default value: 250. Minimum value: 1. The unit of symbolSpacing is in pixels. public func symbolSpacing(_ constant: Double) -> Self { with(self, setter(\.symbolSpacing, .constant(constant))) } /// Distance between two symbol anchors. - /// Default value: 250. Minimum value: 1. + /// Default value: 250. Minimum value: 1. The unit of symbolSpacing is in pixels. public func symbolSpacing(_ expression: Exp) -> Self { with(self, setter(\.symbolSpacing, .expression(expression))) } @@ -1037,61 +1069,61 @@ extension SymbolLayer { } /// Text tracking amount. - /// Default value: 0. + /// Default value: 0. The unit of textLetterSpacing is in ems. public func textLetterSpacing(_ constant: Double) -> Self { with(self, setter(\.textLetterSpacing, .constant(constant))) } /// Text tracking amount. - /// Default value: 0. + /// Default value: 0. The unit of textLetterSpacing is in ems. public func textLetterSpacing(_ expression: Exp) -> Self { with(self, setter(\.textLetterSpacing, .expression(expression))) } /// Text leading value for multi-line text. - /// Default value: 1.2. + /// Default value: 1.2. The unit of textLineHeight is in ems. public func textLineHeight(_ constant: Double) -> Self { with(self, setter(\.textLineHeight, .constant(constant))) } /// Text leading value for multi-line text. - /// Default value: 1.2. + /// Default value: 1.2. The unit of textLineHeight is in ems. public func textLineHeight(_ expression: Exp) -> Self { with(self, setter(\.textLineHeight, .expression(expression))) } /// Maximum angle change between adjacent characters. - /// Default value: 45. + /// Default value: 45. The unit of textMaxAngle is in degrees. public func textMaxAngle(_ constant: Double) -> Self { with(self, setter(\.textMaxAngle, .constant(constant))) } /// Maximum angle change between adjacent characters. - /// Default value: 45. + /// Default value: 45. The unit of textMaxAngle is in degrees. public func textMaxAngle(_ expression: Exp) -> Self { with(self, setter(\.textMaxAngle, .expression(expression))) } /// The maximum line width for text wrapping. - /// Default value: 10. Minimum value: 0. + /// Default value: 10. Minimum value: 0. The unit of textMaxWidth is in ems. public func textMaxWidth(_ constant: Double) -> Self { with(self, setter(\.textMaxWidth, .constant(constant))) } /// The maximum line width for text wrapping. - /// Default value: 10. Minimum value: 0. + /// Default value: 10. Minimum value: 0. The unit of textMaxWidth is in ems. public func textMaxWidth(_ expression: Exp) -> Self { with(self, setter(\.textMaxWidth, .expression(expression))) } /// Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of textOffset is in ems. public func textOffset(x: Double, y: Double) -> Self { with(self, setter(\.textOffset, .constant([x, y]))) } /// Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of textOffset is in ems. public func textOffset(_ expression: Exp) -> Self { with(self, setter(\.textOffset, .expression(expression))) } @@ -1109,13 +1141,13 @@ extension SymbolLayer { } /// Size of the additional area around the text bounding box used for detecting symbol collisions. - /// Default value: 2. Minimum value: 0. + /// Default value: 2. Minimum value: 0. The unit of textPadding is in pixels. public func textPadding(_ constant: Double) -> Self { with(self, setter(\.textPadding, .constant(constant))) } /// Size of the additional area around the text bounding box used for detecting symbol collisions. - /// Default value: 2. Minimum value: 0. + /// Default value: 2. Minimum value: 0. The unit of textPadding is in pixels. public func textPadding(_ expression: Exp) -> Self { with(self, setter(\.textPadding, .expression(expression))) } @@ -1133,25 +1165,25 @@ extension SymbolLayer { } /// Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present. - /// Default value: 0. + /// Default value: 0. The unit of textRadialOffset is in ems. public func textRadialOffset(_ constant: Double) -> Self { with(self, setter(\.textRadialOffset, .constant(constant))) } /// Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present. - /// Default value: 0. + /// Default value: 0. The unit of textRadialOffset is in ems. public func textRadialOffset(_ expression: Exp) -> Self { with(self, setter(\.textRadialOffset, .expression(expression))) } /// Rotates the text clockwise. - /// Default value: 0. + /// Default value: 0. The unit of textRotate is in degrees. public func textRotate(_ constant: Double) -> Self { with(self, setter(\.textRotate, .constant(constant))) } /// Rotates the text clockwise. - /// Default value: 0. + /// Default value: 0. The unit of textRotate is in degrees. public func textRotate(_ expression: Exp) -> Self { with(self, setter(\.textRotate, .expression(expression))) } @@ -1169,17 +1201,33 @@ extension SymbolLayer { } /// Font size. - /// Default value: 16. Minimum value: 0. + /// Default value: 16. Minimum value: 0. The unit of textSize is in pixels. public func textSize(_ constant: Double) -> Self { with(self, setter(\.textSize, .constant(constant))) } /// Font size. - /// Default value: 16. Minimum value: 0. + /// Default value: 16. Minimum value: 0. The unit of textSize is in pixels. public func textSize(_ expression: Exp) -> Self { with(self, setter(\.textSize, .expression(expression))) } + /// Defines the minimum and maximum scaling factors for text related properties like `text-size`, `text-max-width`, `text-halo-width`, `font-size` + /// Default value: [0.8,2]. Value range: [0.1, 10] + @_documentation(visibility: public) + @_spi(Experimental) + public func textSizeScaleRange(min: Double, max: Double) -> Self { + with(self, setter(\.textSizeScaleRange, .constant([min, max]))) + } + + /// Defines the minimum and maximum scaling factors for text related properties like `text-size`, `text-max-width`, `text-halo-width`, `font-size` + /// Default value: [0.8,2]. Value range: [0.1, 10] + @_documentation(visibility: public) + @_spi(Experimental) + public func textSizeScaleRange(_ expression: Exp) -> Self { + with(self, setter(\.textSizeScaleRange, .expression(expression))) + } + /// Specifies how to capitalize text, similar to the CSS `text-transform` property. /// Default value: "none". public func textTransform(_ constant: TextTransform) -> Self { @@ -1253,7 +1301,7 @@ extension SymbolLayer { } /// Controls the intensity of light emitted on the source features. - /// Default value: 1. Minimum value: 0. + /// Default value: 1. Minimum value: 0. The unit of iconEmissiveStrength is in intensity. public func iconEmissiveStrength(_ constant: Double) -> Self { with(self, setter(\.iconEmissiveStrength, .constant(constant))) } @@ -1264,13 +1312,13 @@ extension SymbolLayer { } /// Controls the intensity of light emitted on the source features. - /// Default value: 1. Minimum value: 0. + /// Default value: 1. Minimum value: 0. The unit of iconEmissiveStrength is in intensity. public func iconEmissiveStrength(_ expression: Exp) -> Self { with(self, setter(\.iconEmissiveStrength, .expression(expression))) } /// Fade out the halo towards the outside. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of iconHaloBlur is in pixels. public func iconHaloBlur(_ constant: Double) -> Self { with(self, setter(\.iconHaloBlur, .constant(constant))) } @@ -1281,7 +1329,7 @@ extension SymbolLayer { } /// Fade out the halo towards the outside. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of iconHaloBlur is in pixels. public func iconHaloBlur(_ expression: Exp) -> Self { with(self, setter(\.iconHaloBlur, .expression(expression))) } @@ -1310,7 +1358,7 @@ extension SymbolLayer { } /// Distance of halo to the icon outline. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of iconHaloWidth is in pixels. public func iconHaloWidth(_ constant: Double) -> Self { with(self, setter(\.iconHaloWidth, .constant(constant))) } @@ -1321,7 +1369,7 @@ extension SymbolLayer { } /// Distance of halo to the icon outline. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of iconHaloWidth is in pixels. public func iconHaloWidth(_ expression: Exp) -> Self { with(self, setter(\.iconHaloWidth, .expression(expression))) } @@ -1378,7 +1426,7 @@ extension SymbolLayer { } /// Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of iconTranslate is in pixels. public func iconTranslate(x: Double, y: Double) -> Self { with(self, setter(\.iconTranslate, .constant([x, y]))) } @@ -1389,7 +1437,7 @@ extension SymbolLayer { } /// Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of iconTranslate is in pixels. public func iconTranslate(_ expression: Exp) -> Self { with(self, setter(\.iconTranslate, .expression(expression))) } @@ -1453,7 +1501,7 @@ extension SymbolLayer { } /// Controls the intensity of light emitted on the source features. - /// Default value: 1. Minimum value: 0. + /// Default value: 1. Minimum value: 0. The unit of textEmissiveStrength is in intensity. public func textEmissiveStrength(_ constant: Double) -> Self { with(self, setter(\.textEmissiveStrength, .constant(constant))) } @@ -1464,13 +1512,13 @@ extension SymbolLayer { } /// Controls the intensity of light emitted on the source features. - /// Default value: 1. Minimum value: 0. + /// Default value: 1. Minimum value: 0. The unit of textEmissiveStrength is in intensity. public func textEmissiveStrength(_ expression: Exp) -> Self { with(self, setter(\.textEmissiveStrength, .expression(expression))) } /// The halo's fadeout distance towards the outside. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of textHaloBlur is in pixels. public func textHaloBlur(_ constant: Double) -> Self { with(self, setter(\.textHaloBlur, .constant(constant))) } @@ -1481,7 +1529,7 @@ extension SymbolLayer { } /// The halo's fadeout distance towards the outside. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of textHaloBlur is in pixels. public func textHaloBlur(_ expression: Exp) -> Self { with(self, setter(\.textHaloBlur, .expression(expression))) } @@ -1510,7 +1558,7 @@ extension SymbolLayer { } /// Distance of halo to the font outline. Max text halo width is 1/4 of the font-size. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of textHaloWidth is in pixels. public func textHaloWidth(_ constant: Double) -> Self { with(self, setter(\.textHaloWidth, .constant(constant))) } @@ -1521,7 +1569,7 @@ extension SymbolLayer { } /// Distance of halo to the font outline. Max text halo width is 1/4 of the font-size. - /// Default value: 0. Minimum value: 0. + /// Default value: 0. Minimum value: 0. The unit of textHaloWidth is in pixels. public func textHaloWidth(_ expression: Exp) -> Self { with(self, setter(\.textHaloWidth, .expression(expression))) } @@ -1561,7 +1609,7 @@ extension SymbolLayer { } /// Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of textTranslate is in pixels. public func textTranslate(x: Double, y: Double) -> Self { with(self, setter(\.textTranslate, .constant([x, y]))) } @@ -1572,7 +1620,7 @@ extension SymbolLayer { } /// Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up. - /// Default value: [0,0]. + /// Default value: [0,0]. The unit of textTranslate is in pixels. public func textTranslate(_ expression: Exp) -> Self { with(self, setter(\.textTranslate, .expression(expression))) } diff --git a/Sources/MapboxMaps/Style/Generated/Light/DirectionalLight.swift b/Sources/MapboxMaps/Style/Generated/Light/DirectionalLight.swift index 510ed2c0a654..1da243a136cb 100644 --- a/Sources/MapboxMaps/Style/Generated/Light/DirectionalLight.swift +++ b/Sources/MapboxMaps/Style/Generated/Light/DirectionalLight.swift @@ -44,6 +44,10 @@ public struct DirectionalLight: Codable, StyleEncodable, Equatable { /// Transition property for `shadowIntensity` public var shadowIntensityTransition: StyleTransition? + /// Determines the quality of the shadows on the map. A value of 1 ensures the highest quality and is the default value. + /// Default value: 1. Value range: [0, 1] + @_spi(Experimental) public var shadowQuality: Value? + /// Creates a new Directional light. public init(id: String = UUID().uuidString) { self.id = id @@ -64,6 +68,7 @@ public struct DirectionalLight: Codable, StyleEncodable, Equatable { try propertiesContainer.encodeIfPresent(intensityTransition, forKey: .intensityTransition) try propertiesContainer.encodeIfPresent(shadowIntensity, forKey: .shadowIntensity) try propertiesContainer.encodeIfPresent(shadowIntensityTransition, forKey: .shadowIntensityTransition) + try propertiesContainer.encodeIfPresent(shadowQuality, forKey: .shadowQuality) } public init(from decoder: Decoder) throws { @@ -80,6 +85,7 @@ public struct DirectionalLight: Codable, StyleEncodable, Equatable { self.intensityTransition = try propertiesContainer.decodeIfPresent(StyleTransition.self, forKey: .intensityTransition) self.shadowIntensity = try propertiesContainer.decodeIfPresent(Value.self, forKey: .shadowIntensity) self.shadowIntensityTransition = try propertiesContainer.decodeIfPresent(StyleTransition.self, forKey: .shadowIntensityTransition) + self.shadowQuality = try propertiesContainer.decodeIfPresent(Value.self, forKey: .shadowQuality) } } @@ -99,6 +105,7 @@ public struct DirectionalLight: Codable, StyleEncodable, Equatable { case intensityTransition = "intensity-transition" case shadowIntensity = "shadow-intensity" case shadowIntensityTransition = "shadow-intensity-transition" + case shadowQuality = "shadow-quality" } } @@ -188,6 +195,22 @@ extension DirectionalLight { public func shadowIntensity(_ expression: Exp) -> Self { with(self, setter(\.shadowIntensity, .expression(expression))) } + + /// Determines the quality of the shadows on the map. A value of 1 ensures the highest quality and is the default value. + /// Default value: 1. Value range: [0, 1] + @_documentation(visibility: public) + @_spi(Experimental) + public func shadowQuality(_ constant: Double) -> Self { + with(self, setter(\.shadowQuality, .constant(constant))) + } + + /// Determines the quality of the shadows on the map. A value of 1 ensures the highest quality and is the default value. + /// Default value: 1. Value range: [0, 1] + @_documentation(visibility: public) + @_spi(Experimental) + public func shadowQuality(_ expression: Exp) -> Self { + with(self, setter(\.shadowQuality, .expression(expression))) + } } @available(iOS 13.0, *) diff --git a/Sources/MapboxMaps/Style/Generated/Properties/Properties.swift b/Sources/MapboxMaps/Style/Generated/Properties/Properties.swift index 16981b04e9b4..bed75972dd5a 100644 --- a/Sources/MapboxMaps/Style/Generated/Properties/Properties.swift +++ b/Sources/MapboxMaps/Style/Generated/Properties/Properties.swift @@ -2,15 +2,37 @@ import Foundation public enum Visibility: String, Codable, Sendable { - - /// The layer is shown. + /// The layer is visible. case visible = "visible" - /// The layer is not shown. + /// The layer is hidden. case none = "none" } -// MARK: LINE_CAP +/// Selects the base of fill-elevation. Some modes might require precomputed elevation data in the tileset. +@_documentation(visibility: public) +@_spi(Experimental) +public struct FillElevationReference: RawRepresentable, Codable, Hashable, Sendable { + @_documentation(visibility: public) + public let rawValue: String + + @_documentation(visibility: public) + public init(rawValue: String) { + self.rawValue = rawValue + } + + /// Elevated rendering is disabled. + @_documentation(visibility: public) + public static let none = FillElevationReference(rawValue: "none") + + /// Elevate geometry relative to HD roads. Use this mode to describe base polygons of the road networks. + @_documentation(visibility: public) + public static let hdRoadBase = FillElevationReference(rawValue: "hd-road-base") + + /// Elevated rendering is enabled. Use this mode to describe additive and stackable features such as 'hatched areas' that should exist only on top of road polygons. + @_documentation(visibility: public) + public static let hdRoadMarkup = FillElevationReference(rawValue: "hd-road-markup") +} /// The display of line endings. public struct LineCap: RawRepresentable, Codable, Hashable, Sendable { @@ -28,10 +50,36 @@ public struct LineCap: RawRepresentable, Codable, Hashable, Sendable { /// A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width. public static let square = LineCap(rawValue: "square") - } -// MARK: LINE_JOIN +/// Selects the base of line-elevation. Some modes might require precomputed elevation data in the tileset. +@_documentation(visibility: public) +@_spi(Experimental) +public struct LineElevationReference: RawRepresentable, Codable, Hashable, Sendable { + @_documentation(visibility: public) + public let rawValue: String + + @_documentation(visibility: public) + public init(rawValue: String) { + self.rawValue = rawValue + } + + /// Elevated rendering is disabled. + @_documentation(visibility: public) + public static let none = LineElevationReference(rawValue: "none") + + /// Elevated rendering is enabled. Use this mode to elevate lines relative to the sea level. + @_documentation(visibility: public) + public static let sea = LineElevationReference(rawValue: "sea") + + /// Elevated rendering is enabled. Use this mode to elevate lines relative to the ground's height below them. + @_documentation(visibility: public) + public static let ground = LineElevationReference(rawValue: "ground") + + /// Elevated rendering is enabled. Use this mode to describe additive and stackable features that should exist only on top of road polygons. + @_documentation(visibility: public) + public static let hdRoadMarkup = LineElevationReference(rawValue: "hd-road-markup") +} /// The display of lines when joining. public struct LineJoin: RawRepresentable, Codable, Hashable, Sendable { @@ -52,10 +100,28 @@ public struct LineJoin: RawRepresentable, Codable, Hashable, Sendable { /// Line segments are not joined together, each one creates a separate line. Useful in combination with line-pattern. Line-cap property is not respected. Can't be used with data-driven styling. public static let none = LineJoin(rawValue: "none") - } -// MARK: ICON_ANCHOR +/// Selects the unit of line-width. The same unit is automatically used for line-blur and line-offset. Note: This is an experimental property and might be removed in a future release. +@_documentation(visibility: public) +@_spi(Experimental) +public struct LineWidthUnit: RawRepresentable, Codable, Hashable, Sendable { + @_documentation(visibility: public) + public let rawValue: String + + @_documentation(visibility: public) + public init(rawValue: String) { + self.rawValue = rawValue + } + + /// Width is rendered in pixels. + @_documentation(visibility: public) + public static let pixels = LineWidthUnit(rawValue: "pixels") + + /// Width is rendered in meters. + @_documentation(visibility: public) + public static let meters = LineWidthUnit(rawValue: "meters") +} /// Part of the icon placed closest to the anchor. public struct IconAnchor: RawRepresentable, Codable, Hashable, Sendable { @@ -91,11 +157,8 @@ public struct IconAnchor: RawRepresentable, Codable, Hashable, Sendable { /// The bottom right corner of the icon is placed closest to the anchor. public static let bottomRight = IconAnchor(rawValue: "bottom-right") - } -// MARK: ICON_PITCH_ALIGNMENT - /// Orientation of icon when map is pitched. public struct IconPitchAlignment: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -110,13 +173,10 @@ public struct IconPitchAlignment: RawRepresentable, Codable, Hashable, Sendable /// The icon is aligned to the plane of the viewport. public static let viewport = IconPitchAlignment(rawValue: "viewport") - /// Automatically matches the value of {@link ICON_ROTATION_ALIGNMENT}. + /// Automatically matches the value of ``IconRotationAlignment``. public static let auto = IconPitchAlignment(rawValue: "auto") - } -// MARK: ICON_ROTATION_ALIGNMENT - /// In combination with `symbol-placement`, determines the rotation behavior of icons. public struct IconRotationAlignment: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -125,19 +185,16 @@ public struct IconRotationAlignment: RawRepresentable, Codable, Hashable, Sendab self.rawValue = rawValue } - /// When {@link SYMBOL_PLACEMENT} is set to {@link Property#SYMBOL_PLACEMENT_POINT}, aligns icons east-west. When {@link SYMBOL_PLACEMENT} is set to {@link Property#SYMBOL_PLACEMENT_LINE} or {@link Property#SYMBOL_PLACEMENT_LINE_CENTER}, aligns icon x-axes with the line. + /// When ``SymbolPlacement`` is set to ``SymbolPlacement/point``, aligns icons east-west. When ``SymbolPlacement`` is set to ``SymbolPlacement/line`` or ``SymbolPlacement/lineCenter`` aligns icon x-axes with the line. public static let map = IconRotationAlignment(rawValue: "map") - /// Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of {@link SYMBOL_PLACEMENT}. + /// Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of ``SymbolPlacement``. public static let viewport = IconRotationAlignment(rawValue: "viewport") - /// When {@link SYMBOL_PLACEMENT} is set to {@link Property#SYMBOL_PLACEMENT_POINT}, this is equivalent to {@link Property#ICON_ROTATION_ALIGNMENT_VIEWPORT}. When {@link SYMBOL_PLACEMENT} is set to {@link Property#SYMBOL_PLACEMENT_LINE} or {@link Property#SYMBOL_PLACEMENT_LINE_CENTER}, this is equivalent to {@link Property#ICON_ROTATION_ALIGNMENT_MAP}. + /// When ``SymbolPlacement`` is set to ``SymbolPlacement/point``, this is equivalent to ``IconRotationAlignment/viewport``. When ``SymbolPlacement`` is set to ``SymbolPlacement/line`` or ``SymbolPlacement/lineCenter`` this is equivalent to ``IconRotationAlignment/map``. public static let auto = IconRotationAlignment(rawValue: "auto") - } -// MARK: ICON_TEXT_FIT - /// Scales the icon to fit around the associated text. public struct IconTextFit: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -157,29 +214,33 @@ public struct IconTextFit: RawRepresentable, Codable, Hashable, Sendable { /// The icon is scaled in both x- and y-dimensions. public static let both = IconTextFit(rawValue: "both") - } -// MARK: SYMBOL_ELEVATION_REFERENCE - /// Selects the base of symbol-elevation. +@_documentation(visibility: public) +@_spi(Experimental) public struct SymbolElevationReference: RawRepresentable, Codable, Hashable, Sendable { + @_documentation(visibility: public) public let rawValue: String + @_documentation(visibility: public) public init(rawValue: String) { self.rawValue = rawValue } /// Elevate symbols relative to the sea level. + @_documentation(visibility: public) public static let sea = SymbolElevationReference(rawValue: "sea") /// Elevate symbols relative to the ground's height below them. + @_documentation(visibility: public) public static let ground = SymbolElevationReference(rawValue: "ground") + /// Use this mode to enable elevated behavior for features that are rendered on top of 3D road polygons. The feature is currently being developed. + @_documentation(visibility: public) + public static let hdRoadMarkup = SymbolElevationReference(rawValue: "hd-road-markup") } -// MARK: SYMBOL_PLACEMENT - /// Label placement relative to its geometry. public struct SymbolPlacement: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -191,16 +252,13 @@ public struct SymbolPlacement: RawRepresentable, Codable, Hashable, Sendable { /// The label is placed at the point where the geometry is located. public static let point = SymbolPlacement(rawValue: "point") - /// The label is placed along the line of the geometry. Can only be used on LineString and Polygon geometries. + /// The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. public static let line = SymbolPlacement(rawValue: "line") - /// The label is placed at the center of the line of the geometry. Can only be used on LineString and Polygon geometries. Note that a single feature in a vector tile may contain multiple line geometries. + /// The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries. public static let lineCenter = SymbolPlacement(rawValue: "line-center") - } -// MARK: SYMBOL_Z_ORDER - /// Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`. public struct SymbolZOrder: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -209,19 +267,16 @@ public struct SymbolZOrder: RawRepresentable, Codable, Hashable, Sendable { self.rawValue = rawValue } - /// Sorts symbols by symbol sort key if set. Otherwise, sorts symbols by their y-position relative to the viewport if {@link ICON_ALLOW_OVERLAP} or {@link TEXT_ALLOW_OVERLAP} is set to {@link TRUE} or {@link ICON_IGNORE_PLACEMENT} or {@link TEXT_IGNORE_PLACEMENT} is {@link FALSE}. + /// Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`. public static let auto = SymbolZOrder(rawValue: "auto") - /// Sorts symbols by their y-position relative to the viewport if {@link ICON_ALLOW_OVERLAP} or {@link TEXT_ALLOW_OVERLAP} is set to {@link TRUE} or {@link ICON_IGNORE_PLACEMENT} or {@link TEXT_IGNORE_PLACEMENT} is {@link FALSE}. + /// Sorts symbols by their y-position relative to the viewport if any of the following is set to `true`: `icon-allow-overlap`, `text-allow-overlap`, `icon-ignore-placement`, `text-ignore-placement`. public static let viewportY = SymbolZOrder(rawValue: "viewport-y") - /// Sorts symbols by symbol sort key if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data. + /// Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data. public static let source = SymbolZOrder(rawValue: "source") - } -// MARK: TEXT_ANCHOR - /// Part of the text placed closest to the anchor. public struct TextAnchor: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -256,11 +311,8 @@ public struct TextAnchor: RawRepresentable, Codable, Hashable, Sendable { /// The bottom right corner of the text is placed closest to the anchor. public static let bottomRight = TextAnchor(rawValue: "bottom-right") - } -// MARK: TEXT_JUSTIFY - /// Text justification options. public struct TextJustify: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -280,11 +332,8 @@ public struct TextJustify: RawRepresentable, Codable, Hashable, Sendable { /// The text is aligned to the right. public static let right = TextJustify(rawValue: "right") - } -// MARK: TEXT_PITCH_ALIGNMENT - /// Orientation of text when map is pitched. public struct TextPitchAlignment: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -299,13 +348,10 @@ public struct TextPitchAlignment: RawRepresentable, Codable, Hashable, Sendable /// The text is aligned to the plane of the viewport. public static let viewport = TextPitchAlignment(rawValue: "viewport") - /// Automatically matches the value of {@link TEXT_ROTATION_ALIGNMENT}. + /// Automatically matches the value of ``TextRotationAlignment``. public static let auto = TextPitchAlignment(rawValue: "auto") - } -// MARK: TEXT_ROTATION_ALIGNMENT - /// In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text. public struct TextRotationAlignment: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -314,19 +360,16 @@ public struct TextRotationAlignment: RawRepresentable, Codable, Hashable, Sendab self.rawValue = rawValue } - /// When {@link SYMBOL_PLACEMENT} is set to {@link Property#SYMBOL_PLACEMENT_POINT}, aligns text east-west. When {@link SYMBOL_PLACEMENT} is set to {@link Property#SYMBOL_PLACEMENT_LINE} or {@link Property#SYMBOL_PLACEMENT_LINE_CENTER}, aligns text x-axes with the line. + /// When ``SymbolPlacement`` is set to ``SymbolPlacement/point``, aligns text east-west. When ``SymbolPlacement`` is set to ``SymbolPlacement/line`` or ``SymbolPlacement/lineCenter`` aligns text x-axes with the line. public static let map = TextRotationAlignment(rawValue: "map") - /// Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of {@link SYMBOL_PLACEMENT}. + /// Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of ``SymbolPlacement``. public static let viewport = TextRotationAlignment(rawValue: "viewport") - /// When {@link SYMBOL_PLACEMENT} is set to {@link Property#SYMBOL_PLACEMENT_POINT}, this is equivalent to {@link Property#TEXT_ROTATION_ALIGNMENT_VIEWPORT}. When {@link SYMBOL_PLACEMENT} is set to {@link Property#SYMBOL_PLACEMENT_LINE} or {@link Property#SYMBOL_PLACEMENT_LINE_CENTER}, this is equivalent to {@link Property#TEXT_ROTATION_ALIGNMENT_MAP}. + /// When ``SymbolPlacement`` is set to ``SymbolPlacement/point``, this is equivalent to ``TextRotationAlignment/viewport``. When ``SymbolPlacement`` is set to ``SymbolPlacement/line`` or ``SymbolPlacement/lineCenter`` this is equivalent to ``TextRotationAlignment/map``. public static let auto = TextRotationAlignment(rawValue: "auto") - } -// MARK: TEXT_TRANSFORM - /// Specifies how to capitalize text, similar to the CSS `text-transform` property. public struct TextTransform: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -343,11 +386,8 @@ public struct TextTransform: RawRepresentable, Codable, Hashable, Sendable { /// Forces all letters to be displayed in lowercase. public static let lowercase = TextTransform(rawValue: "lowercase") - } -// MARK: FILL_TRANSLATE_ANCHOR - /// Controls the frame of reference for `fill-translate`. public struct FillTranslateAnchor: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -361,11 +401,8 @@ public struct FillTranslateAnchor: RawRepresentable, Codable, Hashable, Sendable /// The fill is translated relative to the viewport. public static let viewport = FillTranslateAnchor(rawValue: "viewport") - } -// MARK: LINE_TRANSLATE_ANCHOR - /// Controls the frame of reference for `line-translate`. public struct LineTranslateAnchor: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -379,11 +416,8 @@ public struct LineTranslateAnchor: RawRepresentable, Codable, Hashable, Sendable /// The line is translated relative to the viewport. public static let viewport = LineTranslateAnchor(rawValue: "viewport") - } -// MARK: ICON_TRANSLATE_ANCHOR - /// Controls the frame of reference for `icon-translate`. public struct IconTranslateAnchor: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -397,11 +431,8 @@ public struct IconTranslateAnchor: RawRepresentable, Codable, Hashable, Sendable /// Icons are translated relative to the viewport. public static let viewport = IconTranslateAnchor(rawValue: "viewport") - } -// MARK: TEXT_TRANSLATE_ANCHOR - /// Controls the frame of reference for `text-translate`. public struct TextTranslateAnchor: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -415,11 +446,8 @@ public struct TextTranslateAnchor: RawRepresentable, Codable, Hashable, Sendable /// The text is translated relative to the viewport. public static let viewport = TextTranslateAnchor(rawValue: "viewport") - } -// MARK: CIRCLE_PITCH_ALIGNMENT - /// Orientation of circle when map is pitched. public struct CirclePitchAlignment: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -433,11 +461,8 @@ public struct CirclePitchAlignment: RawRepresentable, Codable, Hashable, Sendabl /// The circle is aligned to the plane of the viewport. public static let viewport = CirclePitchAlignment(rawValue: "viewport") - } -// MARK: CIRCLE_PITCH_SCALE - /// Controls the scaling behavior of the circle when the map is pitched. public struct CirclePitchScale: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -451,11 +476,8 @@ public struct CirclePitchScale: RawRepresentable, Codable, Hashable, Sendable { /// Circles are not scaled. public static let viewport = CirclePitchScale(rawValue: "viewport") - } -// MARK: CIRCLE_TRANSLATE_ANCHOR - /// Controls the frame of reference for `circle-translate`. public struct CircleTranslateAnchor: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -469,47 +491,50 @@ public struct CircleTranslateAnchor: RawRepresentable, Codable, Hashable, Sendab /// The circle is translated relative to the viewport. public static let viewport = CircleTranslateAnchor(rawValue: "viewport") - } -// MARK: FILL_EXTRUSION_BASE_ALIGNMENT - /// Controls the behavior of fill extrusion base over terrain +@_documentation(visibility: public) +@_spi(Experimental) public struct FillExtrusionBaseAlignment: RawRepresentable, Codable, Hashable, Sendable { + @_documentation(visibility: public) public let rawValue: String + @_documentation(visibility: public) public init(rawValue: String) { self.rawValue = rawValue } /// The fill extrusion base follows terrain slope. + @_documentation(visibility: public) public static let terrain = FillExtrusionBaseAlignment(rawValue: "terrain") /// The fill extrusion base is flat over terrain. + @_documentation(visibility: public) public static let flat = FillExtrusionBaseAlignment(rawValue: "flat") - } -// MARK: FILL_EXTRUSION_HEIGHT_ALIGNMENT - /// Controls the behavior of fill extrusion height over terrain +@_documentation(visibility: public) +@_spi(Experimental) public struct FillExtrusionHeightAlignment: RawRepresentable, Codable, Hashable, Sendable { + @_documentation(visibility: public) public let rawValue: String + @_documentation(visibility: public) public init(rawValue: String) { self.rawValue = rawValue } /// The fill extrusion height follows terrain slope. + @_documentation(visibility: public) public static let terrain = FillExtrusionHeightAlignment(rawValue: "terrain") /// The fill extrusion height is flat over terrain. + @_documentation(visibility: public) public static let flat = FillExtrusionHeightAlignment(rawValue: "flat") - } -// MARK: FILL_EXTRUSION_TRANSLATE_ANCHOR - /// Controls the frame of reference for `fill-extrusion-translate`. public struct FillExtrusionTranslateAnchor: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -523,11 +548,8 @@ public struct FillExtrusionTranslateAnchor: RawRepresentable, Codable, Hashable, /// The fill extrusion is translated relative to the viewport. public static let viewport = FillExtrusionTranslateAnchor(rawValue: "viewport") - } -// MARK: RASTER_RESAMPLING - /// The resampling/interpolation method to use for overscaling, also known as texture magnification filter public struct RasterResampling: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -541,11 +563,8 @@ public struct RasterResampling: RawRepresentable, Codable, Hashable, Sendable { /// Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled public static let nearest = RasterResampling(rawValue: "nearest") - } -// MARK: HILLSHADE_ILLUMINATION_ANCHOR - /// Direction of light source when map is rotated. public struct HillshadeIlluminationAnchor: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -559,65 +578,71 @@ public struct HillshadeIlluminationAnchor: RawRepresentable, Codable, Hashable, /// The hillshade illumination is relative to the top of the viewport. public static let viewport = HillshadeIlluminationAnchor(rawValue: "viewport") - } -// MARK: MODEL_SCALE_MODE - /// Defines scaling mode. Only applies to location-indicator type layers. +@_documentation(visibility: public) +@_spi(Experimental) public struct ModelScaleMode: RawRepresentable, Codable, Hashable, Sendable { + @_documentation(visibility: public) public let rawValue: String + @_documentation(visibility: public) public init(rawValue: String) { self.rawValue = rawValue } /// Model is scaled so that it's always the same size relative to other map features. The property model-scale specifies how many meters each unit in the model file should cover. + @_documentation(visibility: public) public static let map = ModelScaleMode(rawValue: "map") /// Model is scaled so that it's always the same size on the screen. The property model-scale specifies how many pixels each unit in model file should cover. + @_documentation(visibility: public) public static let viewport = ModelScaleMode(rawValue: "viewport") - } -// MARK: MODEL_TYPE - /// Defines rendering behavior of model in respect to other 3D scene objects. +@_documentation(visibility: public) +@_spi(Experimental) public struct ModelType: RawRepresentable, Codable, Hashable, Sendable { + @_documentation(visibility: public) public let rawValue: String + @_documentation(visibility: public) public init(rawValue: String) { self.rawValue = rawValue } /// Integrated to 3D scene, using depth testing, along with terrain, fill-extrusions and custom layer. + @_documentation(visibility: public) public static let common3d = ModelType(rawValue: "common-3d") /// Displayed over other 3D content, occluded by terrain. + @_documentation(visibility: public) public static let locationIndicator = ModelType(rawValue: "location-indicator") - } -// MARK: BACKGROUND_PITCH_ALIGNMENT - /// Orientation of background layer. +@_documentation(visibility: public) +@_spi(Experimental) public struct BackgroundPitchAlignment: RawRepresentable, Codable, Hashable, Sendable { + @_documentation(visibility: public) public let rawValue: String + @_documentation(visibility: public) public init(rawValue: String) { self.rawValue = rawValue } /// The background is aligned to the plane of the map. + @_documentation(visibility: public) public static let map = BackgroundPitchAlignment(rawValue: "map") - /// The background is aligned to the plane of the viewport, covering the whole screen. + /// The background is aligned to the plane of the viewport, covering the whole screen. Note: This mode disables the automatic reordering of the layer when terrain or globe projection is used. + @_documentation(visibility: public) public static let viewport = BackgroundPitchAlignment(rawValue: "viewport") - } -// MARK: SKY_TYPE - /// The type of the sky public struct SkyType: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -626,16 +651,13 @@ public struct SkyType: RawRepresentable, Codable, Hashable, Sendable { self.rawValue = rawValue } - /// Renders the sky with a gradient that can be configured with {@link SKY_GRADIENT_RADIUS} and {@link SKY_GRADIENT}. + /// Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`. public static let gradient = SkyType(rawValue: "gradient") - /// Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through {@link SKY_ATMOSPHERE_SUN}. + /// Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`. public static let atmosphere = SkyType(rawValue: "atmosphere") - } -// MARK: ANCHOR - /// Whether extruded geometries are lit relative to the map or viewport. public struct Anchor: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -649,11 +671,8 @@ public struct Anchor: RawRepresentable, Codable, Hashable, Sendable { /// The position of the light source is aligned to the rotation of the viewport. If terrain is enabled, performance regressions may occur in certain scenarios, particularly on lower-end hardware. Ensure that you test your target scenarios on the appropriate hardware to verify performance. public static let viewport = Anchor(rawValue: "viewport") - } -// MARK: NAME - /// The name of the projection to be used for rendering the map. public struct StyleProjectionName: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -667,11 +686,8 @@ public struct StyleProjectionName: RawRepresentable, Codable, Hashable, Sendable /// A globe projection. public static let globe = StyleProjectionName(rawValue: "globe") - } -// MARK: TEXT_WRITING_MODE - /// The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either ['horizontal', 'vertical'] or ['vertical', 'horizontal'], the order doesn't affect the placement. public struct TextWritingMode: RawRepresentable, Codable, Hashable, Sendable { public let rawValue: String @@ -685,25 +701,25 @@ public struct TextWritingMode: RawRepresentable, Codable, Hashable, Sendable { /// If a text's language supports vertical writing mode, symbols would be laid out vertically. public static let vertical = TextWritingMode(rawValue: "vertical") - } -// MARK: CLIP_LAYER_TYPES - /// Layer types that will also be removed if fallen below this clip layer. +@_documentation(visibility: public) +@_spi(Experimental) public struct ClipLayerTypes: RawRepresentable, Codable, Hashable, Sendable { + @_documentation(visibility: public) public let rawValue: String + @_documentation(visibility: public) public init(rawValue: String) { self.rawValue = rawValue } /// If present the clip layer would remove all 3d model layers below it. Currently only instanced models (e.g. trees) are removed. + @_documentation(visibility: public) public static let model = ClipLayerTypes(rawValue: "model") /// If present the clip layer would remove all symbol layers below it. + @_documentation(visibility: public) public static let symbol = ClipLayerTypes(rawValue: "symbol") - } - -// End of generated file. diff --git a/Sources/MapboxMaps/Style/Generated/Rain.swift b/Sources/MapboxMaps/Style/Generated/Rain.swift index e3bef4acae2b..9d65dadf20b8 100644 --- a/Sources/MapboxMaps/Style/Generated/Rain.swift +++ b/Sources/MapboxMaps/Style/Generated/Rain.swift @@ -24,8 +24,8 @@ public struct Rain: Codable, Equatable, StyleEncodable { @_spi(Experimental) public var centerThinningTransition: StyleTransition? - /// - /// Default value: "#ffffff". + /// Individual rain particle dorplets color. + /// Default value: "#919191". @_documentation(visibility: public) @_spi(Experimental) public var color: Value? @@ -35,7 +35,7 @@ public struct Rain: Codable, Equatable, StyleEncodable { @_spi(Experimental) public var colorTransition: StyleTransition? - /// Rain particles density. + /// Rain particles density. Controls the overall screen density of the rain. /// Default value: 1. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) @@ -46,7 +46,7 @@ public struct Rain: Codable, Equatable, StyleEncodable { @_spi(Experimental) public var densityTransition: StyleTransition? - /// Main rain particles direction. Heading & pitch + /// Main rain particles direction. Azimuth and polar angles. /// Default value: [0,80]. Value range: [0, 360] @_documentation(visibility: public) @_spi(Experimental) @@ -57,7 +57,29 @@ public struct Rain: Codable, Equatable, StyleEncodable { @_spi(Experimental) public var directionTransition: StyleTransition? - /// Rain particles movement factor. + /// Rain particles screen-space distortion strength. + /// Default value: 0.5. Value range: [0, 1] + @_documentation(visibility: public) + @_spi(Experimental) + public var distortionStrength: Value? + + /// Transition options for distortion-strength + @_documentation(visibility: public) + @_spi(Experimental) + public var distortionStrengthTransition: StyleTransition? + + /// Rain droplet size. x - normal to direction, y - along direction + /// Default value: [1,10]. Value range: [0, 20] + @_documentation(visibility: public) + @_spi(Experimental) + public var dropletSize: Value<[Double]>? + + /// Transition options for droplet-size + @_documentation(visibility: public) + @_spi(Experimental) + public var dropletSizeTransition: StyleTransition? + + /// Rain particles movement factor. Controls the overall rain particles speed /// Default value: 1. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) @@ -69,7 +91,7 @@ public struct Rain: Codable, Equatable, StyleEncodable { public var intensityTransition: StyleTransition? /// Rain particles opacity. - /// Default value: 1. Value range: [0, 1] + /// Default value: 0.19. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) public var opacity: Value? @@ -79,8 +101,8 @@ public struct Rain: Codable, Equatable, StyleEncodable { @_spi(Experimental) public var opacityTransition: StyleTransition? - /// Rain vignette screen-space effect. - /// Default value: 0. Value range: [0, 1] + /// Screen-space vignette rain tinting effect intensity. + /// Default value: 0.3. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) public var vignette: Value? @@ -90,6 +112,17 @@ public struct Rain: Codable, Equatable, StyleEncodable { @_spi(Experimental) public var vignetteTransition: StyleTransition? + /// Rain vignette screen-space corners tint color. + /// Default value: "#ffffff". + @_documentation(visibility: public) + @_spi(Experimental) + public var vignetteColor: Value? + + /// Transition options for vignette-color + @_documentation(visibility: public) + @_spi(Experimental) + public var vignetteColorTransition: StyleTransition? + public enum CodingKeys: String, CodingKey { case centerThinning = "center-thinning" case centerThinningTransition = "center-thinning-transition" @@ -99,12 +132,18 @@ public struct Rain: Codable, Equatable, StyleEncodable { case densityTransition = "density-transition" case direction = "direction" case directionTransition = "direction-transition" + case distortionStrength = "distortion-strength" + case distortionStrengthTransition = "distortion-strength-transition" + case dropletSize = "droplet-size" + case dropletSizeTransition = "droplet-size-transition" case intensity = "intensity" case intensityTransition = "intensity-transition" case opacity = "opacity" case opacityTransition = "opacity-transition" case vignette = "vignette" case vignetteTransition = "vignette-transition" + case vignetteColor = "vignette-color" + case vignetteColorTransition = "vignette-color-transition" } } @@ -132,16 +171,16 @@ extension Rain { with(self, setter(\.centerThinning, .expression(expression))) } - /// - /// Default value: "#ffffff". + /// Individual rain particle dorplets color. + /// Default value: "#919191". @_documentation(visibility: public) @_spi(Experimental) public func color(_ constant: StyleColor) -> Self { with(self, setter(\.color, .constant(constant))) } - /// - /// Default value: "#ffffff". + /// Individual rain particle dorplets color. + /// Default value: "#919191". @_documentation(visibility: public) @_spi(Experimental) public func color(_ color: UIColor) -> Self { @@ -155,15 +194,15 @@ extension Rain { with(self, setter(\.colorTransition, transition)) } - /// - /// Default value: "#ffffff". + /// Individual rain particle dorplets color. + /// Default value: "#919191". @_documentation(visibility: public) @_spi(Experimental) public func color(_ expression: Exp) -> Self { with(self, setter(\.color, .expression(expression))) } - /// Rain particles density. + /// Rain particles density. Controls the overall screen density of the rain. /// Default value: 1. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) @@ -178,7 +217,7 @@ extension Rain { with(self, setter(\.densityTransition, transition)) } - /// Rain particles density. + /// Rain particles density. Controls the overall screen density of the rain. /// Default value: 1. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) @@ -186,7 +225,7 @@ extension Rain { with(self, setter(\.density, .expression(expression))) } - /// Main rain particles direction. Heading & pitch + /// Main rain particles direction. Azimuth and polar angles. /// Default value: [0,80]. Value range: [0, 360] @_documentation(visibility: public) @_spi(Experimental) @@ -201,7 +240,7 @@ extension Rain { with(self, setter(\.directionTransition, transition)) } - /// Main rain particles direction. Heading & pitch + /// Main rain particles direction. Azimuth and polar angles. /// Default value: [0,80]. Value range: [0, 360] @_documentation(visibility: public) @_spi(Experimental) @@ -209,7 +248,53 @@ extension Rain { with(self, setter(\.direction, .expression(expression))) } - /// Rain particles movement factor. + /// Rain particles screen-space distortion strength. + /// Default value: 0.5. Value range: [0, 1] + @_documentation(visibility: public) + @_spi(Experimental) + public func distortionStrength(_ constant: Double) -> Self { + with(self, setter(\.distortionStrength, .constant(constant))) + } + + /// Transition property for `distortionStrength` + @_documentation(visibility: public) + @_spi(Experimental) + public func distortionStrengthTransition(_ transition: StyleTransition) -> Self { + with(self, setter(\.distortionStrengthTransition, transition)) + } + + /// Rain particles screen-space distortion strength. + /// Default value: 0.5. Value range: [0, 1] + @_documentation(visibility: public) + @_spi(Experimental) + public func distortionStrength(_ expression: Exp) -> Self { + with(self, setter(\.distortionStrength, .expression(expression))) + } + + /// Rain droplet size. x - normal to direction, y - along direction + /// Default value: [1,10]. Value range: [0, 20] + @_documentation(visibility: public) + @_spi(Experimental) + public func dropletSize(normalToDirection: Double, alongDirection: Double) -> Self { + with(self, setter(\.dropletSize, .constant([normalToDirection, alongDirection]))) + } + + /// Transition property for `dropletSize` + @_documentation(visibility: public) + @_spi(Experimental) + public func dropletSizeTransition(_ transition: StyleTransition) -> Self { + with(self, setter(\.dropletSizeTransition, transition)) + } + + /// Rain droplet size. x - normal to direction, y - along direction + /// Default value: [1,10]. Value range: [0, 20] + @_documentation(visibility: public) + @_spi(Experimental) + public func dropletSize(_ expression: Exp) -> Self { + with(self, setter(\.dropletSize, .expression(expression))) + } + + /// Rain particles movement factor. Controls the overall rain particles speed /// Default value: 1. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) @@ -224,7 +309,7 @@ extension Rain { with(self, setter(\.intensityTransition, transition)) } - /// Rain particles movement factor. + /// Rain particles movement factor. Controls the overall rain particles speed /// Default value: 1. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) @@ -233,7 +318,7 @@ extension Rain { } /// Rain particles opacity. - /// Default value: 1. Value range: [0, 1] + /// Default value: 0.19. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) public func opacity(_ constant: Double) -> Self { @@ -248,15 +333,15 @@ extension Rain { } /// Rain particles opacity. - /// Default value: 1. Value range: [0, 1] + /// Default value: 0.19. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) public func opacity(_ expression: Exp) -> Self { with(self, setter(\.opacity, .expression(expression))) } - /// Rain vignette screen-space effect. - /// Default value: 0. Value range: [0, 1] + /// Screen-space vignette rain tinting effect intensity. + /// Default value: 0.3. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) public func vignette(_ constant: Double) -> Self { @@ -270,14 +355,45 @@ extension Rain { with(self, setter(\.vignetteTransition, transition)) } - /// Rain vignette screen-space effect. - /// Default value: 0. Value range: [0, 1] + /// Screen-space vignette rain tinting effect intensity. + /// Default value: 0.3. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) public func vignette(_ expression: Exp) -> Self { with(self, setter(\.vignette, .expression(expression))) } + /// Rain vignette screen-space corners tint color. + /// Default value: "#ffffff". + @_documentation(visibility: public) + @_spi(Experimental) + public func vignetteColor(_ constant: StyleColor) -> Self { + with(self, setter(\.vignetteColor, .constant(constant))) + } + + /// Rain vignette screen-space corners tint color. + /// Default value: "#ffffff". + @_documentation(visibility: public) + @_spi(Experimental) + public func vignetteColor(_ color: UIColor) -> Self { + with(self, setter(\.vignetteColor, .constant(StyleColor(color)))) + } + + /// Transition property for `vignetteColor` + @_documentation(visibility: public) + @_spi(Experimental) + public func vignetteColorTransition(_ transition: StyleTransition) -> Self { + with(self, setter(\.vignetteColorTransition, transition)) + } + + /// Rain vignette screen-space corners tint color. + /// Default value: "#ffffff". + @_documentation(visibility: public) + @_spi(Experimental) + public func vignetteColor(_ expression: Exp) -> Self { + with(self, setter(\.vignetteColor, .expression(expression))) + } + } @available(iOS 13.0, *) diff --git a/Sources/MapboxMaps/Style/Generated/Snow.swift b/Sources/MapboxMaps/Style/Generated/Snow.swift index 283a4f2dea27..5a7d5ca03f57 100644 --- a/Sources/MapboxMaps/Style/Generated/Snow.swift +++ b/Sources/MapboxMaps/Style/Generated/Snow.swift @@ -35,7 +35,7 @@ public struct Snow: Codable, Equatable, StyleEncodable { @_spi(Experimental) public var colorTransition: StyleTransition? - /// Snow particles density. + /// Snow particles density. Controls the overall particles number. /// Default value: 1. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) @@ -46,7 +46,7 @@ public struct Snow: Codable, Equatable, StyleEncodable { @_spi(Experimental) public var densityTransition: StyleTransition? - /// Main snow particles direction. Heading & pitch + /// Main snow particles direction. Azimuth and polar angles /// Default value: [0,90]. Value range: [0, 360] @_documentation(visibility: public) @_spi(Experimental) @@ -57,7 +57,18 @@ public struct Snow: Codable, Equatable, StyleEncodable { @_spi(Experimental) public var directionTransition: StyleTransition? - /// Snow particles movement factor. + /// Snow flake particle size. Correlates with individual particle screen size + /// Default value: 1. Value range: [0, 5] + @_documentation(visibility: public) + @_spi(Experimental) + public var flakeSize: Value? + + /// Transition options for flake-size + @_documentation(visibility: public) + @_spi(Experimental) + public var flakeSizeTransition: StyleTransition? + + /// Snow particles movement factor. Controls the overall particles movement speed. /// Default value: 1. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) @@ -69,7 +80,7 @@ public struct Snow: Codable, Equatable, StyleEncodable { public var intensityTransition: StyleTransition? /// Snow particles opacity. - /// Default value: 1. Value range: [0, 1] + /// Default value: 0.9. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) public var opacity: Value? @@ -79,8 +90,8 @@ public struct Snow: Codable, Equatable, StyleEncodable { @_spi(Experimental) public var opacityTransition: StyleTransition? - /// Snow vignette screen-space effect. - /// Default value: 0. Value range: [0, 1] + /// Snow vignette screen-space effect. Adds snow tint to screen corners + /// Default value: 0.3. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) public var vignette: Value? @@ -90,6 +101,17 @@ public struct Snow: Codable, Equatable, StyleEncodable { @_spi(Experimental) public var vignetteTransition: StyleTransition? + /// Snow vignette screen-space corners tint color. + /// Default value: "#ffffff". + @_documentation(visibility: public) + @_spi(Experimental) + public var vignetteColor: Value? + + /// Transition options for vignette-color + @_documentation(visibility: public) + @_spi(Experimental) + public var vignetteColorTransition: StyleTransition? + public enum CodingKeys: String, CodingKey { case centerThinning = "center-thinning" case centerThinningTransition = "center-thinning-transition" @@ -99,12 +121,16 @@ public struct Snow: Codable, Equatable, StyleEncodable { case densityTransition = "density-transition" case direction = "direction" case directionTransition = "direction-transition" + case flakeSize = "flake-size" + case flakeSizeTransition = "flake-size-transition" case intensity = "intensity" case intensityTransition = "intensity-transition" case opacity = "opacity" case opacityTransition = "opacity-transition" case vignette = "vignette" case vignetteTransition = "vignette-transition" + case vignetteColor = "vignette-color" + case vignetteColorTransition = "vignette-color-transition" } } @@ -163,7 +189,7 @@ extension Snow { with(self, setter(\.color, .expression(expression))) } - /// Snow particles density. + /// Snow particles density. Controls the overall particles number. /// Default value: 1. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) @@ -178,7 +204,7 @@ extension Snow { with(self, setter(\.densityTransition, transition)) } - /// Snow particles density. + /// Snow particles density. Controls the overall particles number. /// Default value: 1. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) @@ -186,7 +212,7 @@ extension Snow { with(self, setter(\.density, .expression(expression))) } - /// Main snow particles direction. Heading & pitch + /// Main snow particles direction. Azimuth and polar angles /// Default value: [0,90]. Value range: [0, 360] @_documentation(visibility: public) @_spi(Experimental) @@ -201,7 +227,7 @@ extension Snow { with(self, setter(\.directionTransition, transition)) } - /// Main snow particles direction. Heading & pitch + /// Main snow particles direction. Azimuth and polar angles /// Default value: [0,90]. Value range: [0, 360] @_documentation(visibility: public) @_spi(Experimental) @@ -209,7 +235,30 @@ extension Snow { with(self, setter(\.direction, .expression(expression))) } - /// Snow particles movement factor. + /// Snow flake particle size. Correlates with individual particle screen size + /// Default value: 1. Value range: [0, 5] + @_documentation(visibility: public) + @_spi(Experimental) + public func flakeSize(_ constant: Double) -> Self { + with(self, setter(\.flakeSize, .constant(constant))) + } + + /// Transition property for `flakeSize` + @_documentation(visibility: public) + @_spi(Experimental) + public func flakeSizeTransition(_ transition: StyleTransition) -> Self { + with(self, setter(\.flakeSizeTransition, transition)) + } + + /// Snow flake particle size. Correlates with individual particle screen size + /// Default value: 1. Value range: [0, 5] + @_documentation(visibility: public) + @_spi(Experimental) + public func flakeSize(_ expression: Exp) -> Self { + with(self, setter(\.flakeSize, .expression(expression))) + } + + /// Snow particles movement factor. Controls the overall particles movement speed. /// Default value: 1. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) @@ -224,7 +273,7 @@ extension Snow { with(self, setter(\.intensityTransition, transition)) } - /// Snow particles movement factor. + /// Snow particles movement factor. Controls the overall particles movement speed. /// Default value: 1. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) @@ -233,7 +282,7 @@ extension Snow { } /// Snow particles opacity. - /// Default value: 1. Value range: [0, 1] + /// Default value: 0.9. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) public func opacity(_ constant: Double) -> Self { @@ -248,15 +297,15 @@ extension Snow { } /// Snow particles opacity. - /// Default value: 1. Value range: [0, 1] + /// Default value: 0.9. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) public func opacity(_ expression: Exp) -> Self { with(self, setter(\.opacity, .expression(expression))) } - /// Snow vignette screen-space effect. - /// Default value: 0. Value range: [0, 1] + /// Snow vignette screen-space effect. Adds snow tint to screen corners + /// Default value: 0.3. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) public func vignette(_ constant: Double) -> Self { @@ -270,14 +319,45 @@ extension Snow { with(self, setter(\.vignetteTransition, transition)) } - /// Snow vignette screen-space effect. - /// Default value: 0. Value range: [0, 1] + /// Snow vignette screen-space effect. Adds snow tint to screen corners + /// Default value: 0.3. Value range: [0, 1] @_documentation(visibility: public) @_spi(Experimental) public func vignette(_ expression: Exp) -> Self { with(self, setter(\.vignette, .expression(expression))) } + /// Snow vignette screen-space corners tint color. + /// Default value: "#ffffff". + @_documentation(visibility: public) + @_spi(Experimental) + public func vignetteColor(_ constant: StyleColor) -> Self { + with(self, setter(\.vignetteColor, .constant(constant))) + } + + /// Snow vignette screen-space corners tint color. + /// Default value: "#ffffff". + @_documentation(visibility: public) + @_spi(Experimental) + public func vignetteColor(_ color: UIColor) -> Self { + with(self, setter(\.vignetteColor, .constant(StyleColor(color)))) + } + + /// Transition property for `vignetteColor` + @_documentation(visibility: public) + @_spi(Experimental) + public func vignetteColorTransition(_ transition: StyleTransition) -> Self { + with(self, setter(\.vignetteColorTransition, transition)) + } + + /// Snow vignette screen-space corners tint color. + /// Default value: "#ffffff". + @_documentation(visibility: public) + @_spi(Experimental) + public func vignetteColor(_ expression: Exp) -> Self { + with(self, setter(\.vignetteColor, .expression(expression))) + } + } @available(iOS 13.0, *) diff --git a/Sources/MapboxMaps/Style/Generated/Sources/RasterArraySource.swift b/Sources/MapboxMaps/Style/Generated/Sources/RasterArraySource.swift index 1d6d68ca39c7..fef9c43e2d08 100644 --- a/Sources/MapboxMaps/Style/Generated/Sources/RasterArraySource.swift +++ b/Sources/MapboxMaps/Style/Generated/Sources/RasterArraySource.swift @@ -36,7 +36,7 @@ import Foundation public var maxzoom: Double? /// The minimum visual size to display tiles for this layer. Only configurable for raster layers. - /// Default value: 512. + /// Default value: 512. The unit of tileSize is in pixels. @_documentation(visibility: public) public private(set) var tileSize: Double? diff --git a/Sources/MapboxMaps/Style/Generated/Sources/RasterDemSource.swift b/Sources/MapboxMaps/Style/Generated/Sources/RasterDemSource.swift index bd47d678d843..bc51a13cad93 100644 --- a/Sources/MapboxMaps/Style/Generated/Sources/RasterDemSource.swift +++ b/Sources/MapboxMaps/Style/Generated/Sources/RasterDemSource.swift @@ -28,7 +28,7 @@ public struct RasterDemSource: Source { public var maxzoom: Double? /// The minimum visual size to display tiles for this layer. Only configurable for raster layers. - /// Default value: 512. + /// Default value: 512. The unit of tileSize is in pixels. public var tileSize: Double? /// Contains an attribution to be displayed when the map is shown to a user. diff --git a/Sources/MapboxMaps/Style/Generated/Sources/RasterSource.swift b/Sources/MapboxMaps/Style/Generated/Sources/RasterSource.swift index 21d456a32eb1..bea3eb4723da 100644 --- a/Sources/MapboxMaps/Style/Generated/Sources/RasterSource.swift +++ b/Sources/MapboxMaps/Style/Generated/Sources/RasterSource.swift @@ -28,7 +28,7 @@ public struct RasterSource: Source { public var maxzoom: Double? /// The minimum visual size to display tiles for this layer. Only configurable for raster layers. - /// Default value: 512. + /// Default value: 512. The unit of tileSize is in pixels. public var tileSize: Double? /// Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed. diff --git a/Tests/MapboxMapsTests/Style/Fixtures/Value+Fixtures.swift b/Tests/MapboxMapsTests/Style/Fixtures/Value+Fixtures.swift index ba803ef0d75c..609afdddde0e 100644 --- a/Tests/MapboxMapsTests/Style/Fixtures/Value+Fixtures.swift +++ b/Tests/MapboxMapsTests/Style/Fixtures/Value+Fixtures.swift @@ -1,5 +1,5 @@ import UIKit -@testable import MapboxMaps +@_spi(Experimental) @testable import MapboxMaps internal extension Value where T == Double { static func testConstantValue() -> Value { diff --git a/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/Layers/BackgroundLayerIntegrationTests.swift b/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/Layers/BackgroundLayerIntegrationTests.swift index e8c8d2c17982..2093c738fb96 100644 --- a/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/Layers/BackgroundLayerIntegrationTests.swift +++ b/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/Layers/BackgroundLayerIntegrationTests.swift @@ -1,6 +1,6 @@ // This file is generated import XCTest -@testable import MapboxMaps +@_spi(Experimental) @testable import MapboxMaps final class BackgroundLayerIntegrationTests: MapViewIntegrationTestCase { diff --git a/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/Layers/FillLayerIntegrationTests.swift b/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/Layers/FillLayerIntegrationTests.swift index 975d5873d9cd..8d1d27a5cdf9 100644 --- a/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/Layers/FillLayerIntegrationTests.swift +++ b/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/Layers/FillLayerIntegrationTests.swift @@ -23,6 +23,7 @@ final class FillLayerIntegrationTests: MapViewIntegrationTestCase { layer.minZoom = 10.0 layer.maxZoom = 20.0 layer.visibility = .constant(.visible) + layer.fillElevationReference = Value.testConstantValue() layer.fillSortKey = Value.testConstantValue() layer.fillAntialias = Value.testConstantValue() layer.fillColor = Value.testConstantValue() diff --git a/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/Layers/LineLayerIntegrationTests.swift b/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/Layers/LineLayerIntegrationTests.swift index 9b2ac66a18b9..6f8159a34a76 100644 --- a/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/Layers/LineLayerIntegrationTests.swift +++ b/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/Layers/LineLayerIntegrationTests.swift @@ -24,10 +24,13 @@ final class LineLayerIntegrationTests: MapViewIntegrationTestCase { layer.maxZoom = 20.0 layer.visibility = .constant(.visible) layer.lineCap = Value.testConstantValue() + layer.lineCrossSlope = Value.testConstantValue() + layer.lineElevationReference = Value.testConstantValue() layer.lineJoin = Value.testConstantValue() layer.lineMiterLimit = Value.testConstantValue() layer.lineRoundLimit = Value.testConstantValue() layer.lineSortKey = Value.testConstantValue() + layer.lineWidthUnit = Value.testConstantValue() layer.lineZOffset = Value.testConstantValue() layer.lineBlur = Value.testConstantValue() layer.lineBlurTransition = StyleTransition(duration: 10.0, delay: 10.0) diff --git a/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/RainIntegrationTests.swift b/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/RainIntegrationTests.swift index 5404abc2c0d9..a5c7afe3146e 100644 --- a/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/RainIntegrationTests.swift +++ b/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/RainIntegrationTests.swift @@ -27,12 +27,18 @@ final class RainIntegrationTests: MapViewIntegrationTestCase { .densityTransition(.testConstantValue()) .direction(azimuthal: 0, polar: 1) .directionTransition(.testConstantValue()) + .distortionStrength(Double.testConstantValue()) + .distortionStrengthTransition(.testConstantValue()) + .dropletSize(normalToDirection: 0, alongDirection: 1) + .dropletSizeTransition(.testConstantValue()) .intensity(Double.testConstantValue()) .intensityTransition(.testConstantValue()) .opacity(Double.testConstantValue()) .opacityTransition(.testConstantValue()) .vignette(Double.testConstantValue()) .vignetteTransition(.testConstantValue()) + .vignetteColor(StyleColor.testConstantValue()) + .vignetteColorTransition(.testConstantValue()) // Add the Rain do { diff --git a/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/SnowIntegrationTests.swift b/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/SnowIntegrationTests.swift index 410117d38f4d..b731940cf41b 100644 --- a/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/SnowIntegrationTests.swift +++ b/Tests/MapboxMapsTests/Style/Generated/IntegrationTests/SnowIntegrationTests.swift @@ -27,12 +27,16 @@ final class SnowIntegrationTests: MapViewIntegrationTestCase { .densityTransition(.testConstantValue()) .direction(azimuthal: 0, polar: 1) .directionTransition(.testConstantValue()) + .flakeSize(Double.testConstantValue()) + .flakeSizeTransition(.testConstantValue()) .intensity(Double.testConstantValue()) .intensityTransition(.testConstantValue()) .opacity(Double.testConstantValue()) .opacityTransition(.testConstantValue()) .vignette(Double.testConstantValue()) .vignetteTransition(.testConstantValue()) + .vignetteColor(StyleColor.testConstantValue()) + .vignetteColorTransition(.testConstantValue()) // Add the Snow do { diff --git a/Tests/MapboxMapsTests/Style/Generated/Layers/FillLayerTests.swift b/Tests/MapboxMapsTests/Style/Generated/Layers/FillLayerTests.swift index 1d7296f73d3b..aa12b525d36b 100644 --- a/Tests/MapboxMapsTests/Style/Generated/Layers/FillLayerTests.swift +++ b/Tests/MapboxMapsTests/Style/Generated/Layers/FillLayerTests.swift @@ -52,6 +52,7 @@ final class FillLayerTests: XCTestCase { func testEncodingAndDecodingOfLayoutProperties() { var layer = FillLayer(id: "test-id", source: "source") layer.visibility = .constant(.visible) + layer.fillElevationReference = Value.testConstantValue() layer.fillSortKey = Value.testConstantValue() var data: Data? @@ -69,6 +70,7 @@ final class FillLayerTests: XCTestCase { do { let decodedLayer = try JSONDecoder().decode(FillLayer.self, from: validData) XCTAssert(decodedLayer.visibility == .constant(.visible)) + XCTAssertEqual(layer.fillElevationReference, Value.testConstantValue()) XCTAssertEqual(layer.fillSortKey, Value.testConstantValue()) } catch { XCTFail("Failed to decode FillLayer") @@ -130,6 +132,7 @@ final class FillLayerTests: XCTestCase { .slot(Slot.testConstantValue()) .minZoom(Double.testConstantValue()) .maxZoom(Double.testConstantValue()) + .fillElevationReference(FillElevationReference.testConstantValue()) .fillSortKey(Double.testConstantValue()) .fillAntialias(Bool.testConstantValue()) .fillColor(StyleColor.testConstantValue()) @@ -147,6 +150,7 @@ final class FillLayerTests: XCTestCase { XCTAssertEqual(layer.slot, Slot.testConstantValue()) XCTAssertEqual(layer.minZoom, Double.testConstantValue()) XCTAssertEqual(layer.maxZoom, Double.testConstantValue()) + XCTAssertEqual(layer.fillElevationReference, Value.constant(FillElevationReference.testConstantValue())) XCTAssertEqual(layer.fillSortKey, Value.constant(Double.testConstantValue())) XCTAssertEqual(layer.fillAntialias, Value.constant(Bool.testConstantValue())) XCTAssertEqual(layer.fillColor, Value.constant(StyleColor.testConstantValue())) diff --git a/Tests/MapboxMapsTests/Style/Generated/Layers/LineLayerTests.swift b/Tests/MapboxMapsTests/Style/Generated/Layers/LineLayerTests.swift index b5e342fca1a1..3ab41d340afa 100644 --- a/Tests/MapboxMapsTests/Style/Generated/Layers/LineLayerTests.swift +++ b/Tests/MapboxMapsTests/Style/Generated/Layers/LineLayerTests.swift @@ -53,10 +53,13 @@ final class LineLayerTests: XCTestCase { var layer = LineLayer(id: "test-id", source: "source") layer.visibility = .constant(.visible) layer.lineCap = Value.testConstantValue() + layer.lineCrossSlope = Value.testConstantValue() + layer.lineElevationReference = Value.testConstantValue() layer.lineJoin = Value.testConstantValue() layer.lineMiterLimit = Value.testConstantValue() layer.lineRoundLimit = Value.testConstantValue() layer.lineSortKey = Value.testConstantValue() + layer.lineWidthUnit = Value.testConstantValue() layer.lineZOffset = Value.testConstantValue() var data: Data? @@ -75,10 +78,13 @@ final class LineLayerTests: XCTestCase { let decodedLayer = try JSONDecoder().decode(LineLayer.self, from: validData) XCTAssert(decodedLayer.visibility == .constant(.visible)) XCTAssertEqual(layer.lineCap, Value.testConstantValue()) + XCTAssertEqual(layer.lineCrossSlope, Value.testConstantValue()) + XCTAssertEqual(layer.lineElevationReference, Value.testConstantValue()) XCTAssertEqual(layer.lineJoin, Value.testConstantValue()) XCTAssertEqual(layer.lineMiterLimit, Value.testConstantValue()) XCTAssertEqual(layer.lineRoundLimit, Value.testConstantValue()) XCTAssertEqual(layer.lineSortKey, Value.testConstantValue()) + XCTAssertEqual(layer.lineWidthUnit, Value.testConstantValue()) XCTAssertEqual(layer.lineZOffset, Value.testConstantValue()) } catch { XCTFail("Failed to decode LineLayer") @@ -168,10 +174,13 @@ final class LineLayerTests: XCTestCase { .minZoom(Double.testConstantValue()) .maxZoom(Double.testConstantValue()) .lineCap(LineCap.testConstantValue()) + .lineCrossSlope(Double.testConstantValue()) + .lineElevationReference(LineElevationReference.testConstantValue()) .lineJoin(LineJoin.testConstantValue()) .lineMiterLimit(Double.testConstantValue()) .lineRoundLimit(Double.testConstantValue()) .lineSortKey(Double.testConstantValue()) + .lineWidthUnit(LineWidthUnit.testConstantValue()) .lineZOffset(Double.testConstantValue()) .lineBlur(Double.testConstantValue()) .lineBorderColor(StyleColor.testConstantValue()) @@ -200,10 +209,13 @@ final class LineLayerTests: XCTestCase { XCTAssertEqual(layer.minZoom, Double.testConstantValue()) XCTAssertEqual(layer.maxZoom, Double.testConstantValue()) XCTAssertEqual(layer.lineCap, Value.constant(LineCap.testConstantValue())) + XCTAssertEqual(layer.lineCrossSlope, Value.constant(Double.testConstantValue())) + XCTAssertEqual(layer.lineElevationReference, Value.constant(LineElevationReference.testConstantValue())) XCTAssertEqual(layer.lineJoin, Value.constant(LineJoin.testConstantValue())) XCTAssertEqual(layer.lineMiterLimit, Value.constant(Double.testConstantValue())) XCTAssertEqual(layer.lineRoundLimit, Value.constant(Double.testConstantValue())) XCTAssertEqual(layer.lineSortKey, Value.constant(Double.testConstantValue())) + XCTAssertEqual(layer.lineWidthUnit, Value.constant(LineWidthUnit.testConstantValue())) XCTAssertEqual(layer.lineZOffset, Value.constant(Double.testConstantValue())) XCTAssertEqual(layer.lineBlur, Value.constant(Double.testConstantValue())) XCTAssertEqual(layer.lineBorderColor, Value.constant(StyleColor.testConstantValue())) diff --git a/Tests/MapboxMapsTests/Style/Generated/Layers/SymbolLayerTests.swift b/Tests/MapboxMapsTests/Style/Generated/Layers/SymbolLayerTests.swift index b0a3d60291e4..622c24eec978 100644 --- a/Tests/MapboxMapsTests/Style/Generated/Layers/SymbolLayerTests.swift +++ b/Tests/MapboxMapsTests/Style/Generated/Layers/SymbolLayerTests.swift @@ -64,6 +64,7 @@ final class SymbolLayerTests: XCTestCase { layer.iconRotate = Value.testConstantValue() layer.iconRotationAlignment = Value.testConstantValue() layer.iconSize = Value.testConstantValue() + layer.iconSizeScaleRange = Value<[Double]>.testConstantValue() layer.iconTextFit = Value.testConstantValue() layer.iconTextFitPadding = Value<[Double]>.testConstantValue() layer.symbolAvoidEdges = Value.testConstantValue() @@ -92,6 +93,7 @@ final class SymbolLayerTests: XCTestCase { layer.textRotate = Value.testConstantValue() layer.textRotationAlignment = Value.testConstantValue() layer.textSize = Value.testConstantValue() + layer.textSizeScaleRange = Value<[Double]>.testConstantValue() layer.textTransform = Value.testConstantValue() layer.textVariableAnchor = Value<[TextAnchor]>.testConstantValue() layer.textWritingMode = Value<[TextWritingMode]>.testConstantValue() @@ -123,6 +125,7 @@ final class SymbolLayerTests: XCTestCase { XCTAssertEqual(layer.iconRotate, Value.testConstantValue()) XCTAssertEqual(layer.iconRotationAlignment, Value.testConstantValue()) XCTAssertEqual(layer.iconSize, Value.testConstantValue()) + XCTAssertEqual(layer.iconSizeScaleRange, Value<[Double]>.testConstantValue()) XCTAssertEqual(layer.iconTextFit, Value.testConstantValue()) XCTAssertEqual(layer.iconTextFitPadding, Value<[Double]>.testConstantValue()) XCTAssertEqual(layer.symbolAvoidEdges, Value.testConstantValue()) @@ -151,6 +154,7 @@ final class SymbolLayerTests: XCTestCase { XCTAssertEqual(layer.textRotate, Value.testConstantValue()) XCTAssertEqual(layer.textRotationAlignment, Value.testConstantValue()) XCTAssertEqual(layer.textSize, Value.testConstantValue()) + XCTAssertEqual(layer.textSizeScaleRange, Value<[Double]>.testConstantValue()) XCTAssertEqual(layer.textTransform, Value.testConstantValue()) XCTAssertEqual(layer.textVariableAnchor, Value<[TextAnchor]>.testConstantValue()) XCTAssertEqual(layer.textWritingMode, Value<[TextWritingMode]>.testConstantValue()) @@ -263,6 +267,7 @@ final class SymbolLayerTests: XCTestCase { .iconRotate(Double.testConstantValue()) .iconRotationAlignment(IconRotationAlignment.testConstantValue()) .iconSize(Double.testConstantValue()) + .iconSizeScaleRange(min: 0, max: 1) .iconTextFit(IconTextFit.testConstantValue()) .iconTextFitPadding(UIEdgeInsets(top: 1, left: 2, bottom: 3, right: 4)) .symbolAvoidEdges(Bool.testConstantValue()) @@ -291,6 +296,7 @@ final class SymbolLayerTests: XCTestCase { .textRotate(Double.testConstantValue()) .textRotationAlignment(TextRotationAlignment.testConstantValue()) .textSize(Double.testConstantValue()) + .textSizeScaleRange(min: 0, max: 1) .textTransform(TextTransform.testConstantValue()) .textVariableAnchor([TextAnchor].testConstantValue()) .textWritingMode([TextWritingMode].testConstantValue()) @@ -334,6 +340,7 @@ final class SymbolLayerTests: XCTestCase { XCTAssertEqual(layer.iconRotate, Value.constant(Double.testConstantValue())) XCTAssertEqual(layer.iconRotationAlignment, Value.constant(IconRotationAlignment.testConstantValue())) XCTAssertEqual(layer.iconSize, Value.constant(Double.testConstantValue())) + XCTAssertEqual(layer.iconSizeScaleRange, Value.constant([0, 1])) XCTAssertEqual(layer.iconTextFit, Value.constant(IconTextFit.testConstantValue())) XCTAssertEqual(layer.iconTextFitPadding, Value.constant([1, 4, 3, 2])) XCTAssertEqual(layer.symbolAvoidEdges, Value.constant(Bool.testConstantValue())) @@ -362,6 +369,7 @@ final class SymbolLayerTests: XCTestCase { XCTAssertEqual(layer.textRotate, Value.constant(Double.testConstantValue())) XCTAssertEqual(layer.textRotationAlignment, Value.constant(TextRotationAlignment.testConstantValue())) XCTAssertEqual(layer.textSize, Value.constant(Double.testConstantValue())) + XCTAssertEqual(layer.textSizeScaleRange, Value.constant([0, 1])) XCTAssertEqual(layer.textTransform, Value.constant(TextTransform.testConstantValue())) XCTAssertEqual(layer.textVariableAnchor, Value.constant([TextAnchor].testConstantValue())) XCTAssertEqual(layer.textWritingMode, Value.constant([TextWritingMode].testConstantValue())) diff --git a/Tests/MapboxMapsTests/Style/Generated/Light/DirectionalLightTests.swift b/Tests/MapboxMapsTests/Style/Generated/Light/DirectionalLightTests.swift index 2a8bab952491..425ea1e0ce0a 100644 --- a/Tests/MapboxMapsTests/Style/Generated/Light/DirectionalLightTests.swift +++ b/Tests/MapboxMapsTests/Style/Generated/Light/DirectionalLightTests.swift @@ -1,6 +1,6 @@ // This file is generated import XCTest -@testable import MapboxMaps +@_spi(Experimental) @testable import MapboxMaps final class DirectionalLightTests: XCTestCase { @@ -16,6 +16,7 @@ final class DirectionalLightTests: XCTestCase { light.intensityTransition = StyleTransition(duration: 10.0, delay: 10.0) light.shadowIntensity = Value.testConstantValue() light.shadowIntensityTransition = StyleTransition(duration: 10.0, delay: 10.0) + light.shadowQuality = Value.testConstantValue() let data = try JSONEncoder().encode(light) XCTAssertFalse(data.isEmpty) @@ -36,6 +37,7 @@ final class DirectionalLightTests: XCTestCase { XCTAssertEqual(decodedLight.shadowIntensity, Value.testConstantValue()) XCTAssertEqual(decodedLight.shadowIntensityTransition?.duration, 10) XCTAssertEqual(decodedLight.shadowIntensityTransition?.delay, 10) + XCTAssertEqual(decodedLight.shadowQuality, Value.testConstantValue()) } } diff --git a/Tests/MapboxMapsTests/Style/Generated/Properties/PropertiesTests.swift b/Tests/MapboxMapsTests/Style/Generated/Properties/PropertiesTests.swift index 50e71575170e..43460fd9f2bc 100644 --- a/Tests/MapboxMapsTests/Style/Generated/Properties/PropertiesTests.swift +++ b/Tests/MapboxMapsTests/Style/Generated/Properties/PropertiesTests.swift @@ -1,7 +1,7 @@ // This file is generated. // swiftlint:disable file_length import Foundation -@testable import MapboxMaps +@_spi(Experimental) @testable import MapboxMaps extension Value where T == Visibility { static func testConstantValue() -> Value { @@ -15,6 +15,25 @@ extension Visibility { } } +// MARK: FILL_ELEVATION_REFERENCE + +extension Value where T == FillElevationReference { + static func testConstantValue() -> Value { + return .constant(FillElevationReference.testConstantValue()) + } +} + +extension FillElevationReference { + static func testConstantValue() -> FillElevationReference { + return .none + } + + static func random() -> FillElevationReference { + let allCases: [FillElevationReference] = [.none, .hdRoadBase, .hdRoadMarkup] + return allCases.randomElement()! + } +} + // MARK: LINE_CAP extension Value where T == LineCap { @@ -34,6 +53,25 @@ extension LineCap { } } +// MARK: LINE_ELEVATION_REFERENCE + +extension Value where T == LineElevationReference { + static func testConstantValue() -> Value { + return .constant(LineElevationReference.testConstantValue()) + } +} + +extension LineElevationReference { + static func testConstantValue() -> LineElevationReference { + return .none + } + + static func random() -> LineElevationReference { + let allCases: [LineElevationReference] = [.none, .sea, .ground, .hdRoadMarkup] + return allCases.randomElement()! + } +} + // MARK: LINE_JOIN extension Value where T == LineJoin { @@ -53,6 +91,25 @@ extension LineJoin { } } +// MARK: LINE_WIDTH_UNIT + +extension Value where T == LineWidthUnit { + static func testConstantValue() -> Value { + return .constant(LineWidthUnit.testConstantValue()) + } +} + +extension LineWidthUnit { + static func testConstantValue() -> LineWidthUnit { + return .pixels + } + + static func random() -> LineWidthUnit { + let allCases: [LineWidthUnit] = [.pixels, .meters] + return allCases.randomElement()! + } +} + // MARK: ICON_ANCHOR extension Value where T == IconAnchor { @@ -143,7 +200,7 @@ extension SymbolElevationReference { } static func random() -> SymbolElevationReference { - let allCases: [SymbolElevationReference] = [.sea, .ground] + let allCases: [SymbolElevationReference] = [.sea, .ground, .hdRoadMarkup] return allCases.randomElement()! } } diff --git a/Tests/MapboxMapsTests/Style/Generated/RainTests.swift b/Tests/MapboxMapsTests/Style/Generated/RainTests.swift index baee52437356..40d816048925 100644 --- a/Tests/MapboxMapsTests/Style/Generated/RainTests.swift +++ b/Tests/MapboxMapsTests/Style/Generated/RainTests.swift @@ -14,12 +14,18 @@ final class RainTests: XCTestCase { instance.densityTransition = .testConstantValue() instance.direction = .testConstantValue() instance.directionTransition = .testConstantValue() + instance.distortionStrength = .testConstantValue() + instance.distortionStrengthTransition = .testConstantValue() + instance.dropletSize = .testConstantValue() + instance.dropletSizeTransition = .testConstantValue() instance.intensity = .testConstantValue() instance.intensityTransition = .testConstantValue() instance.opacity = .testConstantValue() instance.opacityTransition = .testConstantValue() instance.vignette = .testConstantValue() instance.vignetteTransition = .testConstantValue() + instance.vignetteColor = .testConstantValue() + instance.vignetteColorTransition = .testConstantValue() XCTAssertEqual(instance.centerThinning, .testConstantValue()) XCTAssertEqual(instance.centerThinningTransition, .testConstantValue()) @@ -29,12 +35,18 @@ final class RainTests: XCTestCase { XCTAssertEqual(instance.densityTransition, .testConstantValue()) XCTAssertEqual(instance.direction, .testConstantValue()) XCTAssertEqual(instance.directionTransition, .testConstantValue()) + XCTAssertEqual(instance.distortionStrength, .testConstantValue()) + XCTAssertEqual(instance.distortionStrengthTransition, .testConstantValue()) + XCTAssertEqual(instance.dropletSize, .testConstantValue()) + XCTAssertEqual(instance.dropletSizeTransition, .testConstantValue()) XCTAssertEqual(instance.intensity, .testConstantValue()) XCTAssertEqual(instance.intensityTransition, .testConstantValue()) XCTAssertEqual(instance.opacity, .testConstantValue()) XCTAssertEqual(instance.opacityTransition, .testConstantValue()) XCTAssertEqual(instance.vignette, .testConstantValue()) XCTAssertEqual(instance.vignetteTransition, .testConstantValue()) + XCTAssertEqual(instance.vignetteColor, .testConstantValue()) + XCTAssertEqual(instance.vignetteColorTransition, .testConstantValue()) } func testRainSetters() { @@ -47,12 +59,18 @@ final class RainTests: XCTestCase { .densityTransition(.testConstantValue()) .direction(azimuthal: 0, polar: 1) .directionTransition(.testConstantValue()) + .distortionStrength(Double.testConstantValue()) + .distortionStrengthTransition(.testConstantValue()) + .dropletSize(normalToDirection: 0, alongDirection: 1) + .dropletSizeTransition(.testConstantValue()) .intensity(Double.testConstantValue()) .intensityTransition(.testConstantValue()) .opacity(Double.testConstantValue()) .opacityTransition(.testConstantValue()) .vignette(Double.testConstantValue()) .vignetteTransition(.testConstantValue()) + .vignetteColor(StyleColor.testConstantValue()) + .vignetteColorTransition(.testConstantValue()) XCTAssertEqual(instance.centerThinning, Value.constant(Double.testConstantValue())) XCTAssertEqual(instance.centerThinningTransition, .testConstantValue()) @@ -62,12 +80,18 @@ final class RainTests: XCTestCase { XCTAssertEqual(instance.densityTransition, .testConstantValue()) XCTAssertEqual(instance.direction, Value.constant([0, 1])) XCTAssertEqual(instance.directionTransition, .testConstantValue()) + XCTAssertEqual(instance.distortionStrength, Value.constant(Double.testConstantValue())) + XCTAssertEqual(instance.distortionStrengthTransition, .testConstantValue()) + XCTAssertEqual(instance.dropletSize, Value.constant([0, 1])) + XCTAssertEqual(instance.dropletSizeTransition, .testConstantValue()) XCTAssertEqual(instance.intensity, Value.constant(Double.testConstantValue())) XCTAssertEqual(instance.intensityTransition, .testConstantValue()) XCTAssertEqual(instance.opacity, Value.constant(Double.testConstantValue())) XCTAssertEqual(instance.opacityTransition, .testConstantValue()) XCTAssertEqual(instance.vignette, Value.constant(Double.testConstantValue())) XCTAssertEqual(instance.vignetteTransition, .testConstantValue()) + XCTAssertEqual(instance.vignetteColor, Value.constant(StyleColor.testConstantValue())) + XCTAssertEqual(instance.vignetteColorTransition, .testConstantValue()) } func testRainPropertySerialization() throws { @@ -80,12 +104,18 @@ final class RainTests: XCTestCase { instance.densityTransition = .testConstantValue() instance.direction = .testConstantValue() instance.directionTransition = .testConstantValue() + instance.distortionStrength = .testConstantValue() + instance.distortionStrengthTransition = .testConstantValue() + instance.dropletSize = .testConstantValue() + instance.dropletSizeTransition = .testConstantValue() instance.intensity = .testConstantValue() instance.intensityTransition = .testConstantValue() instance.opacity = .testConstantValue() instance.opacityTransition = .testConstantValue() instance.vignette = .testConstantValue() instance.vignetteTransition = .testConstantValue() + instance.vignetteColor = .testConstantValue() + instance.vignetteColorTransition = .testConstantValue() let data = try JSONEncoder().encode(instance) let decodedInstance = try JSONDecoder().decode(Rain.self, from: data) @@ -98,12 +128,18 @@ final class RainTests: XCTestCase { XCTAssertEqual(decodedInstance.densityTransition, .testConstantValue()) XCTAssertEqual(decodedInstance.direction, .testConstantValue()) XCTAssertEqual(decodedInstance.directionTransition, .testConstantValue()) + XCTAssertEqual(decodedInstance.distortionStrength, .testConstantValue()) + XCTAssertEqual(decodedInstance.distortionStrengthTransition, .testConstantValue()) + XCTAssertEqual(decodedInstance.dropletSize, .testConstantValue()) + XCTAssertEqual(decodedInstance.dropletSizeTransition, .testConstantValue()) XCTAssertEqual(decodedInstance.intensity, .testConstantValue()) XCTAssertEqual(decodedInstance.intensityTransition, .testConstantValue()) XCTAssertEqual(decodedInstance.opacity, .testConstantValue()) XCTAssertEqual(decodedInstance.opacityTransition, .testConstantValue()) XCTAssertEqual(decodedInstance.vignette, .testConstantValue()) XCTAssertEqual(decodedInstance.vignetteTransition, .testConstantValue()) + XCTAssertEqual(decodedInstance.vignetteColor, .testConstantValue()) + XCTAssertEqual(decodedInstance.vignetteColorTransition, .testConstantValue()) } func testRainSettersSerialization() throws { @@ -116,12 +152,18 @@ final class RainTests: XCTestCase { .densityTransition(.testConstantValue()) .direction(azimuthal: 0, polar: 1) .directionTransition(.testConstantValue()) + .distortionStrength(Double.testConstantValue()) + .distortionStrengthTransition(.testConstantValue()) + .dropletSize(normalToDirection: 0, alongDirection: 1) + .dropletSizeTransition(.testConstantValue()) .intensity(Double.testConstantValue()) .intensityTransition(.testConstantValue()) .opacity(Double.testConstantValue()) .opacityTransition(.testConstantValue()) .vignette(Double.testConstantValue()) .vignetteTransition(.testConstantValue()) + .vignetteColor(StyleColor.testConstantValue()) + .vignetteColorTransition(.testConstantValue()) let data = try JSONEncoder().encode(instance) let decodedInstance = try JSONDecoder().decode(Rain.self, from: data) @@ -134,12 +176,18 @@ final class RainTests: XCTestCase { XCTAssertEqual(decodedInstance.densityTransition, .testConstantValue()) XCTAssertEqual(decodedInstance.direction, Value.constant([0, 1])) XCTAssertEqual(decodedInstance.directionTransition, .testConstantValue()) + XCTAssertEqual(decodedInstance.distortionStrength, Value.constant(Double.testConstantValue())) + XCTAssertEqual(decodedInstance.distortionStrengthTransition, .testConstantValue()) + XCTAssertEqual(decodedInstance.dropletSize, Value.constant([0, 1])) + XCTAssertEqual(decodedInstance.dropletSizeTransition, .testConstantValue()) XCTAssertEqual(decodedInstance.intensity, Value.constant(Double.testConstantValue())) XCTAssertEqual(decodedInstance.intensityTransition, .testConstantValue()) XCTAssertEqual(decodedInstance.opacity, Value.constant(Double.testConstantValue())) XCTAssertEqual(decodedInstance.opacityTransition, .testConstantValue()) XCTAssertEqual(decodedInstance.vignette, Value.constant(Double.testConstantValue())) XCTAssertEqual(decodedInstance.vignetteTransition, .testConstantValue()) + XCTAssertEqual(decodedInstance.vignetteColor, Value.constant(StyleColor.testConstantValue())) + XCTAssertEqual(decodedInstance.vignetteColorTransition, .testConstantValue()) } } diff --git a/Tests/MapboxMapsTests/Style/Generated/SnowTests.swift b/Tests/MapboxMapsTests/Style/Generated/SnowTests.swift index 78cd45b176c2..b02ed47d364c 100644 --- a/Tests/MapboxMapsTests/Style/Generated/SnowTests.swift +++ b/Tests/MapboxMapsTests/Style/Generated/SnowTests.swift @@ -14,12 +14,16 @@ final class SnowTests: XCTestCase { instance.densityTransition = .testConstantValue() instance.direction = .testConstantValue() instance.directionTransition = .testConstantValue() + instance.flakeSize = .testConstantValue() + instance.flakeSizeTransition = .testConstantValue() instance.intensity = .testConstantValue() instance.intensityTransition = .testConstantValue() instance.opacity = .testConstantValue() instance.opacityTransition = .testConstantValue() instance.vignette = .testConstantValue() instance.vignetteTransition = .testConstantValue() + instance.vignetteColor = .testConstantValue() + instance.vignetteColorTransition = .testConstantValue() XCTAssertEqual(instance.centerThinning, .testConstantValue()) XCTAssertEqual(instance.centerThinningTransition, .testConstantValue()) @@ -29,12 +33,16 @@ final class SnowTests: XCTestCase { XCTAssertEqual(instance.densityTransition, .testConstantValue()) XCTAssertEqual(instance.direction, .testConstantValue()) XCTAssertEqual(instance.directionTransition, .testConstantValue()) + XCTAssertEqual(instance.flakeSize, .testConstantValue()) + XCTAssertEqual(instance.flakeSizeTransition, .testConstantValue()) XCTAssertEqual(instance.intensity, .testConstantValue()) XCTAssertEqual(instance.intensityTransition, .testConstantValue()) XCTAssertEqual(instance.opacity, .testConstantValue()) XCTAssertEqual(instance.opacityTransition, .testConstantValue()) XCTAssertEqual(instance.vignette, .testConstantValue()) XCTAssertEqual(instance.vignetteTransition, .testConstantValue()) + XCTAssertEqual(instance.vignetteColor, .testConstantValue()) + XCTAssertEqual(instance.vignetteColorTransition, .testConstantValue()) } func testSnowSetters() { @@ -47,12 +55,16 @@ final class SnowTests: XCTestCase { .densityTransition(.testConstantValue()) .direction(azimuthal: 0, polar: 1) .directionTransition(.testConstantValue()) + .flakeSize(Double.testConstantValue()) + .flakeSizeTransition(.testConstantValue()) .intensity(Double.testConstantValue()) .intensityTransition(.testConstantValue()) .opacity(Double.testConstantValue()) .opacityTransition(.testConstantValue()) .vignette(Double.testConstantValue()) .vignetteTransition(.testConstantValue()) + .vignetteColor(StyleColor.testConstantValue()) + .vignetteColorTransition(.testConstantValue()) XCTAssertEqual(instance.centerThinning, Value.constant(Double.testConstantValue())) XCTAssertEqual(instance.centerThinningTransition, .testConstantValue()) @@ -62,12 +74,16 @@ final class SnowTests: XCTestCase { XCTAssertEqual(instance.densityTransition, .testConstantValue()) XCTAssertEqual(instance.direction, Value.constant([0, 1])) XCTAssertEqual(instance.directionTransition, .testConstantValue()) + XCTAssertEqual(instance.flakeSize, Value.constant(Double.testConstantValue())) + XCTAssertEqual(instance.flakeSizeTransition, .testConstantValue()) XCTAssertEqual(instance.intensity, Value.constant(Double.testConstantValue())) XCTAssertEqual(instance.intensityTransition, .testConstantValue()) XCTAssertEqual(instance.opacity, Value.constant(Double.testConstantValue())) XCTAssertEqual(instance.opacityTransition, .testConstantValue()) XCTAssertEqual(instance.vignette, Value.constant(Double.testConstantValue())) XCTAssertEqual(instance.vignetteTransition, .testConstantValue()) + XCTAssertEqual(instance.vignetteColor, Value.constant(StyleColor.testConstantValue())) + XCTAssertEqual(instance.vignetteColorTransition, .testConstantValue()) } func testSnowPropertySerialization() throws { @@ -80,12 +96,16 @@ final class SnowTests: XCTestCase { instance.densityTransition = .testConstantValue() instance.direction = .testConstantValue() instance.directionTransition = .testConstantValue() + instance.flakeSize = .testConstantValue() + instance.flakeSizeTransition = .testConstantValue() instance.intensity = .testConstantValue() instance.intensityTransition = .testConstantValue() instance.opacity = .testConstantValue() instance.opacityTransition = .testConstantValue() instance.vignette = .testConstantValue() instance.vignetteTransition = .testConstantValue() + instance.vignetteColor = .testConstantValue() + instance.vignetteColorTransition = .testConstantValue() let data = try JSONEncoder().encode(instance) let decodedInstance = try JSONDecoder().decode(Snow.self, from: data) @@ -98,12 +118,16 @@ final class SnowTests: XCTestCase { XCTAssertEqual(decodedInstance.densityTransition, .testConstantValue()) XCTAssertEqual(decodedInstance.direction, .testConstantValue()) XCTAssertEqual(decodedInstance.directionTransition, .testConstantValue()) + XCTAssertEqual(decodedInstance.flakeSize, .testConstantValue()) + XCTAssertEqual(decodedInstance.flakeSizeTransition, .testConstantValue()) XCTAssertEqual(decodedInstance.intensity, .testConstantValue()) XCTAssertEqual(decodedInstance.intensityTransition, .testConstantValue()) XCTAssertEqual(decodedInstance.opacity, .testConstantValue()) XCTAssertEqual(decodedInstance.opacityTransition, .testConstantValue()) XCTAssertEqual(decodedInstance.vignette, .testConstantValue()) XCTAssertEqual(decodedInstance.vignetteTransition, .testConstantValue()) + XCTAssertEqual(decodedInstance.vignetteColor, .testConstantValue()) + XCTAssertEqual(decodedInstance.vignetteColorTransition, .testConstantValue()) } func testSnowSettersSerialization() throws { @@ -116,12 +140,16 @@ final class SnowTests: XCTestCase { .densityTransition(.testConstantValue()) .direction(azimuthal: 0, polar: 1) .directionTransition(.testConstantValue()) + .flakeSize(Double.testConstantValue()) + .flakeSizeTransition(.testConstantValue()) .intensity(Double.testConstantValue()) .intensityTransition(.testConstantValue()) .opacity(Double.testConstantValue()) .opacityTransition(.testConstantValue()) .vignette(Double.testConstantValue()) .vignetteTransition(.testConstantValue()) + .vignetteColor(StyleColor.testConstantValue()) + .vignetteColorTransition(.testConstantValue()) let data = try JSONEncoder().encode(instance) let decodedInstance = try JSONDecoder().decode(Snow.self, from: data) @@ -134,12 +162,16 @@ final class SnowTests: XCTestCase { XCTAssertEqual(decodedInstance.densityTransition, .testConstantValue()) XCTAssertEqual(decodedInstance.direction, Value.constant([0, 1])) XCTAssertEqual(decodedInstance.directionTransition, .testConstantValue()) + XCTAssertEqual(decodedInstance.flakeSize, Value.constant(Double.testConstantValue())) + XCTAssertEqual(decodedInstance.flakeSizeTransition, .testConstantValue()) XCTAssertEqual(decodedInstance.intensity, Value.constant(Double.testConstantValue())) XCTAssertEqual(decodedInstance.intensityTransition, .testConstantValue()) XCTAssertEqual(decodedInstance.opacity, Value.constant(Double.testConstantValue())) XCTAssertEqual(decodedInstance.opacityTransition, .testConstantValue()) XCTAssertEqual(decodedInstance.vignette, Value.constant(Double.testConstantValue())) XCTAssertEqual(decodedInstance.vignetteTransition, .testConstantValue()) + XCTAssertEqual(decodedInstance.vignetteColor, Value.constant(StyleColor.testConstantValue())) + XCTAssertEqual(decodedInstance.vignetteColorTransition, .testConstantValue()) } } diff --git a/scripts/api-compatibility-check/breakage_allowlist.txt b/scripts/api-compatibility-check/breakage_allowlist.txt index 8c1b42ee3bf4..6e5bc9e6bdae 100644 --- a/scripts/api-compatibility-check/breakage_allowlist.txt +++ b/scripts/api-compatibility-check/breakage_allowlist.txt @@ -1962,3 +1962,91 @@ Constructor TapInteraction.init(_:filter:action:) has been removed # Expression dictionary literal support Accessor Dictionary.expressionArguments.Get() has generic signature change from to + + +# Fix experimental types generation +Constructor ClipLayerTypes.init(rawValue:) is now with @_documentation +Constructor ClipLayerTypes.init(rawValue:) is now with @_spi +Constructor FillExtrusionBaseAlignment.init(rawValue:) is now with @_documentation +Constructor FillExtrusionBaseAlignment.init(rawValue:) is now with @_spi +Constructor FillExtrusionHeightAlignment.init(rawValue:) is now with @_documentation +Constructor FillExtrusionHeightAlignment.init(rawValue:) is now with @_spi +Constructor ModelScaleMode.init(rawValue:) is now with @_documentation +Constructor ModelScaleMode.init(rawValue:) is now with @_spi +Constructor ModelType.init(rawValue:) is now with @_documentation +Constructor ModelType.init(rawValue:) is now with @_spi +Constructor SymbolElevationReference.init(rawValue:) is now with @_documentation +Constructor SymbolElevationReference.init(rawValue:) is now with @_spi +Func Puck3D.modelScaleMode(_:) is now with @_documentation +Func Puck3D.modelScaleMode(_:) is now with @_spi +Struct ClipLayerTypes is now with @_documentation +Struct ClipLayerTypes is now with @_spi +Struct FillExtrusionBaseAlignment is now with @_documentation +Struct FillExtrusionBaseAlignment is now with @_spi +Struct FillExtrusionHeightAlignment is now with @_documentation +Struct FillExtrusionHeightAlignment is now with @_spi +Struct ModelScaleMode is now with @_documentation +Struct ModelScaleMode is now with @_spi +Struct ModelType is now with @_documentation +Struct ModelType is now with @_spi +Struct SymbolElevationReference is now with @_documentation +Struct SymbolElevationReference is now with @_spi +TypeAlias ClipLayerTypes.RawValue is now with @_spi +TypeAlias FillExtrusionBaseAlignment.RawValue is now with @_spi +TypeAlias FillExtrusionHeightAlignment.RawValue is now with @_spi +TypeAlias ModelScaleMode.RawValue is now with @_spi +TypeAlias ModelType.RawValue is now with @_spi +TypeAlias SymbolElevationReference.RawValue is now with @_spi +Var ClipLayerTypes.model is now with @_documentation +Var ClipLayerTypes.model is now with @_spi +Var ClipLayerTypes.rawValue is now with @_documentation +Var ClipLayerTypes.rawValue is now with @_spi +Var ClipLayerTypes.symbol is now with @_documentation +Var ClipLayerTypes.symbol is now with @_spi +Var FillExtrusionBaseAlignment.flat is now with @_documentation +Var FillExtrusionBaseAlignment.flat is now with @_spi +Var FillExtrusionBaseAlignment.rawValue is now with @_documentation +Var FillExtrusionBaseAlignment.rawValue is now with @_spi +Var FillExtrusionBaseAlignment.terrain is now with @_documentation +Var FillExtrusionBaseAlignment.terrain is now with @_spi +Var FillExtrusionHeightAlignment.flat is now with @_documentation +Var FillExtrusionHeightAlignment.flat is now with @_spi +Var FillExtrusionHeightAlignment.rawValue is now with @_documentation +Var FillExtrusionHeightAlignment.rawValue is now with @_spi +Var FillExtrusionHeightAlignment.terrain is now with @_documentation +Var FillExtrusionHeightAlignment.terrain is now with @_spi +Var ModelScaleMode.map is now with @_documentation +Var ModelScaleMode.map is now with @_spi +Var ModelScaleMode.rawValue is now with @_documentation +Var ModelScaleMode.rawValue is now with @_spi +Var ModelScaleMode.viewport is now with @_documentation +Var ModelScaleMode.viewport is now with @_spi +Var ModelType.common3d is now with @_documentation +Var ModelType.common3d is now with @_spi +Var ModelType.locationIndicator is now with @_documentation +Var ModelType.locationIndicator is now with @_spi +Var ModelType.rawValue is now with @_documentation +Var ModelType.rawValue is now with @_spi +Var SymbolElevationReference.ground is now with @_documentation +Var SymbolElevationReference.ground is now with @_spi +Var SymbolElevationReference.rawValue is now with @_documentation +Var SymbolElevationReference.rawValue is now with @_spi +Var SymbolElevationReference.sea is now with @_documentation +Var SymbolElevationReference.sea is now with @_spi + +# Bump style spec to 11.9.0 +Constructor BackgroundPitchAlignment.init(rawValue:) is now with @_documentation +Constructor BackgroundPitchAlignment.init(rawValue:) is now with @_spi +Func BackgroundLayer.backgroundPitchAlignment(_:) is now with @_documentation +Func BackgroundLayer.backgroundPitchAlignment(_:) is now with @_spi +Struct BackgroundPitchAlignment is now with @_documentation +Struct BackgroundPitchAlignment is now with @_spi +TypeAlias BackgroundPitchAlignment.RawValue is now with @_spi +Var BackgroundLayer.backgroundPitchAlignment is now with @_documentation +Var BackgroundLayer.backgroundPitchAlignment is now with @_spi +Var BackgroundPitchAlignment.map is now with @_documentation +Var BackgroundPitchAlignment.map is now with @_spi +Var BackgroundPitchAlignment.rawValue is now with @_documentation +Var BackgroundPitchAlignment.rawValue is now with @_spi +Var BackgroundPitchAlignment.viewport is now with @_documentation +Var BackgroundPitchAlignment.viewport is now with @_spi