From 4ddd639bd41d48c58f80ee810437fb54be9f65bf Mon Sep 17 00:00:00 2001 From: robot-divkit Date: Wed, 27 Nov 2024 15:15:54 +0300 Subject: [PATCH] Updated version to 30.29.0 commit_hash:94dff4290fa0fb36a9d91c1bb488e08f43a8ba59 --- .mapping.json | 4 + client/ios/Configurations/Version.xcconfig | 2 +- client/ios/DivKit/DivKitInfo.swift | 2 +- client/web/divkit/package.json | 2 +- .../kotlin/divkit/dsl/ActionScrollBy.kt | 32 +-- .../kotlin/divkit/dsl/ActionScrollTo.kt | 14 +- .../generated/kotlin/divkit/dsl/EnumValues.kt | 11 +- .../kotlin/divkit/dsl/OffsetDestination.kt | 16 +- .../src/generated/kotlin/divkit/dsl/Switch.kt | 20 +- .../src/generated/kotlin/divkit/dsl/Text.kt | 91 ++++++- .../kotlin/divkit/dsl/TextRangeMask.kt | 27 ++ .../kotlin/divkit/dsl/TextRangeMaskBase.kt | 128 ++++++++++ .../divkit/dsl/TextRangeMaskParticles.kt | 231 ++++++++++++++++++ .../kotlin/divkit/dsl/TextRangeMaskSolid.kt | 158 ++++++++++++ json-builder/python/pyproject.toml | 2 +- json-builder/typescript/package.json | 2 +- version | 2 +- 17 files changed, 686 insertions(+), 58 deletions(-) create mode 100644 json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMask.kt create mode 100644 json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMaskBase.kt create mode 100644 json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMaskParticles.kt create mode 100644 json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMaskSolid.kt diff --git a/.mapping.json b/.mapping.json index 630d6f2b5..02da6671f 100644 --- a/.mapping.json +++ b/.mapping.json @@ -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", diff --git a/client/ios/Configurations/Version.xcconfig b/client/ios/Configurations/Version.xcconfig index 2616adcef..e860d4a35 100644 --- a/client/ios/Configurations/Version.xcconfig +++ b/client/ios/Configurations/Version.xcconfig @@ -1,2 +1,2 @@ -MARKETING_VERSION = 30.28.0 +MARKETING_VERSION = 30.29.0 CURRENT_PROJECT_VERSION = 30 diff --git a/client/ios/DivKit/DivKitInfo.swift b/client/ios/DivKit/DivKitInfo.swift index fd4d5a119..9d2ad3c83 100644 --- a/client/ios/DivKit/DivKitInfo.swift +++ b/client/ios/DivKit/DivKitInfo.swift @@ -1,3 +1,3 @@ public enum DivKitInfo { - public static let version = "30.28.0" + public static let version = "30.29.0" } diff --git a/client/web/divkit/package.json b/client/web/divkit/package.json index 16da7b6e1..09fa02483 100644 --- a/client/web/divkit/package.json +++ b/client/web/divkit/package.json @@ -1,6 +1,6 @@ { "name": "@divkitframework/divkit", - "version": "30.28.0", + "version": "30.29.0", "description": "DivKit for the web", "keywords": [ "server-driven-ui", diff --git a/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionScrollBy.kt b/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionScrollBy.kt index f5a64a694..3909c6efe 100644 --- a/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionScrollBy.kt +++ b/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionScrollBy.kt @@ -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?, /** - * 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?, /** - * Defines navigation behavior at boundary elements:
  • 'clamp': Stop navigation at the boundary element (default)
  • 'ring': Navigate to the start or end, depending on the current element.
  • + * Defines navigation behavior at boundary elements:
  • `clamp`: Stop navigation at the boundary element (default)
  • `ring`: Navigate to the start or end, depending on the current element.
  • * Default value: `clamp`. */ val overflow: Property?, @@ -83,7 +83,7 @@ data class ActionScrollBy internal constructor( } /** - * Defines navigation behavior at boundary elements:
  • 'clamp': Stop navigation at the boundary element (default)
  • 'ring': Navigate to the start or end, depending on the current element.
  • + * Defines navigation behavior at boundary elements:
  • `clamp`: Stop navigation at the boundary element (default)
  • `ring`: Navigate to the start or end, depending on the current element.
  • * * 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:
  • 'clamp': Stop navigation at the boundary element (default)
  • 'ring': Navigate to the start or end, depending on the current element.
  • + * @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:
  • `clamp`: Stop navigation at the boundary element (default)
  • `ring`: Navigate to the start or end, depending on the current element.
  • */ @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:
  • 'clamp': Stop navigation at the boundary element (default)
  • 'ring': Navigate to the start or end, depending on the current element.
  • + * @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:
  • `clamp`: Stop navigation at the boundary element (default)
  • `ring`: Navigate to the start or end, depending on the current element.
  • */ @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:
  • 'clamp': Stop navigation at the boundary element (default)
  • 'ring': Navigate to the start or end, depending on the current element.
  • + * @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:
  • `clamp`: Stop navigation at the boundary element (default)
  • `ring`: Navigate to the start or end, depending on the current element.
  • */ @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:
  • 'clamp': Stop navigation at the boundary element (default)
  • 'ring': Navigate to the start or end, depending on the current element.
  • + * @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:
  • `clamp`: Stop navigation at the boundary element (default)
  • `ring`: Navigate to the start or end, depending on the current element.
  • */ @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:
  • 'clamp': Stop navigation at the boundary element (default)
  • 'ring': Navigate to the start or end, depending on the current element.
  • + * @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:
  • `clamp`: Stop navigation at the boundary element (default)
  • `ring`: Navigate to the start or end, depending on the current element.
  • */ @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:
  • 'clamp': Stop navigation at the boundary element (default)
  • 'ring': Navigate to the start or end, depending on the current element.
  • + * @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:
  • `clamp`: Stop navigation at the boundary element (default)
  • `ring`: Navigate to the start or end, depending on the current element.
  • */ @Generated fun ActionScrollBy.evaluate( diff --git a/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionScrollTo.kt b/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionScrollTo.kt index 5dbe7cb9b..500b3f6f9 100644 --- a/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionScrollTo.kt +++ b/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionScrollTo.kt @@ -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?, /** - * Defines the scrolling end position:
  • 'index': Scroll to the element with the index provided in 'value'
  • 'offset': Scroll to the position specified in 'value' and measured in 'dp' from the start of the container. Applies only in 'gallery';
  • 'start': Scroll to the container start;
  • 'end': Scroll to the container end.
  • + * Defines the scrolling end position:
  • `index`: Scroll to the element with the index provided in `value`
  • `offset`: Scroll to the position specified in `value` and measured in `dp` from the start of the container. Applies only in `gallery`;
  • `start`: Scroll to the container start;
  • `end`: Scroll to the container end.
  • */ val destination: Property?, /** @@ -70,7 +70,7 @@ data class ActionScrollTo internal constructor( /** * @param animated Enables scrolling animation. - * @param destination Defines the scrolling end position:
  • 'index': Scroll to the element with the index provided in 'value'
  • 'offset': Scroll to the position specified in 'value' and measured in 'dp' from the start of the container. Applies only in 'gallery';
  • 'start': Scroll to the container start;
  • 'end': Scroll to the container end.
  • + * @param destination Defines the scrolling end position:
  • `index`: Scroll to the element with the index provided in `value`
  • `offset`: Scroll to the position specified in `value` and measured in `dp` from the start of the container. Applies only in `gallery`;
  • `start`: Scroll to the container start;
  • `end`: Scroll to the container end.
  • * @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:
  • 'index': Scroll to the element with the index provided in 'value'
  • 'offset': Scroll to the position specified in 'value' and measured in 'dp' from the start of the container. Applies only in 'gallery';
  • 'start': Scroll to the container start;
  • 'end': Scroll to the container end.
  • + * @param destination Defines the scrolling end position:
  • `index`: Scroll to the element with the index provided in `value`
  • `offset`: Scroll to the position specified in `value` and measured in `dp` from the start of the container. Applies only in `gallery`;
  • `start`: Scroll to the container start;
  • `end`: Scroll to the container end.
  • * @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:
  • 'index': Scroll to the element with the index provided in 'value'
  • 'offset': Scroll to the position specified in 'value' and measured in 'dp' from the start of the container. Applies only in 'gallery';
  • 'start': Scroll to the container start;
  • 'end': Scroll to the container end.
  • + * @param destination Defines the scrolling end position:
  • `index`: Scroll to the element with the index provided in `value`
  • `offset`: Scroll to the position specified in `value` and measured in `dp` from the start of the container. Applies only in `gallery`;
  • `start`: Scroll to the container start;
  • `end`: Scroll to the container end.
  • * @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:
  • 'index': Scroll to the element with the index provided in 'value'
  • 'offset': Scroll to the position specified in 'value' and measured in 'dp' from the start of the container. Applies only in 'gallery';
  • 'start': Scroll to the container start;
  • 'end': Scroll to the container end.
  • + * @param destination Defines the scrolling end position:
  • `index`: Scroll to the element with the index provided in `value`
  • `offset`: Scroll to the position specified in `value` and measured in `dp` from the start of the container. Applies only in `gallery`;
  • `start`: Scroll to the container start;
  • `end`: Scroll to the container end.
  • * @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:
  • 'index': Scroll to the element with the index provided in 'value'
  • 'offset': Scroll to the position specified in 'value' and measured in 'dp' from the start of the container. Applies only in 'gallery';
  • 'start': Scroll to the container start;
  • 'end': Scroll to the container end.
  • + * @param destination Defines the scrolling end position:
  • `index`: Scroll to the element with the index provided in `value`
  • `offset`: Scroll to the position specified in `value` and measured in `dp` from the start of the container. Applies only in `gallery`;
  • `start`: Scroll to the container start;
  • `end`: Scroll to the container end.
  • * @param id ID of the element where the action should be performed. */ @Generated diff --git a/json-builder/kotlin/src/generated/kotlin/divkit/dsl/EnumValues.kt b/json-builder/kotlin/src/generated/kotlin/divkit/dsl/EnumValues.kt index a5248e700..0957b1a67 100644 --- a/json-builder/kotlin/src/generated/kotlin/divkit/dsl/EnumValues.kt +++ b/json-builder/kotlin/src/generated/kotlin/divkit/dsl/EnumValues.kt @@ -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 diff --git a/json-builder/kotlin/src/generated/kotlin/divkit/dsl/OffsetDestination.kt b/json-builder/kotlin/src/generated/kotlin/divkit/dsl/OffsetDestination.kt index 192797ee1..baccf7580 100644 --- a/json-builder/kotlin/src/generated/kotlin/divkit/dsl/OffsetDestination.kt +++ b/json-builder/kotlin/src/generated/kotlin/divkit/dsl/OffsetDestination.kt @@ -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?, ) { @@ -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( diff --git a/json-builder/kotlin/src/generated/kotlin/divkit/dsl/Switch.kt b/json-builder/kotlin/src/generated/kotlin/divkit/dsl/Switch.kt index 392b5b567..8a7cb042c 100644 --- a/json-builder/kotlin/src/generated/kotlin/divkit/dsl/Switch.kt +++ b/json-builder/kotlin/src/generated/kotlin/divkit/dsl/Switch.kt @@ -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?, /** @@ -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.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.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. diff --git a/json-builder/kotlin/src/generated/kotlin/divkit/dsl/Text.kt b/json-builder/kotlin/src/generated/kotlin/divkit/dsl/Text.kt index 1934d37cd..edf0717b3 100644 --- a/json-builder/kotlin/src/generated/kotlin/divkit/dsl/Text.kt +++ b/json-builder/kotlin/src/generated/kotlin/divkit/dsl/Text.kt @@ -327,7 +327,7 @@ data class Text internal constructor( */ val textShadow: Property?, /** - * 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?, @@ -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?, + /** + * 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?, /** * 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?, + /** + * A mask that hides a part of text, text can be revealed by disabling mask through `is_enabled` property. + */ + val mask: Property?, /** * 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.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.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? = null, alignmentVertical: ReferenceProperty? = null, height: ReferenceProperty? = null, + indexingDirection: ReferenceProperty? = null, preloadRequired: ReferenceProperty? = null, start: ReferenceProperty? = null, tintColor: ReferenceProperty? = 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? = null, alignmentVertical: ReferenceProperty? = null, height: ReferenceProperty? = null, + indexingDirection: ReferenceProperty? = null, preloadRequired: ReferenceProperty? = null, start: ReferenceProperty? = null, tintColor: ReferenceProperty? = 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? = null, + indexingDirection: ExpressionProperty? = null, preloadRequired: ExpressionProperty? = null, start: ExpressionProperty? = null, tintColor: ExpressionProperty? = 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? = null, letterSpacing: ReferenceProperty? = null, lineHeight: ReferenceProperty? = null, + mask: ReferenceProperty? = null, start: ReferenceProperty? = null, strike: ReferenceProperty? = null, textColor: ReferenceProperty? = 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? = null, letterSpacing: ReferenceProperty? = null, lineHeight: ReferenceProperty? = null, + mask: ReferenceProperty? = null, start: ReferenceProperty? = null, strike: ReferenceProperty? = null, textColor: ReferenceProperty? = 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, diff --git a/json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMask.kt b/json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMask.kt new file mode 100644 index 000000000..c3651c654 --- /dev/null +++ b/json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMask.kt @@ -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) diff --git a/json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMaskBase.kt b/json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMaskBase.kt new file mode 100644 index 000000000..b0cb76be1 --- /dev/null +++ b/json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMaskBase.kt @@ -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 = 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?, + ) { + internal fun mergeWith(properties: Map): Map { + val result = mutableMapOf() + 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? = 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? = 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? = null, +): TextRangeMaskBase = TextRangeMaskBase( + TextRangeMaskBase.Properties( + isEnabled = isEnabled ?: properties.isEnabled, + ) +) + +@Generated +fun TextRangeMaskBase.asList() = listOf(this) diff --git a/json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMaskParticles.kt b/json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMaskParticles.kt new file mode 100644 index 000000000..d58194c43 --- /dev/null +++ b/json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMaskParticles.kt @@ -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 = 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?, + /** + * 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?, + /** + * 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?, + /** + * 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?, + /** + * Size of a single particle on a mask. + * Default value: `{"type":"fixed","value":1}`. + */ + val particleSize: Property?, + ) { + internal fun mergeWith(properties: Map): Map { + val result = mutableMapOf() + 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? = null, + density: ReferenceProperty? = null, + isAnimated: ReferenceProperty? = null, + isEnabled: ReferenceProperty? = null, + particleSize: ReferenceProperty? = 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? = null, + density: ReferenceProperty? = null, + isAnimated: ReferenceProperty? = null, + isEnabled: ReferenceProperty? = null, + particleSize: ReferenceProperty? = 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? = null, + density: ExpressionProperty? = null, + isAnimated: ExpressionProperty? = null, + isEnabled: ExpressionProperty? = 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) diff --git a/json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMaskSolid.kt b/json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMaskSolid.kt new file mode 100644 index 000000000..365ebd762 --- /dev/null +++ b/json-builder/kotlin/src/generated/kotlin/divkit/dsl/TextRangeMaskSolid.kt @@ -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 = 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?, + /** + * 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?, + ) { + internal fun mergeWith(properties: Map): Map { + val result = mutableMapOf() + 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? = null, + isEnabled: ReferenceProperty? = 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? = null, + isEnabled: ReferenceProperty? = 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? = null, + isEnabled: ExpressionProperty? = null, +): TextRangeMaskSolid = TextRangeMaskSolid( + TextRangeMaskSolid.Properties( + color = color ?: properties.color, + isEnabled = isEnabled ?: properties.isEnabled, + ) +) + +@Generated +fun TextRangeMaskSolid.asList() = listOf(this) diff --git a/json-builder/python/pyproject.toml b/json-builder/python/pyproject.toml index 0499a99f3..3014f221d 100644 --- a/json-builder/python/pyproject.toml +++ b/json-builder/python/pyproject.toml @@ -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" diff --git a/json-builder/typescript/package.json b/json-builder/typescript/package.json index 6450709dc..e42430c06 100644 --- a/json-builder/typescript/package.json +++ b/json-builder/typescript/package.json @@ -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", diff --git a/version b/version index 416da2cce..c6492e6b6 100644 --- a/version +++ b/version @@ -1 +1 @@ -30.28.0 +30.29.0