Updated version to 30.21.0

commit_hash:1bbb33f6930524b12ab368c914c102e842e4e819
This commit is contained in:
robot-divkit
2024-10-02 12:43:09 +03:00
parent 500f007bfd
commit a3e17639e9
23 changed files with 1095 additions and 385 deletions
+8 -1
View File
@@ -16643,7 +16643,11 @@
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionDownload.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionDownload.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionFocusElement.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionFocusElement.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionHideTooltip.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionHideTooltip.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionScrollBy.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionScrollBy.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionScrollDestination.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionScrollDestination.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionScrollTo.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionScrollTo.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionSetState.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionSetState.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionSetStoredValue.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionSetStoredValue.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionSetVariable.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionSetVariable.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionShowTooltip.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionShowTooltip.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionTimer.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ActionTimer.kt",
@@ -16655,7 +16659,6 @@
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/AnimationDirection.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/AnimationDirection.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/AnimationInterpolator.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/AnimationInterpolator.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/Animator.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/Animator.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/AnimatorBase.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/AnimatorBase.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/AppearanceSetTransition.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/AppearanceSetTransition.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/AppearanceTransition.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/AppearanceTransition.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/ArrayValue.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ArrayValue.kt",
@@ -16694,6 +16697,7 @@
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/DownloadCallbacks.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/DownloadCallbacks.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/Drawable.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/Drawable.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/EdgeInsets.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/EdgeInsets.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/EndDestination.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/EndDestination.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/EnumValues.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/EnumValues.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/EvaluableType.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/EvaluableType.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/Extension.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/Extension.kt",
@@ -16713,6 +16717,7 @@
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/Image.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/Image.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/ImageBackground.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ImageBackground.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/ImageScale.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/ImageScale.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/IndexDestination.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/IndexDestination.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/Indicator.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/Indicator.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/IndicatorItemPlacement.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/IndicatorItemPlacement.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/InfinityCount.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/InfinityCount.kt",
@@ -16736,6 +16741,7 @@
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/NumberAnimator.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/NumberAnimator.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/NumberValue.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/NumberValue.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/NumberVariable.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/NumberVariable.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/OffsetDestination.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/OffsetDestination.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/PageSize.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/PageSize.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/PageTransformation.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/PageTransformation.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/PageTransformationOverlap.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/PageTransformationOverlap.kt",
@@ -16767,6 +16773,7 @@
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/SlideTransition.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/SlideTransition.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/Slider.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/Slider.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/SolidBackground.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/SolidBackground.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/StartDestination.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/StartDestination.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/State.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/State.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/StretchIndicatorItemPlacement.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/StretchIndicatorItemPlacement.kt",
"json-builder/kotlin/src/generated/kotlin/divkit/dsl/StringValue.kt":"divkit/public/json-builder/kotlin/src/generated/kotlin/divkit/dsl/StringValue.kt",
+1 -1
View File
@@ -1,2 +1,2 @@
MARKETING_VERSION = 30.20.0
MARKETING_VERSION = 30.21.0
CURRENT_PROJECT_VERSION = 30
+1 -1
View File
@@ -1,3 +1,3 @@
public enum DivKitInfo {
public static let version = "30.20.0"
public static let version = "30.21.0"
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@divkitframework/divkit",
"version": "30.20.0",
"version": "30.21.0",
"description": "DivKit for the web",
"keywords": [
"server-driven-ui",
@@ -69,9 +69,9 @@ class ActionAnimatorStart internal constructor(
*/
val interpolator: Property<AnimationInterpolator>?,
/**
* The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* The number of times the animation will repeat before it finishes.
*/
val repeatCount: Property<Int>?,
val repeatCount: Property<Count>?,
/**
* Animation start delay in milliseconds.
*/
@@ -103,7 +103,7 @@ class ActionAnimatorStart internal constructor(
* @param duration Animation duration in milliseconds.
* @param endValue Overrides value that will be set at the end of animation.
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param repeatCount The number of times the animation will repeat before it finishes.
* @param startDelay Animation start delay in milliseconds.
* @param startValue Overrides value that will be set at the start of animation.
*/
@@ -115,7 +115,7 @@ fun DivScope.actionAnimatorStart(
duration: Long? = null,
endValue: TypedValue? = null,
interpolator: AnimationInterpolator? = null,
repeatCount: Int? = null,
repeatCount: Count? = null,
startDelay: Int? = null,
startValue: TypedValue? = null,
): ActionAnimatorStart = ActionAnimatorStart(
@@ -137,7 +137,7 @@ fun DivScope.actionAnimatorStart(
* @param duration Animation duration in milliseconds.
* @param endValue Overrides value that will be set at the end of animation.
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param repeatCount The number of times the animation will repeat before it finishes.
* @param startDelay Animation start delay in milliseconds.
* @param startValue Overrides value that will be set at the start of animation.
*/
@@ -149,7 +149,7 @@ fun DivScope.actionAnimatorStartProps(
duration: Long? = null,
endValue: TypedValue? = null,
interpolator: AnimationInterpolator? = null,
repeatCount: Int? = null,
repeatCount: Count? = null,
startDelay: Int? = null,
startValue: TypedValue? = null,
) = ActionAnimatorStart.Properties(
@@ -169,7 +169,7 @@ fun DivScope.actionAnimatorStartProps(
* @param duration Animation duration in milliseconds.
* @param endValue Overrides value that will be set at the end of animation.
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param repeatCount The number of times the animation will repeat before it finishes.
* @param startDelay Animation start delay in milliseconds.
* @param startValue Overrides value that will be set at the start of animation.
*/
@@ -181,7 +181,7 @@ fun TemplateScope.actionAnimatorStartRefs(
duration: ReferenceProperty<Long>? = null,
endValue: ReferenceProperty<TypedValue>? = null,
interpolator: ReferenceProperty<AnimationInterpolator>? = null,
repeatCount: ReferenceProperty<Int>? = null,
repeatCount: ReferenceProperty<Count>? = null,
startDelay: ReferenceProperty<Int>? = null,
startValue: ReferenceProperty<TypedValue>? = null,
) = ActionAnimatorStart.Properties(
@@ -201,7 +201,7 @@ fun TemplateScope.actionAnimatorStartRefs(
* @param duration Animation duration in milliseconds.
* @param endValue Overrides value that will be set at the end of animation.
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param repeatCount The number of times the animation will repeat before it finishes.
* @param startDelay Animation start delay in milliseconds.
* @param startValue Overrides value that will be set at the start of animation.
*/
@@ -213,7 +213,7 @@ fun ActionAnimatorStart.override(
duration: Long? = null,
endValue: TypedValue? = null,
interpolator: AnimationInterpolator? = null,
repeatCount: Int? = null,
repeatCount: Count? = null,
startDelay: Int? = null,
startValue: TypedValue? = null,
): ActionAnimatorStart = ActionAnimatorStart(
@@ -235,7 +235,7 @@ fun ActionAnimatorStart.override(
* @param duration Animation duration in milliseconds.
* @param endValue Overrides value that will be set at the end of animation.
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param repeatCount The number of times the animation will repeat before it finishes.
* @param startDelay Animation start delay in milliseconds.
* @param startValue Overrides value that will be set at the start of animation.
*/
@@ -247,7 +247,7 @@ fun ActionAnimatorStart.defer(
duration: ReferenceProperty<Long>? = null,
endValue: ReferenceProperty<TypedValue>? = null,
interpolator: ReferenceProperty<AnimationInterpolator>? = null,
repeatCount: ReferenceProperty<Int>? = null,
repeatCount: ReferenceProperty<Count>? = null,
startDelay: ReferenceProperty<Int>? = null,
startValue: ReferenceProperty<TypedValue>? = null,
): ActionAnimatorStart = ActionAnimatorStart(
@@ -264,30 +264,26 @@ fun ActionAnimatorStart.defer(
)
/**
* @param animatorId The identifier of the animator being started.
* @param direction Animation direction. This property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward.
* @param duration Animation duration in milliseconds.
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param startDelay Animation start delay in milliseconds.
*/
@Generated
fun ActionAnimatorStart.evaluate(
`use named arguments`: Guard = Guard.instance,
animatorId: ExpressionProperty<String>? = null,
direction: ExpressionProperty<AnimationDirection>? = null,
duration: ExpressionProperty<Long>? = null,
interpolator: ExpressionProperty<AnimationInterpolator>? = null,
repeatCount: ExpressionProperty<Int>? = null,
startDelay: ExpressionProperty<Int>? = null,
): ActionAnimatorStart = ActionAnimatorStart(
ActionAnimatorStart.Properties(
animatorId = animatorId ?: properties.animatorId,
animatorId = properties.animatorId,
direction = direction ?: properties.direction,
duration = duration ?: properties.duration,
endValue = properties.endValue,
interpolator = interpolator ?: properties.interpolator,
repeatCount = repeatCount ?: properties.repeatCount,
repeatCount = properties.repeatCount,
startDelay = startDelay ?: properties.startDelay,
startValue = properties.startValue,
)
@@ -41,6 +41,9 @@ class ActionAnimatorStop internal constructor(
)
class Properties internal constructor(
/**
* The identifier of the animator being stopped.
*/
val animatorId: Property<String>?,
) {
internal fun mergeWith(properties: Map<String, Any>): Map<String, Any> {
@@ -52,6 +55,9 @@ class ActionAnimatorStop internal constructor(
}
}
/**
* @param animatorId The identifier of the animator being stopped.
*/
@Generated
fun DivScope.actionAnimatorStop(
`use named arguments`: Guard = Guard.instance,
@@ -62,6 +68,9 @@ fun DivScope.actionAnimatorStop(
)
)
/**
* @param animatorId The identifier of the animator being stopped.
*/
@Generated
fun DivScope.actionAnimatorStopProps(
`use named arguments`: Guard = Guard.instance,
@@ -70,6 +79,9 @@ fun DivScope.actionAnimatorStopProps(
animatorId = valueOrNull(animatorId),
)
/**
* @param animatorId The identifier of the animator being stopped.
*/
@Generated
fun TemplateScope.actionAnimatorStopRefs(
`use named arguments`: Guard = Guard.instance,
@@ -78,6 +90,9 @@ fun TemplateScope.actionAnimatorStopRefs(
animatorId = animatorId,
)
/**
* @param animatorId The identifier of the animator being stopped.
*/
@Generated
fun ActionAnimatorStop.override(
`use named arguments`: Guard = Guard.instance,
@@ -88,6 +103,9 @@ fun ActionAnimatorStop.override(
)
)
/**
* @param animatorId The identifier of the animator being stopped.
*/
@Generated
fun ActionAnimatorStop.defer(
`use named arguments`: Guard = Guard.instance,
@@ -98,15 +116,5 @@ fun ActionAnimatorStop.defer(
)
)
@Generated
fun ActionAnimatorStop.evaluate(
`use named arguments`: Guard = Guard.instance,
animatorId: ExpressionProperty<String>? = null,
): ActionAnimatorStop = ActionAnimatorStop(
ActionAnimatorStop.Properties(
animatorId = animatorId ?: properties.animatorId,
)
)
@Generated
fun ActionAnimatorStop.asList() = listOf(this)
@@ -0,0 +1,244 @@
@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
/**
* Scrolls scrollable container from current position by `item_count` or by `offset`, if both provided scroll action will be combined, negative numbers associated with backward scroll.
*
* Can be created using the method [actionScrollBy].
*
* Required parameters: `type, id`.
*/
@Generated
class ActionScrollBy internal constructor(
@JsonIgnore
val properties: Properties,
) : ActionTyped {
@JsonAnyGetter
internal fun getJsonProperties(): Map<String, Any> = properties.mergeWith(
mapOf("type" to "scroll_by")
)
operator fun plus(additive: Properties): ActionScrollBy = ActionScrollBy(
Properties(
animated = additive.animated ?: properties.animated,
id = additive.id ?: properties.id,
itemCount = additive.itemCount ?: properties.itemCount,
offset = additive.offset ?: properties.offset,
overflow = additive.overflow ?: properties.overflow,
)
)
class Properties internal constructor(
/**
* If `true` (default value) scroll will be animated, else not.
* Default value: `true`.
*/
val animated: Property<Boolean>?,
/**
* Identifier of the view that is going to be manipulated.
*/
val id: Property<String>?,
/**
* Count of container items to scroll, negative value is associated with backward scroll.
* Default value: `0`.
*/
val itemCount: Property<Int>?,
/**
* Distance to scroll measured in `dp` from current position, negative value is associated with backward scroll. Applicable only in `gallery`.
* Default value: `0`.
*/
val offset: Property<Int>?,
/**
* Specifies how navigation will occur when the boundary elements are reached:<li>`clamp` — Transition will stop at the boundary element (default value);</li><li>`ring` — Transition will be to the beginning or the end depending on the current element.</li>
* Default value: `clamp`.
*/
val overflow: Property<Overflow>?,
) {
internal fun mergeWith(properties: Map<String, Any>): Map<String, Any> {
val result = mutableMapOf<String, Any>()
result.putAll(properties)
result.tryPutProperty("animated", animated)
result.tryPutProperty("id", id)
result.tryPutProperty("item_count", itemCount)
result.tryPutProperty("offset", offset)
result.tryPutProperty("overflow", overflow)
return result
}
}
/**
* Specifies how navigation will occur when the boundary elements are reached:<li>`clamp` — Transition will stop at the boundary element (default value);</li><li>`ring` — Transition will be to the beginning or the end depending on the current element.</li>
*
* Possible values: [clamp], [ring].
*/
@Generated
sealed interface Overflow
}
/**
* @param animated If `true` (default value) scroll will be animated, else not.
* @param id Identifier of the view that is going to be manipulated.
* @param itemCount Count of container items to scroll, negative value is associated with backward scroll.
* @param offset Distance to scroll measured in `dp` from current position, negative value is associated with backward scroll. Applicable only in `gallery`.
* @param overflow Specifies how navigation will occur when the boundary elements are reached:<li>`clamp` — Transition will stop at the boundary element (default value);</li><li>`ring` — Transition will be to the beginning or the end depending on the current element.</li>
*/
@Generated
fun DivScope.actionScrollBy(
`use named arguments`: Guard = Guard.instance,
animated: Boolean? = null,
id: String? = null,
itemCount: Int? = null,
offset: Int? = null,
overflow: ActionScrollBy.Overflow? = null,
): ActionScrollBy = ActionScrollBy(
ActionScrollBy.Properties(
animated = valueOrNull(animated),
id = valueOrNull(id),
itemCount = valueOrNull(itemCount),
offset = valueOrNull(offset),
overflow = valueOrNull(overflow),
)
)
/**
* @param animated If `true` (default value) scroll will be animated, else not.
* @param id Identifier of the view that is going to be manipulated.
* @param itemCount Count of container items to scroll, negative value is associated with backward scroll.
* @param offset Distance to scroll measured in `dp` from current position, negative value is associated with backward scroll. Applicable only in `gallery`.
* @param overflow Specifies how navigation will occur when the boundary elements are reached:<li>`clamp` — Transition will stop at the boundary element (default value);</li><li>`ring` — Transition will be to the beginning or the end depending on the current element.</li>
*/
@Generated
fun DivScope.actionScrollByProps(
`use named arguments`: Guard = Guard.instance,
animated: Boolean? = null,
id: String? = null,
itemCount: Int? = null,
offset: Int? = null,
overflow: ActionScrollBy.Overflow? = null,
) = ActionScrollBy.Properties(
animated = valueOrNull(animated),
id = valueOrNull(id),
itemCount = valueOrNull(itemCount),
offset = valueOrNull(offset),
overflow = valueOrNull(overflow),
)
/**
* @param animated If `true` (default value) scroll will be animated, else not.
* @param id Identifier of the view that is going to be manipulated.
* @param itemCount Count of container items to scroll, negative value is associated with backward scroll.
* @param offset Distance to scroll measured in `dp` from current position, negative value is associated with backward scroll. Applicable only in `gallery`.
* @param overflow Specifies how navigation will occur when the boundary elements are reached:<li>`clamp` — Transition will stop at the boundary element (default value);</li><li>`ring` — Transition will be to the beginning or the end depending on the current element.</li>
*/
@Generated
fun TemplateScope.actionScrollByRefs(
`use named arguments`: Guard = Guard.instance,
animated: ReferenceProperty<Boolean>? = null,
id: ReferenceProperty<String>? = null,
itemCount: ReferenceProperty<Int>? = null,
offset: ReferenceProperty<Int>? = null,
overflow: ReferenceProperty<ActionScrollBy.Overflow>? = null,
) = ActionScrollBy.Properties(
animated = animated,
id = id,
itemCount = itemCount,
offset = offset,
overflow = overflow,
)
/**
* @param animated If `true` (default value) scroll will be animated, else not.
* @param id Identifier of the view that is going to be manipulated.
* @param itemCount Count of container items to scroll, negative value is associated with backward scroll.
* @param offset Distance to scroll measured in `dp` from current position, negative value is associated with backward scroll. Applicable only in `gallery`.
* @param overflow Specifies how navigation will occur when the boundary elements are reached:<li>`clamp` — Transition will stop at the boundary element (default value);</li><li>`ring` — Transition will be to the beginning or the end depending on the current element.</li>
*/
@Generated
fun ActionScrollBy.override(
`use named arguments`: Guard = Guard.instance,
animated: Boolean? = null,
id: String? = null,
itemCount: Int? = null,
offset: Int? = null,
overflow: ActionScrollBy.Overflow? = null,
): ActionScrollBy = ActionScrollBy(
ActionScrollBy.Properties(
animated = valueOrNull(animated) ?: properties.animated,
id = valueOrNull(id) ?: properties.id,
itemCount = valueOrNull(itemCount) ?: properties.itemCount,
offset = valueOrNull(offset) ?: properties.offset,
overflow = valueOrNull(overflow) ?: properties.overflow,
)
)
/**
* @param animated If `true` (default value) scroll will be animated, else not.
* @param id Identifier of the view that is going to be manipulated.
* @param itemCount Count of container items to scroll, negative value is associated with backward scroll.
* @param offset Distance to scroll measured in `dp` from current position, negative value is associated with backward scroll. Applicable only in `gallery`.
* @param overflow Specifies how navigation will occur when the boundary elements are reached:<li>`clamp` — Transition will stop at the boundary element (default value);</li><li>`ring` — Transition will be to the beginning or the end depending on the current element.</li>
*/
@Generated
fun ActionScrollBy.defer(
`use named arguments`: Guard = Guard.instance,
animated: ReferenceProperty<Boolean>? = null,
id: ReferenceProperty<String>? = null,
itemCount: ReferenceProperty<Int>? = null,
offset: ReferenceProperty<Int>? = null,
overflow: ReferenceProperty<ActionScrollBy.Overflow>? = null,
): ActionScrollBy = ActionScrollBy(
ActionScrollBy.Properties(
animated = animated ?: properties.animated,
id = id ?: properties.id,
itemCount = itemCount ?: properties.itemCount,
offset = offset ?: properties.offset,
overflow = overflow ?: properties.overflow,
)
)
/**
* @param animated If `true` (default value) scroll will be animated, else not.
* @param id Identifier of the view that is going to be manipulated.
* @param itemCount Count of container items to scroll, negative value is associated with backward scroll.
* @param offset Distance to scroll measured in `dp` from current position, negative value is associated with backward scroll. Applicable only in `gallery`.
* @param overflow Specifies how navigation will occur when the boundary elements are reached:<li>`clamp` — Transition will stop at the boundary element (default value);</li><li>`ring` — Transition will be to the beginning or the end depending on the current element.</li>
*/
@Generated
fun ActionScrollBy.evaluate(
`use named arguments`: Guard = Guard.instance,
animated: ExpressionProperty<Boolean>? = null,
id: ExpressionProperty<String>? = null,
itemCount: ExpressionProperty<Int>? = null,
offset: ExpressionProperty<Int>? = null,
overflow: ExpressionProperty<ActionScrollBy.Overflow>? = null,
): ActionScrollBy = ActionScrollBy(
ActionScrollBy.Properties(
animated = animated ?: properties.animated,
id = id ?: properties.id,
itemCount = itemCount ?: properties.itemCount,
offset = offset ?: properties.offset,
overflow = overflow ?: properties.overflow,
)
)
@Generated
fun ActionScrollBy.asList() = listOf(this)
@Generated
fun ActionScrollBy.Overflow.asList() = listOf(this)
@@ -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: [OffsetDestination], [IndexDestination], [StartDestination], [EndDestination].
*/
@Generated
sealed interface ActionScrollDestination
@Generated
fun ActionScrollDestination.asList() = listOf(this)
@@ -0,0 +1,180 @@
@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
/**
* Scrolls or switches container to given destination provided by `destination`.
*
* Can be created using the method [actionScrollTo].
*
* Required parameters: `type, id, destination`.
*/
@Generated
class ActionScrollTo internal constructor(
@JsonIgnore
val properties: Properties,
) : ActionTyped {
@JsonAnyGetter
internal fun getJsonProperties(): Map<String, Any> = properties.mergeWith(
mapOf("type" to "scroll_to")
)
operator fun plus(additive: Properties): ActionScrollTo = ActionScrollTo(
Properties(
animated = additive.animated ?: properties.animated,
destination = additive.destination ?: properties.destination,
id = additive.id ?: properties.id,
)
)
class Properties internal constructor(
/**
* If `true` (default value) scroll will be animated, else not.
* Default value: `true`.
*/
val animated: Property<Boolean>?,
/**
* Specifies destination of scroll:<li>`index` - scroll or switch to item with index provided by `value`;</li><li>`offset` - scroll to position measured in `dp` from container's start and provided by `value`. Applicable only in `gallery`;</li><li>`start` - scrolls to start of container;</li><li>`end` - scrolls to end of container.</li>.
*/
val destination: Property<ActionScrollDestination>?,
/**
* Identifier of the view that is going to be manipulated.
*/
val id: Property<String>?,
) {
internal fun mergeWith(properties: Map<String, Any>): Map<String, Any> {
val result = mutableMapOf<String, Any>()
result.putAll(properties)
result.tryPutProperty("animated", animated)
result.tryPutProperty("destination", destination)
result.tryPutProperty("id", id)
return result
}
}
}
/**
* @param animated If `true` (default value) scroll will be animated, else not.
* @param destination Specifies destination of scroll:<li>`index` - scroll or switch to item with index provided by `value`;</li><li>`offset` - scroll to position measured in `dp` from container's start and provided by `value`. Applicable only in `gallery`;</li><li>`start` - scrolls to start of container;</li><li>`end` - scrolls to end of container.</li>.
* @param id Identifier of the view that is going to be manipulated.
*/
@Generated
fun DivScope.actionScrollTo(
`use named arguments`: Guard = Guard.instance,
animated: Boolean? = null,
destination: ActionScrollDestination? = null,
id: String? = null,
): ActionScrollTo = ActionScrollTo(
ActionScrollTo.Properties(
animated = valueOrNull(animated),
destination = valueOrNull(destination),
id = valueOrNull(id),
)
)
/**
* @param animated If `true` (default value) scroll will be animated, else not.
* @param destination Specifies destination of scroll:<li>`index` - scroll or switch to item with index provided by `value`;</li><li>`offset` - scroll to position measured in `dp` from container's start and provided by `value`. Applicable only in `gallery`;</li><li>`start` - scrolls to start of container;</li><li>`end` - scrolls to end of container.</li>.
* @param id Identifier of the view that is going to be manipulated.
*/
@Generated
fun DivScope.actionScrollToProps(
`use named arguments`: Guard = Guard.instance,
animated: Boolean? = null,
destination: ActionScrollDestination? = null,
id: String? = null,
) = ActionScrollTo.Properties(
animated = valueOrNull(animated),
destination = valueOrNull(destination),
id = valueOrNull(id),
)
/**
* @param animated If `true` (default value) scroll will be animated, else not.
* @param destination Specifies destination of scroll:<li>`index` - scroll or switch to item with index provided by `value`;</li><li>`offset` - scroll to position measured in `dp` from container's start and provided by `value`. Applicable only in `gallery`;</li><li>`start` - scrolls to start of container;</li><li>`end` - scrolls to end of container.</li>.
* @param id Identifier of the view that is going to be manipulated.
*/
@Generated
fun TemplateScope.actionScrollToRefs(
`use named arguments`: Guard = Guard.instance,
animated: ReferenceProperty<Boolean>? = null,
destination: ReferenceProperty<ActionScrollDestination>? = null,
id: ReferenceProperty<String>? = null,
) = ActionScrollTo.Properties(
animated = animated,
destination = destination,
id = id,
)
/**
* @param animated If `true` (default value) scroll will be animated, else not.
* @param destination Specifies destination of scroll:<li>`index` - scroll or switch to item with index provided by `value`;</li><li>`offset` - scroll to position measured in `dp` from container's start and provided by `value`. Applicable only in `gallery`;</li><li>`start` - scrolls to start of container;</li><li>`end` - scrolls to end of container.</li>.
* @param id Identifier of the view that is going to be manipulated.
*/
@Generated
fun ActionScrollTo.override(
`use named arguments`: Guard = Guard.instance,
animated: Boolean? = null,
destination: ActionScrollDestination? = null,
id: String? = null,
): ActionScrollTo = ActionScrollTo(
ActionScrollTo.Properties(
animated = valueOrNull(animated) ?: properties.animated,
destination = valueOrNull(destination) ?: properties.destination,
id = valueOrNull(id) ?: properties.id,
)
)
/**
* @param animated If `true` (default value) scroll will be animated, else not.
* @param destination Specifies destination of scroll:<li>`index` - scroll or switch to item with index provided by `value`;</li><li>`offset` - scroll to position measured in `dp` from container's start and provided by `value`. Applicable only in `gallery`;</li><li>`start` - scrolls to start of container;</li><li>`end` - scrolls to end of container.</li>.
* @param id Identifier of the view that is going to be manipulated.
*/
@Generated
fun ActionScrollTo.defer(
`use named arguments`: Guard = Guard.instance,
animated: ReferenceProperty<Boolean>? = null,
destination: ReferenceProperty<ActionScrollDestination>? = null,
id: ReferenceProperty<String>? = null,
): ActionScrollTo = ActionScrollTo(
ActionScrollTo.Properties(
animated = animated ?: properties.animated,
destination = destination ?: properties.destination,
id = id ?: properties.id,
)
)
/**
* @param animated If `true` (default value) scroll will be animated, else not.
* @param id Identifier of the view that is going to be manipulated.
*/
@Generated
fun ActionScrollTo.evaluate(
`use named arguments`: Guard = Guard.instance,
animated: ExpressionProperty<Boolean>? = null,
id: ExpressionProperty<String>? = null,
): ActionScrollTo = ActionScrollTo(
ActionScrollTo.Properties(
animated = animated ?: properties.animated,
destination = properties.destination,
id = id ?: properties.id,
)
)
@Generated
fun ActionScrollTo.asList() = listOf(this)
@@ -0,0 +1,179 @@
@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
/**
* Temporarily saves variable to the persistent storage.
*
* Can be created using the method [actionSetStoredValue].
*
* Required parameters: `value, type, name, lifetime`.
*/
@Generated
class ActionSetStoredValue internal constructor(
@JsonIgnore
val properties: Properties,
) : ActionTyped {
@JsonAnyGetter
internal fun getJsonProperties(): Map<String, Any> = properties.mergeWith(
mapOf("type" to "set_stored_value")
)
operator fun plus(additive: Properties): ActionSetStoredValue = ActionSetStoredValue(
Properties(
lifetime = additive.lifetime ?: properties.lifetime,
name = additive.name ?: properties.name,
value = additive.value ?: properties.value,
)
)
class Properties internal constructor(
/**
* Storing time in seconds.
*/
val lifetime: Property<Int>?,
/**
* Nave of stored variable.
*/
val name: Property<String>?,
/**
* Value to be stored.
*/
val value: Property<TypedValue>?,
) {
internal fun mergeWith(properties: Map<String, Any>): Map<String, Any> {
val result = mutableMapOf<String, Any>()
result.putAll(properties)
result.tryPutProperty("lifetime", lifetime)
result.tryPutProperty("name", name)
result.tryPutProperty("value", value)
return result
}
}
}
/**
* @param lifetime Storing time in seconds.
* @param name Nave of stored variable.
* @param value Value to be stored.
*/
@Generated
fun DivScope.actionSetStoredValue(
`use named arguments`: Guard = Guard.instance,
lifetime: Int? = null,
name: String? = null,
value: TypedValue? = null,
): ActionSetStoredValue = ActionSetStoredValue(
ActionSetStoredValue.Properties(
lifetime = valueOrNull(lifetime),
name = valueOrNull(name),
value = valueOrNull(value),
)
)
/**
* @param lifetime Storing time in seconds.
* @param name Nave of stored variable.
* @param value Value to be stored.
*/
@Generated
fun DivScope.actionSetStoredValueProps(
`use named arguments`: Guard = Guard.instance,
lifetime: Int? = null,
name: String? = null,
value: TypedValue? = null,
) = ActionSetStoredValue.Properties(
lifetime = valueOrNull(lifetime),
name = valueOrNull(name),
value = valueOrNull(value),
)
/**
* @param lifetime Storing time in seconds.
* @param name Nave of stored variable.
* @param value Value to be stored.
*/
@Generated
fun TemplateScope.actionSetStoredValueRefs(
`use named arguments`: Guard = Guard.instance,
lifetime: ReferenceProperty<Int>? = null,
name: ReferenceProperty<String>? = null,
value: ReferenceProperty<TypedValue>? = null,
) = ActionSetStoredValue.Properties(
lifetime = lifetime,
name = name,
value = value,
)
/**
* @param lifetime Storing time in seconds.
* @param name Nave of stored variable.
* @param value Value to be stored.
*/
@Generated
fun ActionSetStoredValue.override(
`use named arguments`: Guard = Guard.instance,
lifetime: Int? = null,
name: String? = null,
value: TypedValue? = null,
): ActionSetStoredValue = ActionSetStoredValue(
ActionSetStoredValue.Properties(
lifetime = valueOrNull(lifetime) ?: properties.lifetime,
name = valueOrNull(name) ?: properties.name,
value = valueOrNull(value) ?: properties.value,
)
)
/**
* @param lifetime Storing time in seconds.
* @param name Nave of stored variable.
* @param value Value to be stored.
*/
@Generated
fun ActionSetStoredValue.defer(
`use named arguments`: Guard = Guard.instance,
lifetime: ReferenceProperty<Int>? = null,
name: ReferenceProperty<String>? = null,
value: ReferenceProperty<TypedValue>? = null,
): ActionSetStoredValue = ActionSetStoredValue(
ActionSetStoredValue.Properties(
lifetime = lifetime ?: properties.lifetime,
name = name ?: properties.name,
value = value ?: properties.value,
)
)
/**
* @param lifetime Storing time in seconds.
* @param name Nave of stored variable.
*/
@Generated
fun ActionSetStoredValue.evaluate(
`use named arguments`: Guard = Guard.instance,
lifetime: ExpressionProperty<Int>? = null,
name: ExpressionProperty<String>? = null,
): ActionSetStoredValue = ActionSetStoredValue(
ActionSetStoredValue.Properties(
lifetime = lifetime ?: properties.lifetime,
name = name ?: properties.name,
value = properties.value,
)
)
@Generated
fun ActionSetStoredValue.asList() = listOf(this)
@@ -18,7 +18,7 @@ import kotlin.collections.List
import kotlin.collections.Map
/**
* Possible values: [ActionAnimatorStart], [ActionAnimatorStop], [ActionArrayInsertValue], [ActionArrayRemoveValue], [ActionArraySetValue], [ActionClearFocus], [ActionCopyToClipboard], [ActionDictSetValue], [ActionDownload], [ActionFocusElement], [ActionHideTooltip], [ActionSetState], [ActionSetVariable], [ActionShowTooltip], [ActionTimer], [ActionVideo].
* Possible values: [ActionAnimatorStart], [ActionAnimatorStop], [ActionArrayInsertValue], [ActionArrayRemoveValue], [ActionArraySetValue], [ActionClearFocus], [ActionCopyToClipboard], [ActionDictSetValue], [ActionDownload], [ActionFocusElement], [ActionHideTooltip], [ActionScrollBy], [ActionScrollTo], [ActionSetState], [ActionSetStoredValue], [ActionSetVariable], [ActionShowTooltip], [ActionTimer], [ActionVideo].
*/
@Generated
sealed interface ActionTyped
@@ -1,317 +0,0 @@
@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 [animatorBase].
*
* Required parameters: `variable_name, id, duration`.
*/
@Generated
class AnimatorBase internal constructor(
@JsonIgnore
val properties: Properties,
) {
@JsonAnyGetter
internal fun getJsonProperties(): Map<String, Any> = properties.mergeWith(emptyMap())
operator fun plus(additive: Properties): AnimatorBase = AnimatorBase(
Properties(
cancelActions = additive.cancelActions ?: properties.cancelActions,
direction = additive.direction ?: properties.direction,
duration = additive.duration ?: properties.duration,
endActions = additive.endActions ?: properties.endActions,
id = additive.id ?: properties.id,
interpolator = additive.interpolator ?: properties.interpolator,
repeatCount = additive.repeatCount ?: properties.repeatCount,
startDelay = additive.startDelay ?: properties.startDelay,
variableName = additive.variableName ?: properties.variableName,
)
)
class Properties internal constructor(
/**
* Actions performed when the animator is cancelled. For example, when an action with `animator_stop` type is received
*/
val cancelActions: Property<List<Action>>?,
/**
* Animation direction. This property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward.
* Default value: `normal`.
*/
val direction: Property<AnimationDirection>?,
/**
* Animation duration in milliseconds.
*/
val duration: Property<Long>?,
/**
* Actions performed when the animator completes animation.
*/
val endActions: Property<List<Action>>?,
/**
* Animator identificator
*/
val id: Property<String>?,
/**
* Interpolation function.
* Default value: `linear`.
*/
val interpolator: Property<AnimationInterpolator>?,
/**
* The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* Default value: `1`.
*/
val repeatCount: Property<Int>?,
/**
* Animation start delay in milliseconds.
* Default value: `0`.
*/
val startDelay: Property<Int>?,
/**
* Name of the variable being animated.
*/
val variableName: Property<String>?,
) {
internal fun mergeWith(properties: Map<String, Any>): Map<String, Any> {
val result = mutableMapOf<String, Any>()
result.putAll(properties)
result.tryPutProperty("cancel_actions", cancelActions)
result.tryPutProperty("direction", direction)
result.tryPutProperty("duration", duration)
result.tryPutProperty("end_actions", endActions)
result.tryPutProperty("id", id)
result.tryPutProperty("interpolator", interpolator)
result.tryPutProperty("repeat_count", repeatCount)
result.tryPutProperty("start_delay", startDelay)
result.tryPutProperty("variable_name", variableName)
return result
}
}
}
/**
* @param cancelActions Actions performed when the animator is cancelled. For example, when an action with `animator_stop` type is received
* @param direction Animation direction. This property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward.
* @param duration Animation duration in milliseconds.
* @param endActions Actions performed when the animator completes animation.
* @param id Animator identificator
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param startDelay Animation start delay in milliseconds.
* @param variableName Name of the variable being animated.
*/
@Generated
fun DivScope.animatorBase(
`use named arguments`: Guard = Guard.instance,
cancelActions: List<Action>? = null,
direction: AnimationDirection? = null,
duration: Long? = null,
endActions: List<Action>? = null,
id: String? = null,
interpolator: AnimationInterpolator? = null,
repeatCount: Int? = null,
startDelay: Int? = null,
variableName: String? = null,
): AnimatorBase = AnimatorBase(
AnimatorBase.Properties(
cancelActions = valueOrNull(cancelActions),
direction = valueOrNull(direction),
duration = valueOrNull(duration),
endActions = valueOrNull(endActions),
id = valueOrNull(id),
interpolator = valueOrNull(interpolator),
repeatCount = valueOrNull(repeatCount),
startDelay = valueOrNull(startDelay),
variableName = valueOrNull(variableName),
)
)
/**
* @param cancelActions Actions performed when the animator is cancelled. For example, when an action with `animator_stop` type is received
* @param direction Animation direction. This property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward.
* @param duration Animation duration in milliseconds.
* @param endActions Actions performed when the animator completes animation.
* @param id Animator identificator
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param startDelay Animation start delay in milliseconds.
* @param variableName Name of the variable being animated.
*/
@Generated
fun DivScope.animatorBaseProps(
`use named arguments`: Guard = Guard.instance,
cancelActions: List<Action>? = null,
direction: AnimationDirection? = null,
duration: Long? = null,
endActions: List<Action>? = null,
id: String? = null,
interpolator: AnimationInterpolator? = null,
repeatCount: Int? = null,
startDelay: Int? = null,
variableName: String? = null,
) = AnimatorBase.Properties(
cancelActions = valueOrNull(cancelActions),
direction = valueOrNull(direction),
duration = valueOrNull(duration),
endActions = valueOrNull(endActions),
id = valueOrNull(id),
interpolator = valueOrNull(interpolator),
repeatCount = valueOrNull(repeatCount),
startDelay = valueOrNull(startDelay),
variableName = valueOrNull(variableName),
)
/**
* @param cancelActions Actions performed when the animator is cancelled. For example, when an action with `animator_stop` type is received
* @param direction Animation direction. This property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward.
* @param duration Animation duration in milliseconds.
* @param endActions Actions performed when the animator completes animation.
* @param id Animator identificator
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param startDelay Animation start delay in milliseconds.
* @param variableName Name of the variable being animated.
*/
@Generated
fun TemplateScope.animatorBaseRefs(
`use named arguments`: Guard = Guard.instance,
cancelActions: ReferenceProperty<List<Action>>? = null,
direction: ReferenceProperty<AnimationDirection>? = null,
duration: ReferenceProperty<Long>? = null,
endActions: ReferenceProperty<List<Action>>? = null,
id: ReferenceProperty<String>? = null,
interpolator: ReferenceProperty<AnimationInterpolator>? = null,
repeatCount: ReferenceProperty<Int>? = null,
startDelay: ReferenceProperty<Int>? = null,
variableName: ReferenceProperty<String>? = null,
) = AnimatorBase.Properties(
cancelActions = cancelActions,
direction = direction,
duration = duration,
endActions = endActions,
id = id,
interpolator = interpolator,
repeatCount = repeatCount,
startDelay = startDelay,
variableName = variableName,
)
/**
* @param cancelActions Actions performed when the animator is cancelled. For example, when an action with `animator_stop` type is received
* @param direction Animation direction. This property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward.
* @param duration Animation duration in milliseconds.
* @param endActions Actions performed when the animator completes animation.
* @param id Animator identificator
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param startDelay Animation start delay in milliseconds.
* @param variableName Name of the variable being animated.
*/
@Generated
fun AnimatorBase.override(
`use named arguments`: Guard = Guard.instance,
cancelActions: List<Action>? = null,
direction: AnimationDirection? = null,
duration: Long? = null,
endActions: List<Action>? = null,
id: String? = null,
interpolator: AnimationInterpolator? = null,
repeatCount: Int? = null,
startDelay: Int? = null,
variableName: String? = null,
): AnimatorBase = AnimatorBase(
AnimatorBase.Properties(
cancelActions = valueOrNull(cancelActions) ?: properties.cancelActions,
direction = valueOrNull(direction) ?: properties.direction,
duration = valueOrNull(duration) ?: properties.duration,
endActions = valueOrNull(endActions) ?: properties.endActions,
id = valueOrNull(id) ?: properties.id,
interpolator = valueOrNull(interpolator) ?: properties.interpolator,
repeatCount = valueOrNull(repeatCount) ?: properties.repeatCount,
startDelay = valueOrNull(startDelay) ?: properties.startDelay,
variableName = valueOrNull(variableName) ?: properties.variableName,
)
)
/**
* @param cancelActions Actions performed when the animator is cancelled. For example, when an action with `animator_stop` type is received
* @param direction Animation direction. This property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward.
* @param duration Animation duration in milliseconds.
* @param endActions Actions performed when the animator completes animation.
* @param id Animator identificator
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param startDelay Animation start delay in milliseconds.
* @param variableName Name of the variable being animated.
*/
@Generated
fun AnimatorBase.defer(
`use named arguments`: Guard = Guard.instance,
cancelActions: ReferenceProperty<List<Action>>? = null,
direction: ReferenceProperty<AnimationDirection>? = null,
duration: ReferenceProperty<Long>? = null,
endActions: ReferenceProperty<List<Action>>? = null,
id: ReferenceProperty<String>? = null,
interpolator: ReferenceProperty<AnimationInterpolator>? = null,
repeatCount: ReferenceProperty<Int>? = null,
startDelay: ReferenceProperty<Int>? = null,
variableName: ReferenceProperty<String>? = null,
): AnimatorBase = AnimatorBase(
AnimatorBase.Properties(
cancelActions = cancelActions ?: properties.cancelActions,
direction = direction ?: properties.direction,
duration = duration ?: properties.duration,
endActions = endActions ?: properties.endActions,
id = id ?: properties.id,
interpolator = interpolator ?: properties.interpolator,
repeatCount = repeatCount ?: properties.repeatCount,
startDelay = startDelay ?: properties.startDelay,
variableName = variableName ?: properties.variableName,
)
)
/**
* @param direction Animation direction. This property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward.
* @param duration Animation duration in milliseconds.
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param startDelay Animation start delay in milliseconds.
*/
@Generated
fun AnimatorBase.evaluate(
`use named arguments`: Guard = Guard.instance,
direction: ExpressionProperty<AnimationDirection>? = null,
duration: ExpressionProperty<Long>? = null,
interpolator: ExpressionProperty<AnimationInterpolator>? = null,
repeatCount: ExpressionProperty<Int>? = null,
startDelay: ExpressionProperty<Int>? = null,
): AnimatorBase = AnimatorBase(
AnimatorBase.Properties(
cancelActions = properties.cancelActions,
direction = direction ?: properties.direction,
duration = duration ?: properties.duration,
endActions = properties.endActions,
id = properties.id,
interpolator = interpolator ?: properties.interpolator,
repeatCount = repeatCount ?: properties.repeatCount,
startDelay = startDelay ?: properties.startDelay,
variableName = properties.variableName,
)
)
@Generated
fun AnimatorBase.asList() = listOf(this)
@@ -82,10 +82,10 @@ class ColorAnimator internal constructor(
*/
val interpolator: Property<AnimationInterpolator>?,
/**
* The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* Default value: `1`.
* The number of times the animation will repeat before it finishes.
* Default value: `{"type": "fixed", "value": 1}`.
*/
val repeatCount: Property<Int>?,
val repeatCount: Property<Count>?,
/**
* Animation start delay in milliseconds.
* Default value: `0`.
@@ -127,7 +127,7 @@ class ColorAnimator internal constructor(
* @param endValue Value that will be set at the end of animation.
* @param id Animator identificator
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param repeatCount The number of times the animation will repeat before it finishes.
* @param startDelay Animation start delay in milliseconds.
* @param startValue Value that will be set at the start of animation. Can be omitted, in which case current value of the variable will be used.
* @param variableName Name of the variable being animated.
@@ -142,7 +142,7 @@ fun DivScope.colorAnimator(
endValue: Color? = null,
id: String? = null,
interpolator: AnimationInterpolator? = null,
repeatCount: Int? = null,
repeatCount: Count? = null,
startDelay: Int? = null,
startValue: Color? = null,
variableName: String? = null,
@@ -170,7 +170,7 @@ fun DivScope.colorAnimator(
* @param endValue Value that will be set at the end of animation.
* @param id Animator identificator
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param repeatCount The number of times the animation will repeat before it finishes.
* @param startDelay Animation start delay in milliseconds.
* @param startValue Value that will be set at the start of animation. Can be omitted, in which case current value of the variable will be used.
* @param variableName Name of the variable being animated.
@@ -185,7 +185,7 @@ fun DivScope.colorAnimatorProps(
endValue: Color? = null,
id: String? = null,
interpolator: AnimationInterpolator? = null,
repeatCount: Int? = null,
repeatCount: Count? = null,
startDelay: Int? = null,
startValue: Color? = null,
variableName: String? = null,
@@ -211,7 +211,7 @@ fun DivScope.colorAnimatorProps(
* @param endValue Value that will be set at the end of animation.
* @param id Animator identificator
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param repeatCount The number of times the animation will repeat before it finishes.
* @param startDelay Animation start delay in milliseconds.
* @param startValue Value that will be set at the start of animation. Can be omitted, in which case current value of the variable will be used.
* @param variableName Name of the variable being animated.
@@ -226,7 +226,7 @@ fun TemplateScope.colorAnimatorRefs(
endValue: ReferenceProperty<Color>? = null,
id: ReferenceProperty<String>? = null,
interpolator: ReferenceProperty<AnimationInterpolator>? = null,
repeatCount: ReferenceProperty<Int>? = null,
repeatCount: ReferenceProperty<Count>? = null,
startDelay: ReferenceProperty<Int>? = null,
startValue: ReferenceProperty<Color>? = null,
variableName: ReferenceProperty<String>? = null,
@@ -252,7 +252,7 @@ fun TemplateScope.colorAnimatorRefs(
* @param endValue Value that will be set at the end of animation.
* @param id Animator identificator
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param repeatCount The number of times the animation will repeat before it finishes.
* @param startDelay Animation start delay in milliseconds.
* @param startValue Value that will be set at the start of animation. Can be omitted, in which case current value of the variable will be used.
* @param variableName Name of the variable being animated.
@@ -267,7 +267,7 @@ fun ColorAnimator.override(
endValue: Color? = null,
id: String? = null,
interpolator: AnimationInterpolator? = null,
repeatCount: Int? = null,
repeatCount: Count? = null,
startDelay: Int? = null,
startValue: Color? = null,
variableName: String? = null,
@@ -295,7 +295,7 @@ fun ColorAnimator.override(
* @param endValue Value that will be set at the end of animation.
* @param id Animator identificator
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param repeatCount The number of times the animation will repeat before it finishes.
* @param startDelay Animation start delay in milliseconds.
* @param startValue Value that will be set at the start of animation. Can be omitted, in which case current value of the variable will be used.
* @param variableName Name of the variable being animated.
@@ -310,7 +310,7 @@ fun ColorAnimator.defer(
endValue: ReferenceProperty<Color>? = null,
id: ReferenceProperty<String>? = null,
interpolator: ReferenceProperty<AnimationInterpolator>? = null,
repeatCount: ReferenceProperty<Int>? = null,
repeatCount: ReferenceProperty<Count>? = null,
startDelay: ReferenceProperty<Int>? = null,
startValue: ReferenceProperty<Color>? = null,
variableName: ReferenceProperty<String>? = null,
@@ -335,7 +335,6 @@ fun ColorAnimator.defer(
* @param duration Animation duration in milliseconds.
* @param endValue Value that will be set at the end of animation.
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param startDelay Animation start delay in milliseconds.
* @param startValue Value that will be set at the start of animation. Can be omitted, in which case current value of the variable will be used.
*/
@@ -346,7 +345,6 @@ fun ColorAnimator.evaluate(
duration: ExpressionProperty<Long>? = null,
endValue: ExpressionProperty<Color>? = null,
interpolator: ExpressionProperty<AnimationInterpolator>? = null,
repeatCount: ExpressionProperty<Int>? = null,
startDelay: ExpressionProperty<Int>? = null,
startValue: ExpressionProperty<Color>? = null,
): ColorAnimator = ColorAnimator(
@@ -358,7 +356,7 @@ fun ColorAnimator.evaluate(
endValue = endValue ?: properties.endValue,
id = properties.id,
interpolator = interpolator ?: properties.interpolator,
repeatCount = repeatCount ?: properties.repeatCount,
repeatCount = properties.repeatCount,
startDelay = startDelay ?: properties.startDelay,
startValue = startValue ?: properties.startValue,
variableName = properties.variableName,
@@ -0,0 +1,37 @@
@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
/**
* Specifies container's end as scroll destination.
*
* Can be created using the method [endDestination].
*
* Required parameters: `type`.
*/
@Generated
object EndDestination : ActionScrollDestination {
@JsonAnyGetter
internal fun getJsonProperties(): Map<String, Any> = mapOf("type" to "end")
}
@Generated
fun DivScope.endDestination(): EndDestination = EndDestination
@Generated
fun EndDestination.asList() = listOf(this)
@@ -97,6 +97,14 @@ object SelfEnumValue : EnumValue("_self"),
object BlankEnumValue : EnumValue("_blank"),
Action.Target
@Generated
object ClampEnumValue : EnumValue("clamp"),
ActionScrollBy.Overflow
@Generated
object RingEnumValue : EnumValue("ring"),
ActionScrollBy.Overflow
@Generated
object StartEnumValue : EnumValue("start"),
ActionTimer.Action,
@@ -593,6 +601,14 @@ val DivScope.self: SelfEnumValue
val DivScope.blank: BlankEnumValue
get() = BlankEnumValue
@Generated
val DivScope.clamp: ClampEnumValue
get() = ClampEnumValue
@Generated
val DivScope.ring: RingEnumValue
get() = RingEnumValue
@Generated
val DivScope.start: StartEnumValue
get() = StartEnumValue
@@ -0,0 +1,133 @@
@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
/**
* Specifies element with provided index as scroll destination.
*
* Can be created using the method [indexDestination].
*
* Required parameters: `value, type`.
*/
@Generated
class IndexDestination internal constructor(
@JsonIgnore
val properties: Properties,
) : ActionScrollDestination {
@JsonAnyGetter
internal fun getJsonProperties(): Map<String, Any> = properties.mergeWith(
mapOf("type" to "index")
)
operator fun plus(additive: Properties): IndexDestination = IndexDestination(
Properties(
value = additive.value ?: properties.value,
)
)
class Properties internal constructor(
/**
* Index of contaner's item.
*/
val value: Property<Int>?,
) {
internal fun mergeWith(properties: Map<String, Any>): Map<String, Any> {
val result = mutableMapOf<String, Any>()
result.putAll(properties)
result.tryPutProperty("value", value)
return result
}
}
}
/**
* @param value Index of contaner's item.
*/
@Generated
fun DivScope.indexDestination(
`use named arguments`: Guard = Guard.instance,
value: Int? = null,
): IndexDestination = IndexDestination(
IndexDestination.Properties(
value = valueOrNull(value),
)
)
/**
* @param value Index of contaner's item.
*/
@Generated
fun DivScope.indexDestinationProps(
`use named arguments`: Guard = Guard.instance,
value: Int? = null,
) = IndexDestination.Properties(
value = valueOrNull(value),
)
/**
* @param value Index of contaner's item.
*/
@Generated
fun TemplateScope.indexDestinationRefs(
`use named arguments`: Guard = Guard.instance,
value: ReferenceProperty<Int>? = null,
) = IndexDestination.Properties(
value = value,
)
/**
* @param value Index of contaner's item.
*/
@Generated
fun IndexDestination.override(
`use named arguments`: Guard = Guard.instance,
value: Int? = null,
): IndexDestination = IndexDestination(
IndexDestination.Properties(
value = valueOrNull(value) ?: properties.value,
)
)
/**
* @param value Index of contaner's item.
*/
@Generated
fun IndexDestination.defer(
`use named arguments`: Guard = Guard.instance,
value: ReferenceProperty<Int>? = null,
): IndexDestination = IndexDestination(
IndexDestination.Properties(
value = value ?: properties.value,
)
)
/**
* @param value Index of contaner's item.
*/
@Generated
fun IndexDestination.evaluate(
`use named arguments`: Guard = Guard.instance,
value: ExpressionProperty<Int>? = null,
): IndexDestination = IndexDestination(
IndexDestination.Properties(
value = value ?: properties.value,
)
)
@Generated
fun IndexDestination.asList() = listOf(this)
@@ -82,10 +82,10 @@ class NumberAnimator internal constructor(
*/
val interpolator: Property<AnimationInterpolator>?,
/**
* The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* Default value: `1`.
* The number of times the animation will repeat before it finishes.
* Default value: `{"type": "fixed", "value": 1}`.
*/
val repeatCount: Property<Int>?,
val repeatCount: Property<Count>?,
/**
* Animation start delay in milliseconds.
* Default value: `0`.
@@ -127,7 +127,7 @@ class NumberAnimator internal constructor(
* @param endValue Value that will be set at the end of animation.
* @param id Animator identificator
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param repeatCount The number of times the animation will repeat before it finishes.
* @param startDelay Animation start delay in milliseconds.
* @param startValue Value that will be set at the start of animation. Can be omitted, in which case current value of the variable will be used.
* @param variableName Name of the variable being animated.
@@ -142,7 +142,7 @@ fun DivScope.numberAnimator(
endValue: Double? = null,
id: String? = null,
interpolator: AnimationInterpolator? = null,
repeatCount: Int? = null,
repeatCount: Count? = null,
startDelay: Int? = null,
startValue: Double? = null,
variableName: String? = null,
@@ -170,7 +170,7 @@ fun DivScope.numberAnimator(
* @param endValue Value that will be set at the end of animation.
* @param id Animator identificator
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param repeatCount The number of times the animation will repeat before it finishes.
* @param startDelay Animation start delay in milliseconds.
* @param startValue Value that will be set at the start of animation. Can be omitted, in which case current value of the variable will be used.
* @param variableName Name of the variable being animated.
@@ -185,7 +185,7 @@ fun DivScope.numberAnimatorProps(
endValue: Double? = null,
id: String? = null,
interpolator: AnimationInterpolator? = null,
repeatCount: Int? = null,
repeatCount: Count? = null,
startDelay: Int? = null,
startValue: Double? = null,
variableName: String? = null,
@@ -211,7 +211,7 @@ fun DivScope.numberAnimatorProps(
* @param endValue Value that will be set at the end of animation.
* @param id Animator identificator
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param repeatCount The number of times the animation will repeat before it finishes.
* @param startDelay Animation start delay in milliseconds.
* @param startValue Value that will be set at the start of animation. Can be omitted, in which case current value of the variable will be used.
* @param variableName Name of the variable being animated.
@@ -226,7 +226,7 @@ fun TemplateScope.numberAnimatorRefs(
endValue: ReferenceProperty<Double>? = null,
id: ReferenceProperty<String>? = null,
interpolator: ReferenceProperty<AnimationInterpolator>? = null,
repeatCount: ReferenceProperty<Int>? = null,
repeatCount: ReferenceProperty<Count>? = null,
startDelay: ReferenceProperty<Int>? = null,
startValue: ReferenceProperty<Double>? = null,
variableName: ReferenceProperty<String>? = null,
@@ -252,7 +252,7 @@ fun TemplateScope.numberAnimatorRefs(
* @param endValue Value that will be set at the end of animation.
* @param id Animator identificator
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param repeatCount The number of times the animation will repeat before it finishes.
* @param startDelay Animation start delay in milliseconds.
* @param startValue Value that will be set at the start of animation. Can be omitted, in which case current value of the variable will be used.
* @param variableName Name of the variable being animated.
@@ -267,7 +267,7 @@ fun NumberAnimator.override(
endValue: Double? = null,
id: String? = null,
interpolator: AnimationInterpolator? = null,
repeatCount: Int? = null,
repeatCount: Count? = null,
startDelay: Int? = null,
startValue: Double? = null,
variableName: String? = null,
@@ -295,7 +295,7 @@ fun NumberAnimator.override(
* @param endValue Value that will be set at the end of animation.
* @param id Animator identificator
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param repeatCount The number of times the animation will repeat before it finishes.
* @param startDelay Animation start delay in milliseconds.
* @param startValue Value that will be set at the start of animation. Can be omitted, in which case current value of the variable will be used.
* @param variableName Name of the variable being animated.
@@ -310,7 +310,7 @@ fun NumberAnimator.defer(
endValue: ReferenceProperty<Double>? = null,
id: ReferenceProperty<String>? = null,
interpolator: ReferenceProperty<AnimationInterpolator>? = null,
repeatCount: ReferenceProperty<Int>? = null,
repeatCount: ReferenceProperty<Count>? = null,
startDelay: ReferenceProperty<Int>? = null,
startValue: ReferenceProperty<Double>? = null,
variableName: ReferenceProperty<String>? = null,
@@ -335,7 +335,6 @@ fun NumberAnimator.defer(
* @param duration Animation duration in milliseconds.
* @param endValue Value that will be set at the end of animation.
* @param interpolator Interpolation function.
* @param repeatCount The number of times the animation will repeat before it finishes. `0` enables infinite repeats.
* @param startDelay Animation start delay in milliseconds.
* @param startValue Value that will be set at the start of animation. Can be omitted, in which case current value of the variable will be used.
*/
@@ -346,7 +345,6 @@ fun NumberAnimator.evaluate(
duration: ExpressionProperty<Long>? = null,
endValue: ExpressionProperty<Double>? = null,
interpolator: ExpressionProperty<AnimationInterpolator>? = null,
repeatCount: ExpressionProperty<Int>? = null,
startDelay: ExpressionProperty<Int>? = null,
startValue: ExpressionProperty<Double>? = null,
): NumberAnimator = NumberAnimator(
@@ -358,7 +356,7 @@ fun NumberAnimator.evaluate(
endValue = endValue ?: properties.endValue,
id = properties.id,
interpolator = interpolator ?: properties.interpolator,
repeatCount = repeatCount ?: properties.repeatCount,
repeatCount = properties.repeatCount,
startDelay = startDelay ?: properties.startDelay,
startValue = startValue ?: properties.startValue,
variableName = properties.variableName,
@@ -0,0 +1,133 @@
@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
/**
* Specifies position measured in `dp` from container's start as scroll destination. Applicable only in `gallery`.
*
* Can be created using the method [offsetDestination].
*
* Required parameters: `value, type`.
*/
@Generated
class OffsetDestination internal constructor(
@JsonIgnore
val properties: Properties,
) : ActionScrollDestination {
@JsonAnyGetter
internal fun getJsonProperties(): Map<String, Any> = properties.mergeWith(
mapOf("type" to "offset")
)
operator fun plus(additive: Properties): OffsetDestination = OffsetDestination(
Properties(
value = additive.value ?: properties.value,
)
)
class Properties internal constructor(
/**
* Position in `dp`.
*/
val value: Property<Int>?,
) {
internal fun mergeWith(properties: Map<String, Any>): Map<String, Any> {
val result = mutableMapOf<String, Any>()
result.putAll(properties)
result.tryPutProperty("value", value)
return result
}
}
}
/**
* @param value Position in `dp`.
*/
@Generated
fun DivScope.offsetDestination(
`use named arguments`: Guard = Guard.instance,
value: Int? = null,
): OffsetDestination = OffsetDestination(
OffsetDestination.Properties(
value = valueOrNull(value),
)
)
/**
* @param value Position in `dp`.
*/
@Generated
fun DivScope.offsetDestinationProps(
`use named arguments`: Guard = Guard.instance,
value: Int? = null,
) = OffsetDestination.Properties(
value = valueOrNull(value),
)
/**
* @param value Position in `dp`.
*/
@Generated
fun TemplateScope.offsetDestinationRefs(
`use named arguments`: Guard = Guard.instance,
value: ReferenceProperty<Int>? = null,
) = OffsetDestination.Properties(
value = value,
)
/**
* @param value Position in `dp`.
*/
@Generated
fun OffsetDestination.override(
`use named arguments`: Guard = Guard.instance,
value: Int? = null,
): OffsetDestination = OffsetDestination(
OffsetDestination.Properties(
value = valueOrNull(value) ?: properties.value,
)
)
/**
* @param value Position in `dp`.
*/
@Generated
fun OffsetDestination.defer(
`use named arguments`: Guard = Guard.instance,
value: ReferenceProperty<Int>? = null,
): OffsetDestination = OffsetDestination(
OffsetDestination.Properties(
value = value ?: properties.value,
)
)
/**
* @param value Position in `dp`.
*/
@Generated
fun OffsetDestination.evaluate(
`use named arguments`: Guard = Guard.instance,
value: ExpressionProperty<Int>? = null,
): OffsetDestination = OffsetDestination(
OffsetDestination.Properties(
value = value ?: properties.value,
)
)
@Generated
fun OffsetDestination.asList() = listOf(this)
@@ -0,0 +1,37 @@
@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
/**
* Specifies container's start as scroll destination.
*
* Can be created using the method [startDestination].
*
* Required parameters: `type`.
*/
@Generated
object StartDestination : ActionScrollDestination {
@JsonAnyGetter
internal fun getJsonProperties(): Map<String, Any> = mapOf("type" to "start")
}
@Generated
fun DivScope.startDestination(): StartDestination = StartDestination
@Generated
fun StartDestination.asList() = listOf(this)
@@ -84,6 +84,7 @@ class Text internal constructor(
textColor = additive.textColor ?: properties.textColor,
textGradient = additive.textGradient ?: properties.textGradient,
textShadow = additive.textShadow ?: properties.textShadow,
tightenWidth = additive.tightenWidth ?: properties.tightenWidth,
tooltips = additive.tooltips ?: properties.tooltips,
transform = additive.transform ?: properties.transform,
transitionChange = additive.transitionChange ?: properties.transitionChange,
@@ -305,6 +306,11 @@ class Text internal constructor(
* Parameters of the shadow applied to the text.
*/
val textShadow: Property<Shadow>?,
/**
* Set text width to maximal line width, works only with wrap_content width with constrained=true and max_size set
* Default value: `false`.
*/
val tightenWidth: Property<Boolean>?,
/**
* 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.
*/
@@ -418,6 +424,7 @@ class Text internal constructor(
result.tryPutProperty("text_color", textColor)
result.tryPutProperty("text_gradient", textGradient)
result.tryPutProperty("text_shadow", textShadow)
result.tryPutProperty("tighten_width", tightenWidth)
result.tryPutProperty("tooltips", tooltips)
result.tryPutProperty("transform", transform)
result.tryPutProperty("transition_change", transitionChange)
@@ -829,6 +836,7 @@ 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 Set text width to maximal line width, works only with wrap_content width with constrained=true and max_size set
* @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.
@@ -895,6 +903,7 @@ fun DivScope.text(
textColor: Color? = null,
textGradient: TextGradient? = null,
textShadow: Shadow? = null,
tightenWidth: Boolean? = null,
tooltips: List<Tooltip>? = null,
transform: Transform? = null,
transitionChange: ChangeTransition? = null,
@@ -959,6 +968,7 @@ fun DivScope.text(
textColor = valueOrNull(textColor),
textGradient = valueOrNull(textGradient),
textShadow = valueOrNull(textShadow),
tightenWidth = valueOrNull(tightenWidth),
tooltips = valueOrNull(tooltips),
transform = valueOrNull(transform),
transitionChange = valueOrNull(transitionChange),
@@ -1024,6 +1034,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 Set text width to maximal line width, works only with wrap_content width with constrained=true and max_size set
* @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.
@@ -1090,6 +1101,7 @@ fun DivScope.textProps(
textColor: Color? = null,
textGradient: TextGradient? = null,
textShadow: Shadow? = null,
tightenWidth: Boolean? = null,
tooltips: List<Tooltip>? = null,
transform: Transform? = null,
transitionChange: ChangeTransition? = null,
@@ -1153,6 +1165,7 @@ fun DivScope.textProps(
textColor = valueOrNull(textColor),
textGradient = valueOrNull(textGradient),
textShadow = valueOrNull(textShadow),
tightenWidth = valueOrNull(tightenWidth),
tooltips = valueOrNull(tooltips),
transform = valueOrNull(transform),
transitionChange = valueOrNull(transitionChange),
@@ -1217,6 +1230,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 Set text width to maximal line width, works only with wrap_content width with constrained=true and max_size set
* @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.
@@ -1283,6 +1297,7 @@ fun TemplateScope.textRefs(
textColor: ReferenceProperty<Color>? = null,
textGradient: ReferenceProperty<TextGradient>? = null,
textShadow: ReferenceProperty<Shadow>? = null,
tightenWidth: ReferenceProperty<Boolean>? = null,
tooltips: ReferenceProperty<List<Tooltip>>? = null,
transform: ReferenceProperty<Transform>? = null,
transitionChange: ReferenceProperty<ChangeTransition>? = null,
@@ -1346,6 +1361,7 @@ fun TemplateScope.textRefs(
textColor = textColor,
textGradient = textGradient,
textShadow = textShadow,
tightenWidth = tightenWidth,
tooltips = tooltips,
transform = transform,
transitionChange = transitionChange,
@@ -1410,6 +1426,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 Set text width to maximal line width, works only with wrap_content width with constrained=true and max_size set
* @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.
@@ -1476,6 +1493,7 @@ fun Text.override(
textColor: Color? = null,
textGradient: TextGradient? = null,
textShadow: Shadow? = null,
tightenWidth: Boolean? = null,
tooltips: List<Tooltip>? = null,
transform: Transform? = null,
transitionChange: ChangeTransition? = null,
@@ -1540,6 +1558,7 @@ fun Text.override(
textColor = valueOrNull(textColor) ?: properties.textColor,
textGradient = valueOrNull(textGradient) ?: properties.textGradient,
textShadow = valueOrNull(textShadow) ?: properties.textShadow,
tightenWidth = valueOrNull(tightenWidth) ?: properties.tightenWidth,
tooltips = valueOrNull(tooltips) ?: properties.tooltips,
transform = valueOrNull(transform) ?: properties.transform,
transitionChange = valueOrNull(transitionChange) ?: properties.transitionChange,
@@ -1605,6 +1624,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 Set text width to maximal line width, works only with wrap_content width with constrained=true and max_size set
* @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.
@@ -1671,6 +1691,7 @@ fun Text.defer(
textColor: ReferenceProperty<Color>? = null,
textGradient: ReferenceProperty<TextGradient>? = null,
textShadow: ReferenceProperty<Shadow>? = null,
tightenWidth: ReferenceProperty<Boolean>? = null,
tooltips: ReferenceProperty<List<Tooltip>>? = null,
transform: ReferenceProperty<Transform>? = null,
transitionChange: ReferenceProperty<ChangeTransition>? = null,
@@ -1735,6 +1756,7 @@ fun Text.defer(
textColor = textColor ?: properties.textColor,
textGradient = textGradient ?: properties.textGradient,
textShadow = textShadow ?: properties.textShadow,
tightenWidth = tightenWidth ?: properties.tightenWidth,
tooltips = tooltips ?: properties.tooltips,
transform = transform ?: properties.transform,
transitionChange = transitionChange ?: properties.transitionChange,
@@ -1776,6 +1798,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 Set text width to maximal line width, works only with wrap_content width with constrained=true and max_size set
* @param truncate Text cropping method. Use `ellipsis` instead.
* @param underline Underline.
* @param visibility Element visibility.
@@ -1807,6 +1830,7 @@ fun Text.evaluate(
textAlignmentHorizontal: ExpressionProperty<AlignmentHorizontal>? = null,
textAlignmentVertical: ExpressionProperty<AlignmentVertical>? = null,
textColor: ExpressionProperty<Color>? = null,
tightenWidth: ExpressionProperty<Boolean>? = null,
truncate: ExpressionProperty<Text.Truncate>? = null,
underline: ExpressionProperty<LineStyle>? = null,
visibility: ExpressionProperty<Visibility>? = null,
@@ -1860,6 +1884,7 @@ fun Text.evaluate(
textColor = textColor ?: properties.textColor,
textGradient = properties.textGradient,
textShadow = properties.textShadow,
tightenWidth = tightenWidth ?: properties.tightenWidth,
tooltips = properties.tooltips,
transform = properties.transform,
transitionChange = properties.transitionChange,
@@ -1925,6 +1950,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 Set text width to maximal line width, works only with wrap_content width with constrained=true and max_size set
* @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.
@@ -1991,6 +2017,7 @@ fun Component<Text>.override(
textColor: Color? = null,
textGradient: TextGradient? = null,
textShadow: Shadow? = null,
tightenWidth: Boolean? = null,
tooltips: List<Tooltip>? = null,
transform: Transform? = null,
transitionChange: ChangeTransition? = null,
@@ -2056,6 +2083,7 @@ fun Component<Text>.override(
textColor = valueOrNull(textColor),
textGradient = valueOrNull(textGradient),
textShadow = valueOrNull(textShadow),
tightenWidth = valueOrNull(tightenWidth),
tooltips = valueOrNull(tooltips),
transform = valueOrNull(transform),
transitionChange = valueOrNull(transitionChange),
@@ -2121,6 +2149,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 Set text width to maximal line width, works only with wrap_content width with constrained=true and max_size set
* @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.
@@ -2187,6 +2216,7 @@ fun Component<Text>.defer(
textColor: ReferenceProperty<Color>? = null,
textGradient: ReferenceProperty<TextGradient>? = null,
textShadow: ReferenceProperty<Shadow>? = null,
tightenWidth: ReferenceProperty<Boolean>? = null,
tooltips: ReferenceProperty<List<Tooltip>>? = null,
transform: ReferenceProperty<Transform>? = null,
transitionChange: ReferenceProperty<ChangeTransition>? = null,
@@ -2252,6 +2282,7 @@ fun Component<Text>.defer(
textColor = textColor,
textGradient = textGradient,
textShadow = textShadow,
tightenWidth = tightenWidth,
tooltips = tooltips,
transform = transform,
transitionChange = transitionChange,
@@ -2293,6 +2324,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 Set text width to maximal line width, works only with wrap_content width with constrained=true and max_size set
* @param truncate Text cropping method. Use `ellipsis` instead.
* @param underline Underline.
* @param visibility Element visibility.
@@ -2324,6 +2356,7 @@ fun Component<Text>.evaluate(
textAlignmentHorizontal: ExpressionProperty<AlignmentHorizontal>? = null,
textAlignmentVertical: ExpressionProperty<AlignmentVertical>? = null,
textColor: ExpressionProperty<Color>? = null,
tightenWidth: ExpressionProperty<Boolean>? = null,
truncate: ExpressionProperty<Text.Truncate>? = null,
underline: ExpressionProperty<LineStyle>? = null,
visibility: ExpressionProperty<Visibility>? = null,
@@ -2378,6 +2411,7 @@ fun Component<Text>.evaluate(
textColor = textColor,
textGradient = null,
textShadow = null,
tightenWidth = tightenWidth,
tooltips = null,
transform = null,
transitionChange = null,
+1 -1
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pydivkit"
version = "30.20.0"
version = "30.21.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.20.0",
"version": "30.21.0",
"description": "DivKit TypeScript JSON Builder",
"main": "./dist/jsonbuilder.js",
"module": "./dist/es/jsonbuilder.js",
+1 -1
View File
@@ -1 +1 @@
30.20.0
30.21.0