Updated version to 30.29.0

commit_hash:94dff4290fa0fb36a9d91c1bb488e08f43a8ba59
This commit is contained in:
robot-divkit
2024-11-27 15:15:54 +03:00
parent cb3fa75397
commit 4ddd639bd4
17 changed files with 686 additions and 58 deletions
+4
View File
@@ -17510,6 +17510,10 @@
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextGradient.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextGradient.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeBackground.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeBackground.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeBorder.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeBorder.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMask.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMask.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMaskBase.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMaskBase.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMaskParticles.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMaskParticles.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMaskSolid.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMaskSolid.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/Timer.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/Timer.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/Tooltip.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/Tooltip.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/Transform.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/Transform.kt",
+1 -1
View File
@@ -1,2 +1,2 @@
MARKETING_VERSION = 30.28.0
MARKETING_VERSION = 30.29.0
CURRENT_PROJECT_VERSION = 30
+1 -1
View File
@@ -1,3 +1,3 @@
public enum DivKitInfo {
public static let version = "30.28.0"
public static let version = "30.29.0"
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@divkitframework/divkit",
"version": "30.28.0",
"version": "30.29.0",
"description": "DivKit for the web",
"keywords": [
"server-driven-ui",
@@ -18,7 +18,7 @@ import kotlin.collections.List
import kotlin.collections.Map
/**
* Scrolls the container by 'item_count' or 'offset' starting from the current position. If both values are specified, the action will be combined. For scrolling back, use negative values.
* Scrolls the container by `item_count` or `offset` starting from the current position. If both values are specified, the action will be combined. For scrolling back, use negative values.
*
* Can be created using the method [actionScrollBy].
*
@@ -60,12 +60,12 @@ data class ActionScrollBy internal constructor(
*/
val itemCount: Property<Int>?,
/**
* Scrolling distance measured in 'dp' from the current position. For scrolling back, use negative values. Only applies in 'gallery'.
* Scrolling distance measured in `dp` from the current position. For scrolling back, use negative values. Only applies in `gallery`.
* Default value: `0`.
*/
val offset: Property<Int>?,
/**
* Defines navigation behavior at boundary elements:<li>'clamp': Stop navigation at the boundary element (default)</li><li>'ring': Navigate to the start or end, depending on the current element.</li>
* Defines navigation behavior at boundary elements:<li>`clamp`: Stop navigation at the boundary element (default)</li><li>`ring`: Navigate to the start or end, depending on the current element.</li>
* Default value: `clamp`.
*/
val overflow: Property<Overflow>?,
@@ -83,7 +83,7 @@ data class ActionScrollBy internal constructor(
}
/**
* Defines navigation behavior at boundary elements:<li>'clamp': Stop navigation at the boundary element (default)</li><li>'ring': Navigate to the start or end, depending on the current element.</li>
* Defines navigation behavior at boundary elements:<li>`clamp`: Stop navigation at the boundary element (default)</li><li>`ring`: Navigate to the start or end, depending on the current element.</li>
*
* Possible values: [clamp], [ring].
*/
@@ -95,8 +95,8 @@ data class ActionScrollBy internal constructor(
* @param animated Enables scrolling animation.
* @param id ID of the element where the action should be performed.
* @param itemCount Number of container elements to scroll through. For scrolling back, use negative values.
* @param offset Scrolling distance measured in 'dp' from the current position. For scrolling back, use negative values. Only applies in 'gallery'.
* @param overflow Defines navigation behavior at boundary elements:<li>'clamp': Stop navigation at the boundary element (default)</li><li>'ring': Navigate to the start or end, depending on the current element.</li>
* @param offset Scrolling distance measured in `dp` from the current position. For scrolling back, use negative values. Only applies in `gallery`.
* @param overflow Defines navigation behavior at boundary elements:<li>`clamp`: Stop navigation at the boundary element (default)</li><li>`ring`: Navigate to the start or end, depending on the current element.</li>
*/
@Generated
fun DivScope.actionScrollBy(
@@ -120,8 +120,8 @@ fun DivScope.actionScrollBy(
* @param animated Enables scrolling animation.
* @param id ID of the element where the action should be performed.
* @param itemCount Number of container elements to scroll through. For scrolling back, use negative values.
* @param offset Scrolling distance measured in 'dp' from the current position. For scrolling back, use negative values. Only applies in 'gallery'.
* @param overflow Defines navigation behavior at boundary elements:<li>'clamp': Stop navigation at the boundary element (default)</li><li>'ring': Navigate to the start or end, depending on the current element.</li>
* @param offset Scrolling distance measured in `dp` from the current position. For scrolling back, use negative values. Only applies in `gallery`.
* @param overflow Defines navigation behavior at boundary elements:<li>`clamp`: Stop navigation at the boundary element (default)</li><li>`ring`: Navigate to the start or end, depending on the current element.</li>
*/
@Generated
fun DivScope.actionScrollByProps(
@@ -143,8 +143,8 @@ fun DivScope.actionScrollByProps(
* @param animated Enables scrolling animation.
* @param id ID of the element where the action should be performed.
* @param itemCount Number of container elements to scroll through. For scrolling back, use negative values.
* @param offset Scrolling distance measured in 'dp' from the current position. For scrolling back, use negative values. Only applies in 'gallery'.
* @param overflow Defines navigation behavior at boundary elements:<li>'clamp': Stop navigation at the boundary element (default)</li><li>'ring': Navigate to the start or end, depending on the current element.</li>
* @param offset Scrolling distance measured in `dp` from the current position. For scrolling back, use negative values. Only applies in `gallery`.
* @param overflow Defines navigation behavior at boundary elements:<li>`clamp`: Stop navigation at the boundary element (default)</li><li>`ring`: Navigate to the start or end, depending on the current element.</li>
*/
@Generated
fun TemplateScope.actionScrollByRefs(
@@ -166,8 +166,8 @@ fun TemplateScope.actionScrollByRefs(
* @param animated Enables scrolling animation.
* @param id ID of the element where the action should be performed.
* @param itemCount Number of container elements to scroll through. For scrolling back, use negative values.
* @param offset Scrolling distance measured in 'dp' from the current position. For scrolling back, use negative values. Only applies in 'gallery'.
* @param overflow Defines navigation behavior at boundary elements:<li>'clamp': Stop navigation at the boundary element (default)</li><li>'ring': Navigate to the start or end, depending on the current element.</li>
* @param offset Scrolling distance measured in `dp` from the current position. For scrolling back, use negative values. Only applies in `gallery`.
* @param overflow Defines navigation behavior at boundary elements:<li>`clamp`: Stop navigation at the boundary element (default)</li><li>`ring`: Navigate to the start or end, depending on the current element.</li>
*/
@Generated
fun ActionScrollBy.override(
@@ -191,8 +191,8 @@ fun ActionScrollBy.override(
* @param animated Enables scrolling animation.
* @param id ID of the element where the action should be performed.
* @param itemCount Number of container elements to scroll through. For scrolling back, use negative values.
* @param offset Scrolling distance measured in 'dp' from the current position. For scrolling back, use negative values. Only applies in 'gallery'.
* @param overflow Defines navigation behavior at boundary elements:<li>'clamp': Stop navigation at the boundary element (default)</li><li>'ring': Navigate to the start or end, depending on the current element.</li>
* @param offset Scrolling distance measured in `dp` from the current position. For scrolling back, use negative values. Only applies in `gallery`.
* @param overflow Defines navigation behavior at boundary elements:<li>`clamp`: Stop navigation at the boundary element (default)</li><li>`ring`: Navigate to the start or end, depending on the current element.</li>
*/
@Generated
fun ActionScrollBy.defer(
@@ -216,8 +216,8 @@ fun ActionScrollBy.defer(
* @param animated Enables scrolling animation.
* @param id ID of the element where the action should be performed.
* @param itemCount Number of container elements to scroll through. For scrolling back, use negative values.
* @param offset Scrolling distance measured in 'dp' from the current position. For scrolling back, use negative values. Only applies in 'gallery'.
* @param overflow Defines navigation behavior at boundary elements:<li>'clamp': Stop navigation at the boundary element (default)</li><li>'ring': Navigate to the start or end, depending on the current element.</li>
* @param offset Scrolling distance measured in `dp` from the current position. For scrolling back, use negative values. Only applies in `gallery`.
* @param overflow Defines navigation behavior at boundary elements:<li>`clamp`: Stop navigation at the boundary element (default)</li><li>`ring`: Navigate to the start or end, depending on the current element.</li>
*/
@Generated
fun ActionScrollBy.evaluate(
@@ -18,7 +18,7 @@ import kotlin.collections.List
import kotlin.collections.Map
/**
* Scrolls to a position or switches to the container element specified by the 'destination' parameter.
* Scrolls to a position or switches to the container element specified by the `destination` parameter.
*
* Can be created using the method [actionScrollTo].
*
@@ -49,7 +49,7 @@ data class ActionScrollTo internal constructor(
*/
val animated: Property<Boolean>?,
/**
* Defines the scrolling end position:<li>'index': Scroll to the element with the index provided in 'value'</li><li>'offset': Scroll to the position specified in 'value' and measured in 'dp' from the start of the container. Applies only in 'gallery';</li><li>'start': Scroll to the container start;</li><li>'end': Scroll to the container end.</li>
* Defines the scrolling end position:<li>`index`: Scroll to the element with the index provided in `value`</li><li>`offset`: Scroll to the position specified in `value` and measured in `dp` from the start of the container. Applies only in `gallery`;</li><li>`start`: Scroll to the container start;</li><li>`end`: Scroll to the container end.</li>
*/
val destination: Property<ActionScrollDestination>?,
/**
@@ -70,7 +70,7 @@ data class ActionScrollTo internal constructor(
/**
* @param animated Enables scrolling animation.
* @param destination Defines the scrolling end position:<li>'index': Scroll to the element with the index provided in 'value'</li><li>'offset': Scroll to the position specified in 'value' and measured in 'dp' from the start of the container. Applies only in 'gallery';</li><li>'start': Scroll to the container start;</li><li>'end': Scroll to the container end.</li>
* @param destination Defines the scrolling end position:<li>`index`: Scroll to the element with the index provided in `value`</li><li>`offset`: Scroll to the position specified in `value` and measured in `dp` from the start of the container. Applies only in `gallery`;</li><li>`start`: Scroll to the container start;</li><li>`end`: Scroll to the container end.</li>
* @param id ID of the element where the action should be performed.
*/
@Generated
@@ -89,7 +89,7 @@ fun DivScope.actionScrollTo(
/**
* @param animated Enables scrolling animation.
* @param destination Defines the scrolling end position:<li>'index': Scroll to the element with the index provided in 'value'</li><li>'offset': Scroll to the position specified in 'value' and measured in 'dp' from the start of the container. Applies only in 'gallery';</li><li>'start': Scroll to the container start;</li><li>'end': Scroll to the container end.</li>
* @param destination Defines the scrolling end position:<li>`index`: Scroll to the element with the index provided in `value`</li><li>`offset`: Scroll to the position specified in `value` and measured in `dp` from the start of the container. Applies only in `gallery`;</li><li>`start`: Scroll to the container start;</li><li>`end`: Scroll to the container end.</li>
* @param id ID of the element where the action should be performed.
*/
@Generated
@@ -106,7 +106,7 @@ fun DivScope.actionScrollToProps(
/**
* @param animated Enables scrolling animation.
* @param destination Defines the scrolling end position:<li>'index': Scroll to the element with the index provided in 'value'</li><li>'offset': Scroll to the position specified in 'value' and measured in 'dp' from the start of the container. Applies only in 'gallery';</li><li>'start': Scroll to the container start;</li><li>'end': Scroll to the container end.</li>
* @param destination Defines the scrolling end position:<li>`index`: Scroll to the element with the index provided in `value`</li><li>`offset`: Scroll to the position specified in `value` and measured in `dp` from the start of the container. Applies only in `gallery`;</li><li>`start`: Scroll to the container start;</li><li>`end`: Scroll to the container end.</li>
* @param id ID of the element where the action should be performed.
*/
@Generated
@@ -123,7 +123,7 @@ fun TemplateScope.actionScrollToRefs(
/**
* @param animated Enables scrolling animation.
* @param destination Defines the scrolling end position:<li>'index': Scroll to the element with the index provided in 'value'</li><li>'offset': Scroll to the position specified in 'value' and measured in 'dp' from the start of the container. Applies only in 'gallery';</li><li>'start': Scroll to the container start;</li><li>'end': Scroll to the container end.</li>
* @param destination Defines the scrolling end position:<li>`index`: Scroll to the element with the index provided in `value`</li><li>`offset`: Scroll to the position specified in `value` and measured in `dp` from the start of the container. Applies only in `gallery`;</li><li>`start`: Scroll to the container start;</li><li>`end`: Scroll to the container end.</li>
* @param id ID of the element where the action should be performed.
*/
@Generated
@@ -142,7 +142,7 @@ fun ActionScrollTo.override(
/**
* @param animated Enables scrolling animation.
* @param destination Defines the scrolling end position:<li>'index': Scroll to the element with the index provided in 'value'</li><li>'offset': Scroll to the position specified in 'value' and measured in 'dp' from the start of the container. Applies only in 'gallery';</li><li>'start': Scroll to the container start;</li><li>'end': Scroll to the container end.</li>
* @param destination Defines the scrolling end position:<li>`index`: Scroll to the element with the index provided in `value`</li><li>`offset`: Scroll to the position specified in `value` and measured in `dp` from the start of the container. Applies only in `gallery`;</li><li>`start`: Scroll to the container start;</li><li>`end`: Scroll to the container end.</li>
* @param id ID of the element where the action should be performed.
*/
@Generated
@@ -248,7 +248,8 @@ object NoAnimationEnumValue : EnumValue("no_animation"),
@Generated
object NormalEnumValue : EnumValue("normal"),
AnimationDirection
AnimationDirection,
Text.Image.IndexingDirection
@Generated
object ReverseEnumValue : EnumValue("reverse"),
@@ -535,6 +536,10 @@ object SlideEnumValue : EnumValue("slide"),
object MiddleEnumValue : EnumValue("middle"),
Text.Truncate
@Generated
object ReversedEnumValue : EnumValue("reversed"),
Text.Image.IndexingDirection
@Generated
object TopLeftEnumValue : EnumValue("top-left"),
Tooltip.Position
@@ -1037,6 +1042,10 @@ val DivScope.slide: SlideEnumValue
val DivScope.middle: MiddleEnumValue
get() = MiddleEnumValue
@Generated
val DivScope.reversed: ReversedEnumValue
get() = ReversedEnumValue
@Generated
val DivScope.top_left: TopLeftEnumValue
get() = TopLeftEnumValue
@@ -18,7 +18,7 @@ import kotlin.collections.List
import kotlin.collections.Map
/**
* Specifies the position measured in 'dp' from the container start as the scrolling end position. Only applies in 'gallery'.
* Specifies the position measured in `dp` from the container start as the scrolling end position. Only applies in `gallery`.
*
* Can be created using the method [offsetDestination].
*
@@ -42,7 +42,7 @@ data class OffsetDestination internal constructor(
data class Properties internal constructor(
/**
* Position measured in 'dp'.
* Position measured in `dp`.
*/
val value: Property<Int>?,
) {
@@ -56,7 +56,7 @@ data class OffsetDestination internal constructor(
}
/**
* @param value Position measured in 'dp'.
* @param value Position measured in `dp`.
*/
@Generated
fun DivScope.offsetDestination(
@@ -69,7 +69,7 @@ fun DivScope.offsetDestination(
)
/**
* @param value Position measured in 'dp'.
* @param value Position measured in `dp`.
*/
@Generated
fun DivScope.offsetDestinationProps(
@@ -80,7 +80,7 @@ fun DivScope.offsetDestinationProps(
)
/**
* @param value Position measured in 'dp'.
* @param value Position measured in `dp`.
*/
@Generated
fun TemplateScope.offsetDestinationRefs(
@@ -91,7 +91,7 @@ fun TemplateScope.offsetDestinationRefs(
)
/**
* @param value Position measured in 'dp'.
* @param value Position measured in `dp`.
*/
@Generated
fun OffsetDestination.override(
@@ -104,7 +104,7 @@ fun OffsetDestination.override(
)
/**
* @param value Position measured in 'dp'.
* @param value Position measured in `dp`.
*/
@Generated
fun OffsetDestination.defer(
@@ -117,7 +117,7 @@ fun OffsetDestination.defer(
)
/**
* @param value Position measured in 'dp'.
* @param value Position measured in `dp`.
*/
@Generated
fun OffsetDestination.evaluate(
@@ -153,7 +153,7 @@ data class Switch internal constructor(
/**
* Color of the toggle in the enabled state. If the color is omitted:
: iOS standard system color is used
: the color specified in 'Div2Context' on Android is used.
: the color specified in `Div2Context` on Android is used.
*/
val onColor: Property<Color>?,
/**
@@ -287,7 +287,7 @@ data class Switch internal constructor(
* @param margins External margins from the element stroke.
* @param onColor Color of the toggle in the enabled state. If the color is omitted:
: iOS standard system color is used
: the color specified in 'Div2Context' on Android is used.
: the color specified in `Div2Context` on Android is used.
* @param paddings Internal margins from the element stroke.
* @param reuseId ID for the div object structure. Used to optimize block reuse. See [block reuse](../../reuse/reuse.md).
* @param rowSpan Merges cells in a string of the [grid](div-grid.md) element.
@@ -404,7 +404,7 @@ fun DivScope.switch(
* @param margins External margins from the element stroke.
* @param onColor Color of the toggle in the enabled state. If the color is omitted:
: iOS standard system color is used
: the color specified in 'Div2Context' on Android is used.
: the color specified in `Div2Context` on Android is used.
* @param paddings Internal margins from the element stroke.
* @param reuseId ID for the div object structure. Used to optimize block reuse. See [block reuse](../../reuse/reuse.md).
* @param rowSpan Merges cells in a string of the [grid](div-grid.md) element.
@@ -519,7 +519,7 @@ fun DivScope.switchProps(
* @param margins External margins from the element stroke.
* @param onColor Color of the toggle in the enabled state. If the color is omitted:
: iOS standard system color is used
: the color specified in 'Div2Context' on Android is used.
: the color specified in `Div2Context` on Android is used.
* @param paddings Internal margins from the element stroke.
* @param reuseId ID for the div object structure. Used to optimize block reuse. See [block reuse](../../reuse/reuse.md).
* @param rowSpan Merges cells in a string of the [grid](div-grid.md) element.
@@ -634,7 +634,7 @@ fun TemplateScope.switchRefs(
* @param margins External margins from the element stroke.
* @param onColor Color of the toggle in the enabled state. If the color is omitted:
: iOS standard system color is used
: the color specified in 'Div2Context' on Android is used.
: the color specified in `Div2Context` on Android is used.
* @param paddings Internal margins from the element stroke.
* @param reuseId ID for the div object structure. Used to optimize block reuse. See [block reuse](../../reuse/reuse.md).
* @param rowSpan Merges cells in a string of the [grid](div-grid.md) element.
@@ -751,7 +751,7 @@ fun Switch.override(
* @param margins External margins from the element stroke.
* @param onColor Color of the toggle in the enabled state. If the color is omitted:
: iOS standard system color is used
: the color specified in 'Div2Context' on Android is used.
: the color specified in `Div2Context` on Android is used.
* @param paddings Internal margins from the element stroke.
* @param reuseId ID for the div object structure. Used to optimize block reuse. See [block reuse](../../reuse/reuse.md).
* @param rowSpan Merges cells in a string of the [grid](div-grid.md) element.
@@ -855,7 +855,7 @@ fun Switch.defer(
* @param isEnabled Enables or disables the element's toggle functionality.
* @param onColor Color of the toggle in the enabled state. If the color is omitted:
: iOS standard system color is used
: the color specified in 'Div2Context' on Android is used.
: the color specified in `Div2Context` on Android is used.
* @param reuseId ID for the div object structure. Used to optimize block reuse. See [block reuse](../../reuse/reuse.md).
* @param rowSpan Merges cells in a string of the [grid](div-grid.md) element.
* @param visibility Element visibility.
@@ -933,7 +933,7 @@ fun Switch.evaluate(
* @param margins External margins from the element stroke.
* @param onColor Color of the toggle in the enabled state. If the color is omitted:
: iOS standard system color is used
: the color specified in 'Div2Context' on Android is used.
: the color specified in `Div2Context` on Android is used.
* @param paddings Internal margins from the element stroke.
* @param reuseId ID for the div object structure. Used to optimize block reuse. See [block reuse](../../reuse/reuse.md).
* @param rowSpan Merges cells in a string of the [grid](div-grid.md) element.
@@ -1051,7 +1051,7 @@ fun Component<Switch>.override(
* @param margins External margins from the element stroke.
* @param onColor Color of the toggle in the enabled state. If the color is omitted:
: iOS standard system color is used
: the color specified in 'Div2Context' on Android is used.
: the color specified in `Div2Context` on Android is used.
* @param paddings Internal margins from the element stroke.
* @param reuseId ID for the div object structure. Used to optimize block reuse. See [block reuse](../../reuse/reuse.md).
* @param rowSpan Merges cells in a string of the [grid](div-grid.md) element.
@@ -1156,7 +1156,7 @@ fun Component<Switch>.defer(
* @param isEnabled Enables or disables the element's toggle functionality.
* @param onColor Color of the toggle in the enabled state. If the color is omitted:
: iOS standard system color is used
: the color specified in 'Div2Context' on Android is used.
: the color specified in `Div2Context` on Android is used.
* @param reuseId ID for the div object structure. Used to optimize block reuse. See [block reuse](../../reuse/reuse.md).
* @param rowSpan Merges cells in a string of the [grid](div-grid.md) element.
* @param visibility Element visibility.
@@ -327,7 +327,7 @@ data class Text internal constructor(
*/
val textShadow: Property<Shadow>?,
/**
* Limit the text width to the maximum line width. Applies only when the width is set to 'wrap_content', 'constrained=true', and 'max_size' is specified.
* Limit the text width to the maximum line width. Applies only when the width is set to `wrap_content`, `constrained=true`, and `max_size` is specified.
* Default value: `false`.
*/
val tightenWidth: Property<Boolean>?,
@@ -550,6 +550,7 @@ data class Text internal constructor(
accessibility = additive.accessibility ?: properties.accessibility,
alignmentVertical = additive.alignmentVertical ?: properties.alignmentVertical,
height = additive.height ?: properties.height,
indexingDirection = additive.indexingDirection ?: properties.indexingDirection,
preloadRequired = additive.preloadRequired ?: properties.preloadRequired,
start = additive.start ?: properties.start,
tintColor = additive.tintColor ?: properties.tintColor,
@@ -571,6 +572,13 @@ data class Text internal constructor(
* Default value: `{"type": "fixed","value":20}`.
*/
val height: Property<FixedSize>?,
/**
* Defines direction in `start` parameter:
`normal` - regular indexation for strings ([0, 1, 2, ..., N]). Use to insert an image by index relative to the begging of a string.
`reversed` - indexation from the end towards the begging of a string ([N, ..., 2, 1, 0]). Use to insert an image by index relative to the end of a string.
* Default value: `normal`.
*/
val indexingDirection: Property<IndexingDirection>?,
/**
* Background image must be loaded before the display.
* Default value: `false`.
@@ -605,6 +613,7 @@ data class Text internal constructor(
result.tryPutProperty("accessibility", accessibility)
result.tryPutProperty("alignment_vertical", alignmentVertical)
result.tryPutProperty("height", height)
result.tryPutProperty("indexing_direction", indexingDirection)
result.tryPutProperty("preload_required", preloadRequired)
result.tryPutProperty("start", start)
result.tryPutProperty("tint_color", tintColor)
@@ -615,6 +624,16 @@ data class Text internal constructor(
}
}
/**
* Defines direction in `start` parameter:
`normal` - regular indexation for strings ([0, 1, 2, ..., N]). Use to insert an image by index relative to the begging of a string.
`reversed` - indexation from the end towards the begging of a string ([N, ..., 2, 1, 0]). Use to insert an image by index relative to the end of a string.
*
* Possible values: [normal], [reversed].
*/
@Generated
sealed interface IndexingDirection
/**
* Can be created using the method [textImageAccessibility].
*/
@@ -693,6 +712,7 @@ data class Text internal constructor(
fontWeightValue = additive.fontWeightValue ?: properties.fontWeightValue,
letterSpacing = additive.letterSpacing ?: properties.letterSpacing,
lineHeight = additive.lineHeight ?: properties.lineHeight,
mask = additive.mask ?: properties.mask,
start = additive.start ?: properties.start,
strike = additive.strike ?: properties.strike,
textColor = additive.textColor ?: properties.textColor,
@@ -756,6 +776,10 @@ data class Text internal constructor(
* Line spacing of the text. Units specified in `font_size_unit`.
*/
val lineHeight: Property<Int>?,
/**
* A mask that hides a part of text, text can be revealed by disabling mask through `is_enabled` property.
*/
val mask: Property<TextRangeMask>?,
/**
* Ordinal number of a character which the range begins from. The first character has a number `0`.
* Default value: `0`.
@@ -798,6 +822,7 @@ data class Text internal constructor(
result.tryPutProperty("font_weight_value", fontWeightValue)
result.tryPutProperty("letter_spacing", letterSpacing)
result.tryPutProperty("line_height", lineHeight)
result.tryPutProperty("mask", mask)
result.tryPutProperty("start", start)
result.tryPutProperty("strike", strike)
result.tryPutProperty("text_color", textColor)
@@ -863,7 +888,7 @@ data class Text internal constructor(
* @param textColor Text color. Not used if the `text_gradient` parameter is set.
* @param textGradient Gradient text color.
* @param textShadow Parameters of the shadow applied to the text.
* @param tightenWidth Limit the text width to the maximum line width. Applies only when the width is set to 'wrap_content', 'constrained=true', and 'max_size' is specified.
* @param tightenWidth Limit the text width to the maximum line width. Applies only when the width is set to `wrap_content`, `constrained=true`, and `max_size` is specified.
* @param tooltips Tooltips linked to an element. A tooltip can be shown by `div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where `id` — tooltip id.
* @param transform Applies the passed transformation to the element. Content that doesn't fit into the original view area is cut off.
* @param transitionChange Change animation. It is played when the position or size of an element changes in the new layout.
@@ -1073,7 +1098,7 @@ fun DivScope.text(
* @param textColor Text color. Not used if the `text_gradient` parameter is set.
* @param textGradient Gradient text color.
* @param textShadow Parameters of the shadow applied to the text.
* @param tightenWidth Limit the text width to the maximum line width. Applies only when the width is set to 'wrap_content', 'constrained=true', and 'max_size' is specified.
* @param tightenWidth Limit the text width to the maximum line width. Applies only when the width is set to `wrap_content`, `constrained=true`, and `max_size` is specified.
* @param tooltips Tooltips linked to an element. A tooltip can be shown by `div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where `id` — tooltip id.
* @param transform Applies the passed transformation to the element. Content that doesn't fit into the original view area is cut off.
* @param transitionChange Change animation. It is played when the position or size of an element changes in the new layout.
@@ -1281,7 +1306,7 @@ fun DivScope.textProps(
* @param textColor Text color. Not used if the `text_gradient` parameter is set.
* @param textGradient Gradient text color.
* @param textShadow Parameters of the shadow applied to the text.
* @param tightenWidth Limit the text width to the maximum line width. Applies only when the width is set to 'wrap_content', 'constrained=true', and 'max_size' is specified.
* @param tightenWidth Limit the text width to the maximum line width. Applies only when the width is set to `wrap_content`, `constrained=true`, and `max_size` is specified.
* @param tooltips Tooltips linked to an element. A tooltip can be shown by `div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where `id` — tooltip id.
* @param transform Applies the passed transformation to the element. Content that doesn't fit into the original view area is cut off.
* @param transitionChange Change animation. It is played when the position or size of an element changes in the new layout.
@@ -1489,7 +1514,7 @@ fun TemplateScope.textRefs(
* @param textColor Text color. Not used if the `text_gradient` parameter is set.
* @param textGradient Gradient text color.
* @param textShadow Parameters of the shadow applied to the text.
* @param tightenWidth Limit the text width to the maximum line width. Applies only when the width is set to 'wrap_content', 'constrained=true', and 'max_size' is specified.
* @param tightenWidth Limit the text width to the maximum line width. Applies only when the width is set to `wrap_content`, `constrained=true`, and `max_size` is specified.
* @param tooltips Tooltips linked to an element. A tooltip can be shown by `div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where `id` — tooltip id.
* @param transform Applies the passed transformation to the element. Content that doesn't fit into the original view area is cut off.
* @param transitionChange Change animation. It is played when the position or size of an element changes in the new layout.
@@ -1699,7 +1724,7 @@ fun Text.override(
* @param textColor Text color. Not used if the `text_gradient` parameter is set.
* @param textGradient Gradient text color.
* @param textShadow Parameters of the shadow applied to the text.
* @param tightenWidth Limit the text width to the maximum line width. Applies only when the width is set to 'wrap_content', 'constrained=true', and 'max_size' is specified.
* @param tightenWidth Limit the text width to the maximum line width. Applies only when the width is set to `wrap_content`, `constrained=true`, and `max_size` is specified.
* @param tooltips Tooltips linked to an element. A tooltip can be shown by `div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where `id` — tooltip id.
* @param transform Applies the passed transformation to the element. Content that doesn't fit into the original view area is cut off.
* @param transitionChange Change animation. It is played when the position or size of an element changes in the new layout.
@@ -1881,7 +1906,7 @@ fun Text.defer(
* @param textAlignmentHorizontal Horizontal text alignment.
* @param textAlignmentVertical Vertical text alignment.
* @param textColor Text color. Not used if the `text_gradient` parameter is set.
* @param tightenWidth Limit the text width to the maximum line width. Applies only when the width is set to 'wrap_content', 'constrained=true', and 'max_size' is specified.
* @param tightenWidth Limit the text width to the maximum line width. Applies only when the width is set to `wrap_content`, `constrained=true`, and `max_size` is specified.
* @param truncate Text cropping method. Use `ellipsis` instead.
* @param underline Underline.
* @param visibility Element visibility.
@@ -2041,7 +2066,7 @@ fun Text.evaluate(
* @param textColor Text color. Not used if the `text_gradient` parameter is set.
* @param textGradient Gradient text color.
* @param textShadow Parameters of the shadow applied to the text.
* @param tightenWidth Limit the text width to the maximum line width. Applies only when the width is set to 'wrap_content', 'constrained=true', and 'max_size' is specified.
* @param tightenWidth Limit the text width to the maximum line width. Applies only when the width is set to `wrap_content`, `constrained=true`, and `max_size` is specified.
* @param tooltips Tooltips linked to an element. A tooltip can be shown by `div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where `id` — tooltip id.
* @param transform Applies the passed transformation to the element. Content that doesn't fit into the original view area is cut off.
* @param transitionChange Change animation. It is played when the position or size of an element changes in the new layout.
@@ -2252,7 +2277,7 @@ fun Component<Text>.override(
* @param textColor Text color. Not used if the `text_gradient` parameter is set.
* @param textGradient Gradient text color.
* @param textShadow Parameters of the shadow applied to the text.
* @param tightenWidth Limit the text width to the maximum line width. Applies only when the width is set to 'wrap_content', 'constrained=true', and 'max_size' is specified.
* @param tightenWidth Limit the text width to the maximum line width. Applies only when the width is set to `wrap_content`, `constrained=true`, and `max_size` is specified.
* @param tooltips Tooltips linked to an element. A tooltip can be shown by `div-action://show_tooltip?id=`, hidden by `div-action://hide_tooltip?id=` where `id` — tooltip id.
* @param transform Applies the passed transformation to the element. Content that doesn't fit into the original view area is cut off.
* @param transitionChange Change animation. It is played when the position or size of an element changes in the new layout.
@@ -2435,7 +2460,7 @@ fun Component<Text>.defer(
* @param textAlignmentHorizontal Horizontal text alignment.
* @param textAlignmentVertical Vertical text alignment.
* @param textColor Text color. Not used if the `text_gradient` parameter is set.
* @param tightenWidth Limit the text width to the maximum line width. Applies only when the width is set to 'wrap_content', 'constrained=true', and 'max_size' is specified.
* @param tightenWidth Limit the text width to the maximum line width. Applies only when the width is set to `wrap_content`, `constrained=true`, and `max_size` is specified.
* @param truncate Text cropping method. Use `ellipsis` instead.
* @param underline Underline.
* @param visibility Element visibility.
@@ -2681,6 +2706,9 @@ fun Text.Ellipsis.asList() = listOf(this)
/**
* @param alignmentVertical Vertical image alignment within the row.
* @param height Image height.
* @param indexingDirection Defines direction in `start` parameter:
`normal` - regular indexation for strings ([0, 1, 2, ..., N]). Use to insert an image by index relative to the begging of a string.
`reversed` - indexation from the end towards the begging of a string ([N, ..., 2, 1, 0]). Use to insert an image by index relative to the end of a string.
* @param preloadRequired Background image must be loaded before the display.
* @param start A symbol to insert prior to an image. To insert an image at the end of the text, specify the number of the last character plus one.
* @param tintColor New color of a contour image.
@@ -2694,6 +2722,7 @@ fun DivScope.textImage(
accessibility: Text.Image.Accessibility? = null,
alignmentVertical: TextAlignmentVertical? = null,
height: FixedSize? = null,
indexingDirection: Text.Image.IndexingDirection? = null,
preloadRequired: Boolean? = null,
start: Int? = null,
tintColor: Color? = null,
@@ -2705,6 +2734,7 @@ fun DivScope.textImage(
accessibility = valueOrNull(accessibility),
alignmentVertical = valueOrNull(alignmentVertical),
height = valueOrNull(height),
indexingDirection = valueOrNull(indexingDirection),
preloadRequired = valueOrNull(preloadRequired),
start = valueOrNull(start),
tintColor = valueOrNull(tintColor),
@@ -2717,6 +2747,9 @@ fun DivScope.textImage(
/**
* @param alignmentVertical Vertical image alignment within the row.
* @param height Image height.
* @param indexingDirection Defines direction in `start` parameter:
`normal` - regular indexation for strings ([0, 1, 2, ..., N]). Use to insert an image by index relative to the begging of a string.
`reversed` - indexation from the end towards the begging of a string ([N, ..., 2, 1, 0]). Use to insert an image by index relative to the end of a string.
* @param preloadRequired Background image must be loaded before the display.
* @param start A symbol to insert prior to an image. To insert an image at the end of the text, specify the number of the last character plus one.
* @param tintColor New color of a contour image.
@@ -2730,6 +2763,7 @@ fun DivScope.textImageProps(
accessibility: Text.Image.Accessibility? = null,
alignmentVertical: TextAlignmentVertical? = null,
height: FixedSize? = null,
indexingDirection: Text.Image.IndexingDirection? = null,
preloadRequired: Boolean? = null,
start: Int? = null,
tintColor: Color? = null,
@@ -2740,6 +2774,7 @@ fun DivScope.textImageProps(
accessibility = valueOrNull(accessibility),
alignmentVertical = valueOrNull(alignmentVertical),
height = valueOrNull(height),
indexingDirection = valueOrNull(indexingDirection),
preloadRequired = valueOrNull(preloadRequired),
start = valueOrNull(start),
tintColor = valueOrNull(tintColor),
@@ -2751,6 +2786,9 @@ fun DivScope.textImageProps(
/**
* @param alignmentVertical Vertical image alignment within the row.
* @param height Image height.
* @param indexingDirection Defines direction in `start` parameter:
`normal` - regular indexation for strings ([0, 1, 2, ..., N]). Use to insert an image by index relative to the begging of a string.
`reversed` - indexation from the end towards the begging of a string ([N, ..., 2, 1, 0]). Use to insert an image by index relative to the end of a string.
* @param preloadRequired Background image must be loaded before the display.
* @param start A symbol to insert prior to an image. To insert an image at the end of the text, specify the number of the last character plus one.
* @param tintColor New color of a contour image.
@@ -2764,6 +2802,7 @@ fun TemplateScope.textImageRefs(
accessibility: ReferenceProperty<Text.Image.Accessibility>? = null,
alignmentVertical: ReferenceProperty<TextAlignmentVertical>? = null,
height: ReferenceProperty<FixedSize>? = null,
indexingDirection: ReferenceProperty<Text.Image.IndexingDirection>? = null,
preloadRequired: ReferenceProperty<Boolean>? = null,
start: ReferenceProperty<Int>? = null,
tintColor: ReferenceProperty<Color>? = null,
@@ -2774,6 +2813,7 @@ fun TemplateScope.textImageRefs(
accessibility = accessibility,
alignmentVertical = alignmentVertical,
height = height,
indexingDirection = indexingDirection,
preloadRequired = preloadRequired,
start = start,
tintColor = tintColor,
@@ -2785,6 +2825,9 @@ fun TemplateScope.textImageRefs(
/**
* @param alignmentVertical Vertical image alignment within the row.
* @param height Image height.
* @param indexingDirection Defines direction in `start` parameter:
`normal` - regular indexation for strings ([0, 1, 2, ..., N]). Use to insert an image by index relative to the begging of a string.
`reversed` - indexation from the end towards the begging of a string ([N, ..., 2, 1, 0]). Use to insert an image by index relative to the end of a string.
* @param preloadRequired Background image must be loaded before the display.
* @param start A symbol to insert prior to an image. To insert an image at the end of the text, specify the number of the last character plus one.
* @param tintColor New color of a contour image.
@@ -2798,6 +2841,7 @@ fun Text.Image.override(
accessibility: Text.Image.Accessibility? = null,
alignmentVertical: TextAlignmentVertical? = null,
height: FixedSize? = null,
indexingDirection: Text.Image.IndexingDirection? = null,
preloadRequired: Boolean? = null,
start: Int? = null,
tintColor: Color? = null,
@@ -2809,6 +2853,7 @@ fun Text.Image.override(
accessibility = valueOrNull(accessibility) ?: properties.accessibility,
alignmentVertical = valueOrNull(alignmentVertical) ?: properties.alignmentVertical,
height = valueOrNull(height) ?: properties.height,
indexingDirection = valueOrNull(indexingDirection) ?: properties.indexingDirection,
preloadRequired = valueOrNull(preloadRequired) ?: properties.preloadRequired,
start = valueOrNull(start) ?: properties.start,
tintColor = valueOrNull(tintColor) ?: properties.tintColor,
@@ -2821,6 +2866,9 @@ fun Text.Image.override(
/**
* @param alignmentVertical Vertical image alignment within the row.
* @param height Image height.
* @param indexingDirection Defines direction in `start` parameter:
`normal` - regular indexation for strings ([0, 1, 2, ..., N]). Use to insert an image by index relative to the begging of a string.
`reversed` - indexation from the end towards the begging of a string ([N, ..., 2, 1, 0]). Use to insert an image by index relative to the end of a string.
* @param preloadRequired Background image must be loaded before the display.
* @param start A symbol to insert prior to an image. To insert an image at the end of the text, specify the number of the last character plus one.
* @param tintColor New color of a contour image.
@@ -2834,6 +2882,7 @@ fun Text.Image.defer(
accessibility: ReferenceProperty<Text.Image.Accessibility>? = null,
alignmentVertical: ReferenceProperty<TextAlignmentVertical>? = null,
height: ReferenceProperty<FixedSize>? = null,
indexingDirection: ReferenceProperty<Text.Image.IndexingDirection>? = null,
preloadRequired: ReferenceProperty<Boolean>? = null,
start: ReferenceProperty<Int>? = null,
tintColor: ReferenceProperty<Color>? = null,
@@ -2845,6 +2894,7 @@ fun Text.Image.defer(
accessibility = accessibility ?: properties.accessibility,
alignmentVertical = alignmentVertical ?: properties.alignmentVertical,
height = height ?: properties.height,
indexingDirection = indexingDirection ?: properties.indexingDirection,
preloadRequired = preloadRequired ?: properties.preloadRequired,
start = start ?: properties.start,
tintColor = tintColor ?: properties.tintColor,
@@ -2856,6 +2906,9 @@ fun Text.Image.defer(
/**
* @param alignmentVertical Vertical image alignment within the row.
* @param indexingDirection Defines direction in `start` parameter:
`normal` - regular indexation for strings ([0, 1, 2, ..., N]). Use to insert an image by index relative to the begging of a string.
`reversed` - indexation from the end towards the begging of a string ([N, ..., 2, 1, 0]). Use to insert an image by index relative to the end of a string.
* @param preloadRequired Background image must be loaded before the display.
* @param start A symbol to insert prior to an image. To insert an image at the end of the text, specify the number of the last character plus one.
* @param tintColor New color of a contour image.
@@ -2866,6 +2919,7 @@ fun Text.Image.defer(
fun Text.Image.evaluate(
`use named arguments`: Guard = Guard.instance,
alignmentVertical: ExpressionProperty<TextAlignmentVertical>? = null,
indexingDirection: ExpressionProperty<Text.Image.IndexingDirection>? = null,
preloadRequired: ExpressionProperty<Boolean>? = null,
start: ExpressionProperty<Int>? = null,
tintColor: ExpressionProperty<Color>? = null,
@@ -2876,6 +2930,7 @@ fun Text.Image.evaluate(
accessibility = properties.accessibility,
alignmentVertical = alignmentVertical ?: properties.alignmentVertical,
height = properties.height,
indexingDirection = indexingDirection ?: properties.indexingDirection,
preloadRequired = preloadRequired ?: properties.preloadRequired,
start = start ?: properties.start,
tintColor = tintColor ?: properties.tintColor,
@@ -2902,6 +2957,7 @@ fun Text.Image.asList() = listOf(this)
* @param fontWeightValue Style. Numeric value.
* @param letterSpacing Spacing between characters.
* @param lineHeight Line spacing of the text. Units specified in `font_size_unit`.
* @param mask A mask that hides a part of text, text can be revealed by disabling mask through `is_enabled` property.
* @param start Ordinal number of a character which the range begins from. The first character has a number `0`.
* @param strike Strikethrough.
* @param textColor Text color.
@@ -2925,6 +2981,7 @@ fun DivScope.textRange(
fontWeightValue: Int? = null,
letterSpacing: Double? = null,
lineHeight: Int? = null,
mask: TextRangeMask? = null,
start: Int? = null,
strike: LineStyle? = null,
textColor: Color? = null,
@@ -2946,6 +3003,7 @@ fun DivScope.textRange(
fontWeightValue = valueOrNull(fontWeightValue),
letterSpacing = valueOrNull(letterSpacing),
lineHeight = valueOrNull(lineHeight),
mask = valueOrNull(mask),
start = valueOrNull(start),
strike = valueOrNull(strike),
textColor = valueOrNull(textColor),
@@ -2969,6 +3027,7 @@ fun DivScope.textRange(
* @param fontWeightValue Style. Numeric value.
* @param letterSpacing Spacing between characters.
* @param lineHeight Line spacing of the text. Units specified in `font_size_unit`.
* @param mask A mask that hides a part of text, text can be revealed by disabling mask through `is_enabled` property.
* @param start Ordinal number of a character which the range begins from. The first character has a number `0`.
* @param strike Strikethrough.
* @param textColor Text color.
@@ -2992,6 +3051,7 @@ fun DivScope.textRangeProps(
fontWeightValue: Int? = null,
letterSpacing: Double? = null,
lineHeight: Int? = null,
mask: TextRangeMask? = null,
start: Int? = null,
strike: LineStyle? = null,
textColor: Color? = null,
@@ -3012,6 +3072,7 @@ fun DivScope.textRangeProps(
fontWeightValue = valueOrNull(fontWeightValue),
letterSpacing = valueOrNull(letterSpacing),
lineHeight = valueOrNull(lineHeight),
mask = valueOrNull(mask),
start = valueOrNull(start),
strike = valueOrNull(strike),
textColor = valueOrNull(textColor),
@@ -3034,6 +3095,7 @@ fun DivScope.textRangeProps(
* @param fontWeightValue Style. Numeric value.
* @param letterSpacing Spacing between characters.
* @param lineHeight Line spacing of the text. Units specified in `font_size_unit`.
* @param mask A mask that hides a part of text, text can be revealed by disabling mask through `is_enabled` property.
* @param start Ordinal number of a character which the range begins from. The first character has a number `0`.
* @param strike Strikethrough.
* @param textColor Text color.
@@ -3057,6 +3119,7 @@ fun TemplateScope.textRangeRefs(
fontWeightValue: ReferenceProperty<Int>? = null,
letterSpacing: ReferenceProperty<Double>? = null,
lineHeight: ReferenceProperty<Int>? = null,
mask: ReferenceProperty<TextRangeMask>? = null,
start: ReferenceProperty<Int>? = null,
strike: ReferenceProperty<LineStyle>? = null,
textColor: ReferenceProperty<Color>? = null,
@@ -3077,6 +3140,7 @@ fun TemplateScope.textRangeRefs(
fontWeightValue = fontWeightValue,
letterSpacing = letterSpacing,
lineHeight = lineHeight,
mask = mask,
start = start,
strike = strike,
textColor = textColor,
@@ -3099,6 +3163,7 @@ fun TemplateScope.textRangeRefs(
* @param fontWeightValue Style. Numeric value.
* @param letterSpacing Spacing between characters.
* @param lineHeight Line spacing of the text. Units specified in `font_size_unit`.
* @param mask A mask that hides a part of text, text can be revealed by disabling mask through `is_enabled` property.
* @param start Ordinal number of a character which the range begins from. The first character has a number `0`.
* @param strike Strikethrough.
* @param textColor Text color.
@@ -3122,6 +3187,7 @@ fun Text.Range.override(
fontWeightValue: Int? = null,
letterSpacing: Double? = null,
lineHeight: Int? = null,
mask: TextRangeMask? = null,
start: Int? = null,
strike: LineStyle? = null,
textColor: Color? = null,
@@ -3143,6 +3209,7 @@ fun Text.Range.override(
fontWeightValue = valueOrNull(fontWeightValue) ?: properties.fontWeightValue,
letterSpacing = valueOrNull(letterSpacing) ?: properties.letterSpacing,
lineHeight = valueOrNull(lineHeight) ?: properties.lineHeight,
mask = valueOrNull(mask) ?: properties.mask,
start = valueOrNull(start) ?: properties.start,
strike = valueOrNull(strike) ?: properties.strike,
textColor = valueOrNull(textColor) ?: properties.textColor,
@@ -3166,6 +3233,7 @@ fun Text.Range.override(
* @param fontWeightValue Style. Numeric value.
* @param letterSpacing Spacing between characters.
* @param lineHeight Line spacing of the text. Units specified in `font_size_unit`.
* @param mask A mask that hides a part of text, text can be revealed by disabling mask through `is_enabled` property.
* @param start Ordinal number of a character which the range begins from. The first character has a number `0`.
* @param strike Strikethrough.
* @param textColor Text color.
@@ -3189,6 +3257,7 @@ fun Text.Range.defer(
fontWeightValue: ReferenceProperty<Int>? = null,
letterSpacing: ReferenceProperty<Double>? = null,
lineHeight: ReferenceProperty<Int>? = null,
mask: ReferenceProperty<TextRangeMask>? = null,
start: ReferenceProperty<Int>? = null,
strike: ReferenceProperty<LineStyle>? = null,
textColor: ReferenceProperty<Color>? = null,
@@ -3210,6 +3279,7 @@ fun Text.Range.defer(
fontWeightValue = fontWeightValue ?: properties.fontWeightValue,
letterSpacing = letterSpacing ?: properties.letterSpacing,
lineHeight = lineHeight ?: properties.lineHeight,
mask = mask ?: properties.mask,
start = start ?: properties.start,
strike = strike ?: properties.strike,
textColor = textColor ?: properties.textColor,
@@ -3269,6 +3339,7 @@ fun Text.Range.evaluate(
fontWeightValue = fontWeightValue ?: properties.fontWeightValue,
letterSpacing = letterSpacing ?: properties.letterSpacing,
lineHeight = lineHeight ?: properties.lineHeight,
mask = properties.mask,
start = start ?: properties.start,
strike = strike ?: properties.strike,
textColor = textColor ?: properties.textColor,
@@ -0,0 +1,27 @@
@file:Suppress(
"unused",
"UNUSED_PARAMETER",
)
package divkit.dsl
import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.fasterxml.jackson.annotation.JsonIgnore
import com.fasterxml.jackson.annotation.JsonValue
import divkit.dsl.annotation.*
import divkit.dsl.core.*
import divkit.dsl.scope.*
import kotlin.Any
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
/**
* Possible values: [TextRangeMaskParticles], [TextRangeMaskSolid].
*/
@Generated
sealed interface TextRangeMask
@Generated
fun TextRangeMask.asList() = listOf(this)
@@ -0,0 +1,128 @@
@file:Suppress(
"unused",
"UNUSED_PARAMETER",
)
package divkit.dsl
import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.fasterxml.jackson.annotation.JsonIgnore
import com.fasterxml.jackson.annotation.JsonValue
import divkit.dsl.annotation.*
import divkit.dsl.core.*
import divkit.dsl.scope.*
import kotlin.Any
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
/**
* Can be created using the method [textRangeMaskBase].
*/
@Generated
data class TextRangeMaskBase internal constructor(
@JsonIgnore
val properties: Properties,
) {
@JsonAnyGetter
internal fun getJsonProperties(): Map<String, Any> = properties.mergeWith(emptyMap())
operator fun plus(additive: Properties): TextRangeMaskBase = TextRangeMaskBase(
Properties(
isEnabled = additive.isEnabled ?: properties.isEnabled,
)
)
data class Properties internal constructor(
/**
* Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
* Default value: `true`.
*/
val isEnabled: Property<Boolean>?,
) {
internal fun mergeWith(properties: Map<String, Any>): Map<String, Any> {
val result = mutableMapOf<String, Any>()
result.putAll(properties)
result.tryPutProperty("is_enabled", isEnabled)
return result
}
}
}
/**
* @param isEnabled Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
*/
@Generated
fun DivScope.textRangeMaskBase(
`use named arguments`: Guard = Guard.instance,
isEnabled: Boolean? = null,
): TextRangeMaskBase = TextRangeMaskBase(
TextRangeMaskBase.Properties(
isEnabled = valueOrNull(isEnabled),
)
)
/**
* @param isEnabled Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
*/
@Generated
fun DivScope.textRangeMaskBaseProps(
`use named arguments`: Guard = Guard.instance,
isEnabled: Boolean? = null,
) = TextRangeMaskBase.Properties(
isEnabled = valueOrNull(isEnabled),
)
/**
* @param isEnabled Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
*/
@Generated
fun TemplateScope.textRangeMaskBaseRefs(
`use named arguments`: Guard = Guard.instance,
isEnabled: ReferenceProperty<Boolean>? = null,
) = TextRangeMaskBase.Properties(
isEnabled = isEnabled,
)
/**
* @param isEnabled Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
*/
@Generated
fun TextRangeMaskBase.override(
`use named arguments`: Guard = Guard.instance,
isEnabled: Boolean? = null,
): TextRangeMaskBase = TextRangeMaskBase(
TextRangeMaskBase.Properties(
isEnabled = valueOrNull(isEnabled) ?: properties.isEnabled,
)
)
/**
* @param isEnabled Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
*/
@Generated
fun TextRangeMaskBase.defer(
`use named arguments`: Guard = Guard.instance,
isEnabled: ReferenceProperty<Boolean>? = null,
): TextRangeMaskBase = TextRangeMaskBase(
TextRangeMaskBase.Properties(
isEnabled = isEnabled ?: properties.isEnabled,
)
)
/**
* @param isEnabled Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
*/
@Generated
fun TextRangeMaskBase.evaluate(
`use named arguments`: Guard = Guard.instance,
isEnabled: ExpressionProperty<Boolean>? = null,
): TextRangeMaskBase = TextRangeMaskBase(
TextRangeMaskBase.Properties(
isEnabled = isEnabled ?: properties.isEnabled,
)
)
@Generated
fun TextRangeMaskBase.asList() = listOf(this)
@@ -0,0 +1,231 @@
@file:Suppress(
"unused",
"UNUSED_PARAMETER",
)
package divkit.dsl
import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.fasterxml.jackson.annotation.JsonIgnore
import com.fasterxml.jackson.annotation.JsonValue
import divkit.dsl.annotation.*
import divkit.dsl.core.*
import divkit.dsl.scope.*
import kotlin.Any
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
/**
* A mask to hide text (spoiler) that looks like randomly distributed particles (telegram alike).
*
* Can be created using the method [textRangeMaskParticles].
*
* Required parameters: `type, color`.
*/
@Generated
data class TextRangeMaskParticles internal constructor(
@JsonIgnore
val properties: Properties,
) : TextRangeMask {
@JsonAnyGetter
internal fun getJsonProperties(): Map<String, Any> = properties.mergeWith(
mapOf("type" to "particles")
)
operator fun plus(additive: Properties): TextRangeMaskParticles = TextRangeMaskParticles(
Properties(
color = additive.color ?: properties.color,
density = additive.density ?: properties.density,
isAnimated = additive.isAnimated ?: properties.isAnimated,
isEnabled = additive.isEnabled ?: properties.isEnabled,
particleSize = additive.particleSize ?: properties.particleSize,
)
)
data class Properties internal constructor(
/**
* Color of particles on the mask.
*/
val color: Property<Color>?,
/**
* Density of particles on the mask, interpreted as a probability of a particle to spawn in a given point on the mask.
* Default value: `0.8`.
*/
val density: Property<Double>?,
/**
* Defines whether particles on the mask will be animated or not. Animation looks like smooth random particle movements (telegram alike).
* Default value: `false`.
*/
val isAnimated: Property<Boolean>?,
/**
* Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
* Default value: `true`.
*/
val isEnabled: Property<Boolean>?,
/**
* Size of a single particle on a mask.
* Default value: `{"type":"fixed","value":1}`.
*/
val particleSize: Property<FixedSize>?,
) {
internal fun mergeWith(properties: Map<String, Any>): Map<String, Any> {
val result = mutableMapOf<String, Any>()
result.putAll(properties)
result.tryPutProperty("color", color)
result.tryPutProperty("density", density)
result.tryPutProperty("is_animated", isAnimated)
result.tryPutProperty("is_enabled", isEnabled)
result.tryPutProperty("particle_size", particleSize)
return result
}
}
}
/**
* @param color Color of particles on the mask.
* @param density Density of particles on the mask, interpreted as a probability of a particle to spawn in a given point on the mask.
* @param isAnimated Defines whether particles on the mask will be animated or not. Animation looks like smooth random particle movements (telegram alike).
* @param isEnabled Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
* @param particleSize Size of a single particle on a mask.
*/
@Generated
fun DivScope.textRangeMaskParticles(
`use named arguments`: Guard = Guard.instance,
color: Color? = null,
density: Double? = null,
isAnimated: Boolean? = null,
isEnabled: Boolean? = null,
particleSize: FixedSize? = null,
): TextRangeMaskParticles = TextRangeMaskParticles(
TextRangeMaskParticles.Properties(
color = valueOrNull(color),
density = valueOrNull(density),
isAnimated = valueOrNull(isAnimated),
isEnabled = valueOrNull(isEnabled),
particleSize = valueOrNull(particleSize),
)
)
/**
* @param color Color of particles on the mask.
* @param density Density of particles on the mask, interpreted as a probability of a particle to spawn in a given point on the mask.
* @param isAnimated Defines whether particles on the mask will be animated or not. Animation looks like smooth random particle movements (telegram alike).
* @param isEnabled Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
* @param particleSize Size of a single particle on a mask.
*/
@Generated
fun DivScope.textRangeMaskParticlesProps(
`use named arguments`: Guard = Guard.instance,
color: Color? = null,
density: Double? = null,
isAnimated: Boolean? = null,
isEnabled: Boolean? = null,
particleSize: FixedSize? = null,
) = TextRangeMaskParticles.Properties(
color = valueOrNull(color),
density = valueOrNull(density),
isAnimated = valueOrNull(isAnimated),
isEnabled = valueOrNull(isEnabled),
particleSize = valueOrNull(particleSize),
)
/**
* @param color Color of particles on the mask.
* @param density Density of particles on the mask, interpreted as a probability of a particle to spawn in a given point on the mask.
* @param isAnimated Defines whether particles on the mask will be animated or not. Animation looks like smooth random particle movements (telegram alike).
* @param isEnabled Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
* @param particleSize Size of a single particle on a mask.
*/
@Generated
fun TemplateScope.textRangeMaskParticlesRefs(
`use named arguments`: Guard = Guard.instance,
color: ReferenceProperty<Color>? = null,
density: ReferenceProperty<Double>? = null,
isAnimated: ReferenceProperty<Boolean>? = null,
isEnabled: ReferenceProperty<Boolean>? = null,
particleSize: ReferenceProperty<FixedSize>? = null,
) = TextRangeMaskParticles.Properties(
color = color,
density = density,
isAnimated = isAnimated,
isEnabled = isEnabled,
particleSize = particleSize,
)
/**
* @param color Color of particles on the mask.
* @param density Density of particles on the mask, interpreted as a probability of a particle to spawn in a given point on the mask.
* @param isAnimated Defines whether particles on the mask will be animated or not. Animation looks like smooth random particle movements (telegram alike).
* @param isEnabled Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
* @param particleSize Size of a single particle on a mask.
*/
@Generated
fun TextRangeMaskParticles.override(
`use named arguments`: Guard = Guard.instance,
color: Color? = null,
density: Double? = null,
isAnimated: Boolean? = null,
isEnabled: Boolean? = null,
particleSize: FixedSize? = null,
): TextRangeMaskParticles = TextRangeMaskParticles(
TextRangeMaskParticles.Properties(
color = valueOrNull(color) ?: properties.color,
density = valueOrNull(density) ?: properties.density,
isAnimated = valueOrNull(isAnimated) ?: properties.isAnimated,
isEnabled = valueOrNull(isEnabled) ?: properties.isEnabled,
particleSize = valueOrNull(particleSize) ?: properties.particleSize,
)
)
/**
* @param color Color of particles on the mask.
* @param density Density of particles on the mask, interpreted as a probability of a particle to spawn in a given point on the mask.
* @param isAnimated Defines whether particles on the mask will be animated or not. Animation looks like smooth random particle movements (telegram alike).
* @param isEnabled Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
* @param particleSize Size of a single particle on a mask.
*/
@Generated
fun TextRangeMaskParticles.defer(
`use named arguments`: Guard = Guard.instance,
color: ReferenceProperty<Color>? = null,
density: ReferenceProperty<Double>? = null,
isAnimated: ReferenceProperty<Boolean>? = null,
isEnabled: ReferenceProperty<Boolean>? = null,
particleSize: ReferenceProperty<FixedSize>? = null,
): TextRangeMaskParticles = TextRangeMaskParticles(
TextRangeMaskParticles.Properties(
color = color ?: properties.color,
density = density ?: properties.density,
isAnimated = isAnimated ?: properties.isAnimated,
isEnabled = isEnabled ?: properties.isEnabled,
particleSize = particleSize ?: properties.particleSize,
)
)
/**
* @param color Color of particles on the mask.
* @param density Density of particles on the mask, interpreted as a probability of a particle to spawn in a given point on the mask.
* @param isAnimated Defines whether particles on the mask will be animated or not. Animation looks like smooth random particle movements (telegram alike).
* @param isEnabled Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
*/
@Generated
fun TextRangeMaskParticles.evaluate(
`use named arguments`: Guard = Guard.instance,
color: ExpressionProperty<Color>? = null,
density: ExpressionProperty<Double>? = null,
isAnimated: ExpressionProperty<Boolean>? = null,
isEnabled: ExpressionProperty<Boolean>? = null,
): TextRangeMaskParticles = TextRangeMaskParticles(
TextRangeMaskParticles.Properties(
color = color ?: properties.color,
density = density ?: properties.density,
isAnimated = isAnimated ?: properties.isAnimated,
isEnabled = isEnabled ?: properties.isEnabled,
particleSize = properties.particleSize,
)
)
@Generated
fun TextRangeMaskParticles.asList() = listOf(this)
@@ -0,0 +1,158 @@
@file:Suppress(
"unused",
"UNUSED_PARAMETER",
)
package divkit.dsl
import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.fasterxml.jackson.annotation.JsonIgnore
import com.fasterxml.jackson.annotation.JsonValue
import divkit.dsl.annotation.*
import divkit.dsl.core.*
import divkit.dsl.scope.*
import kotlin.Any
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
/**
* A mask to hide text (spoiler) that looks like a rectangle filled with color specified by `color` parameter.
*
* Can be created using the method [textRangeMaskSolid].
*
* Required parameters: `type, color`.
*/
@Generated
data class TextRangeMaskSolid internal constructor(
@JsonIgnore
val properties: Properties,
) : TextRangeMask {
@JsonAnyGetter
internal fun getJsonProperties(): Map<String, Any> = properties.mergeWith(
mapOf("type" to "solid")
)
operator fun plus(additive: Properties): TextRangeMaskSolid = TextRangeMaskSolid(
Properties(
color = additive.color ?: properties.color,
isEnabled = additive.isEnabled ?: properties.isEnabled,
)
)
data class Properties internal constructor(
/**
* Color.
*/
val color: Property<Color>?,
/**
* Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
* Default value: `true`.
*/
val isEnabled: Property<Boolean>?,
) {
internal fun mergeWith(properties: Map<String, Any>): Map<String, Any> {
val result = mutableMapOf<String, Any>()
result.putAll(properties)
result.tryPutProperty("color", color)
result.tryPutProperty("is_enabled", isEnabled)
return result
}
}
}
/**
* @param color Color.
* @param isEnabled Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
*/
@Generated
fun DivScope.textRangeMaskSolid(
`use named arguments`: Guard = Guard.instance,
color: Color? = null,
isEnabled: Boolean? = null,
): TextRangeMaskSolid = TextRangeMaskSolid(
TextRangeMaskSolid.Properties(
color = valueOrNull(color),
isEnabled = valueOrNull(isEnabled),
)
)
/**
* @param color Color.
* @param isEnabled Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
*/
@Generated
fun DivScope.textRangeMaskSolidProps(
`use named arguments`: Guard = Guard.instance,
color: Color? = null,
isEnabled: Boolean? = null,
) = TextRangeMaskSolid.Properties(
color = valueOrNull(color),
isEnabled = valueOrNull(isEnabled),
)
/**
* @param color Color.
* @param isEnabled Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
*/
@Generated
fun TemplateScope.textRangeMaskSolidRefs(
`use named arguments`: Guard = Guard.instance,
color: ReferenceProperty<Color>? = null,
isEnabled: ReferenceProperty<Boolean>? = null,
) = TextRangeMaskSolid.Properties(
color = color,
isEnabled = isEnabled,
)
/**
* @param color Color.
* @param isEnabled Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
*/
@Generated
fun TextRangeMaskSolid.override(
`use named arguments`: Guard = Guard.instance,
color: Color? = null,
isEnabled: Boolean? = null,
): TextRangeMaskSolid = TextRangeMaskSolid(
TextRangeMaskSolid.Properties(
color = valueOrNull(color) ?: properties.color,
isEnabled = valueOrNull(isEnabled) ?: properties.isEnabled,
)
)
/**
* @param color Color.
* @param isEnabled Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
*/
@Generated
fun TextRangeMaskSolid.defer(
`use named arguments`: Guard = Guard.instance,
color: ReferenceProperty<Color>? = null,
isEnabled: ReferenceProperty<Boolean>? = null,
): TextRangeMaskSolid = TextRangeMaskSolid(
TextRangeMaskSolid.Properties(
color = color ?: properties.color,
isEnabled = isEnabled ?: properties.isEnabled,
)
)
/**
* @param color Color.
* @param isEnabled Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.
*/
@Generated
fun TextRangeMaskSolid.evaluate(
`use named arguments`: Guard = Guard.instance,
color: ExpressionProperty<Color>? = null,
isEnabled: ExpressionProperty<Boolean>? = null,
): TextRangeMaskSolid = TextRangeMaskSolid(
TextRangeMaskSolid.Properties(
color = color ?: properties.color,
isEnabled = isEnabled ?: properties.isEnabled,
)
)
@Generated
fun TextRangeMaskSolid.asList() = listOf(this)
+1 -1
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pydivkit"
version = "30.28.0"
version = "30.29.0"
description = "DivKit python library"
readme = "README.md"
repository = "https://github.com/divkit/divkit/tree/main/json-builder/python"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@divkitframework/jsonbuilder",
"version": "30.28.0",
"version": "30.29.0",
"description": "DivKit TypeScript JSON Builder",
"main": "./dist/jsonbuilder.js",
"module": "./dist/es/jsonbuilder.js",
+1 -1
View File
@@ -1 +1 @@
30.28.0
30.29.0