diff --git a/client/ios/DivKit/generated_sources/DivSlider.swift b/client/ios/DivKit/generated_sources/DivSlider.swift index ad6f50a1d..639e3a652 100644 --- a/client/ios/DivKit/generated_sources/DivSlider.swift +++ b/client/ios/DivKit/generated_sources/DivSlider.swift @@ -42,6 +42,7 @@ public final class DivSlider: DivBase, Sendable { public let fontVariationSettings: Expression<[String: Any]>? public let fontWeight: Expression // default value: regular public let fontWeightValue: Expression? // constraint: number > 0 + public let letterSpacing: Expression // default value: 0 public let offset: DivPoint? public let textColor: Expression // default value: #FF000000 @@ -69,6 +70,10 @@ public final class DivSlider: DivBase, Sendable { resolver.resolveNumeric(fontWeightValue) } + public func resolveLetterSpacing(_ resolver: ExpressionResolver) -> Double { + resolver.resolveNumeric(letterSpacing) ?? 0 + } + public func resolveTextColor(_ resolver: ExpressionResolver) -> Color { resolver.resolveColor(textColor) ?? Color.colorWithARGBHexCode(0xFF000000) } @@ -86,6 +91,7 @@ public final class DivSlider: DivBase, Sendable { fontVariationSettings: Expression<[String: Any]>? = nil, fontWeight: Expression? = nil, fontWeightValue: Expression? = nil, + letterSpacing: Expression? = nil, offset: DivPoint? = nil, textColor: Expression? = nil ) { @@ -95,6 +101,7 @@ public final class DivSlider: DivBase, Sendable { self.fontVariationSettings = fontVariationSettings self.fontWeight = fontWeight ?? .value(.regular) self.fontWeightValue = fontWeightValue + self.letterSpacing = letterSpacing ?? .value(0) self.offset = offset self.textColor = textColor ?? .value(Color.colorWithARGBHexCode(0xFF000000)) } @@ -488,11 +495,12 @@ extension DivSlider.TextStyle: Equatable { guard lhs.fontWeight == rhs.fontWeight, lhs.fontWeightValue == rhs.fontWeightValue, - lhs.offset == rhs.offset + lhs.letterSpacing == rhs.letterSpacing else { return false } guard + lhs.offset == rhs.offset, lhs.textColor == rhs.textColor else { return false @@ -544,6 +552,7 @@ extension DivSlider.TextStyle: Serializable { result["font_variation_settings"] = fontVariationSettings?.toValidSerializationValue() result["font_weight"] = fontWeight.toValidSerializationValue() result["font_weight_value"] = fontWeightValue?.toValidSerializationValue() + result["letter_spacing"] = letterSpacing.toValidSerializationValue() result["offset"] = offset?.toDictionary() result["text_color"] = textColor.toValidSerializationValue() return result diff --git a/client/ios/DivKit/generated_sources/DivSliderTemplate.swift b/client/ios/DivKit/generated_sources/DivSliderTemplate.swift index 0bc4b19aa..c8b80d3e8 100644 --- a/client/ios/DivKit/generated_sources/DivSliderTemplate.swift +++ b/client/ios/DivKit/generated_sources/DivSliderTemplate.swift @@ -171,6 +171,7 @@ public final class DivSliderTemplate: TemplateValue, Sendable { public let fontVariationSettings: Field>? public let fontWeight: Field>? // default value: regular public let fontWeightValue: Field>? // constraint: number > 0 + public let letterSpacing: Field>? // default value: 0 public let offset: Field? public let textColor: Field>? // default value: #FF000000 @@ -182,6 +183,7 @@ public final class DivSliderTemplate: TemplateValue, Sendable { fontVariationSettings: dictionary.getOptionalExpressionField("font_variation_settings"), fontWeight: dictionary.getOptionalExpressionField("font_weight"), fontWeightValue: dictionary.getOptionalExpressionField("font_weight_value"), + letterSpacing: dictionary.getOptionalExpressionField("letter_spacing"), offset: dictionary.getOptionalField("offset", templateToType: templateToType), textColor: dictionary.getOptionalExpressionField("text_color", transform: Color.color(withHexString:)) ) @@ -194,6 +196,7 @@ public final class DivSliderTemplate: TemplateValue, Sendable { fontVariationSettings: Field>? = nil, fontWeight: Field>? = nil, fontWeightValue: Field>? = nil, + letterSpacing: Field>? = nil, offset: Field? = nil, textColor: Field>? = nil ) { @@ -203,6 +206,7 @@ public final class DivSliderTemplate: TemplateValue, Sendable { self.fontVariationSettings = fontVariationSettings self.fontWeight = fontWeight self.fontWeightValue = fontWeightValue + self.letterSpacing = letterSpacing self.offset = offset self.textColor = textColor } @@ -214,6 +218,7 @@ public final class DivSliderTemplate: TemplateValue, Sendable { let fontVariationSettingsValue = { parent?.fontVariationSettings?.resolveOptionalValue(context: context) ?? .noValue }() let fontWeightValue = { parent?.fontWeight?.resolveOptionalValue(context: context) ?? .noValue }() let fontWeightValueValue = { parent?.fontWeightValue?.resolveOptionalValue(context: context, validator: ResolvedValue.fontWeightValueValidator) ?? .noValue }() + let letterSpacingValue = { parent?.letterSpacing?.resolveOptionalValue(context: context) ?? .noValue }() let offsetValue = { parent?.offset?.resolveOptionalValue(context: context, useOnlyLinks: true) ?? .noValue }() let textColorValue = { parent?.textColor?.resolveOptionalValue(context: context, transform: Color.color(withHexString:)) ?? .noValue }() let errors = mergeErrors( @@ -223,6 +228,7 @@ public final class DivSliderTemplate: TemplateValue, Sendable { fontVariationSettingsValue.errorsOrWarnings?.map { .nestedObjectError(field: "font_variation_settings", error: $0) }, fontWeightValue.errorsOrWarnings?.map { .nestedObjectError(field: "font_weight", error: $0) }, fontWeightValueValue.errorsOrWarnings?.map { .nestedObjectError(field: "font_weight_value", error: $0) }, + letterSpacingValue.errorsOrWarnings?.map { .nestedObjectError(field: "letter_spacing", error: $0) }, offsetValue.errorsOrWarnings?.map { .nestedObjectError(field: "offset", error: $0) }, textColorValue.errorsOrWarnings?.map { .nestedObjectError(field: "text_color", error: $0) } ) @@ -233,6 +239,7 @@ public final class DivSliderTemplate: TemplateValue, Sendable { fontVariationSettings: { fontVariationSettingsValue.value }(), fontWeight: { fontWeightValue.value }(), fontWeightValue: { fontWeightValueValue.value }(), + letterSpacing: { letterSpacingValue.value }(), offset: { offsetValue.value }(), textColor: { textColorValue.value }() ) @@ -249,6 +256,7 @@ public final class DivSliderTemplate: TemplateValue, Sendable { var fontVariationSettingsValue: DeserializationResult> = { parent?.fontVariationSettings?.value() ?? .noValue }() var fontWeightValue: DeserializationResult> = { parent?.fontWeight?.value() ?? .noValue }() var fontWeightValueValue: DeserializationResult> = { parent?.fontWeightValue?.value() ?? .noValue }() + var letterSpacingValue: DeserializationResult> = { parent?.letterSpacing?.value() ?? .noValue }() var offsetValue: DeserializationResult = .noValue var textColorValue: DeserializationResult> = { parent?.textColor?.value() ?? .noValue }() _ = { @@ -286,6 +294,11 @@ public final class DivSliderTemplate: TemplateValue, Sendable { fontWeightValueValue = deserialize(__dictValue, validator: ResolvedValue.fontWeightValueValidator).merged(with: fontWeightValueValue) } }() + _ = { + if key == "letter_spacing" { + letterSpacingValue = deserialize(__dictValue).merged(with: letterSpacingValue) + } + }() _ = { if key == "offset" { offsetValue = deserialize(__dictValue, templates: context.templates, templateToType: context.templateToType, type: DivPointTemplate.self).merged(with: offsetValue) @@ -326,6 +339,11 @@ public final class DivSliderTemplate: TemplateValue, Sendable { fontWeightValueValue = fontWeightValueValue.merged(with: { deserialize(__dictValue, validator: ResolvedValue.fontWeightValueValidator) }) } }() + _ = { + if key == parent?.letterSpacing?.link { + letterSpacingValue = letterSpacingValue.merged(with: { deserialize(__dictValue) }) + } + }() _ = { if key == parent?.offset?.link { offsetValue = offsetValue.merged(with: { deserialize(__dictValue, templates: context.templates, templateToType: context.templateToType, type: DivPointTemplate.self) }) @@ -348,6 +366,7 @@ public final class DivSliderTemplate: TemplateValue, Sendable { fontVariationSettingsValue.errorsOrWarnings?.map { .nestedObjectError(field: "font_variation_settings", error: $0) }, fontWeightValue.errorsOrWarnings?.map { .nestedObjectError(field: "font_weight", error: $0) }, fontWeightValueValue.errorsOrWarnings?.map { .nestedObjectError(field: "font_weight_value", error: $0) }, + letterSpacingValue.errorsOrWarnings?.map { .nestedObjectError(field: "letter_spacing", error: $0) }, offsetValue.errorsOrWarnings?.map { .nestedObjectError(field: "offset", error: $0) }, textColorValue.errorsOrWarnings?.map { .nestedObjectError(field: "text_color", error: $0) } ) @@ -358,6 +377,7 @@ public final class DivSliderTemplate: TemplateValue, Sendable { fontVariationSettings: { fontVariationSettingsValue.value }(), fontWeight: { fontWeightValue.value }(), fontWeightValue: { fontWeightValueValue.value }(), + letterSpacing: { letterSpacingValue.value }(), offset: { offsetValue.value }(), textColor: { textColorValue.value }() ) @@ -378,6 +398,7 @@ public final class DivSliderTemplate: TemplateValue, Sendable { fontVariationSettings: merged.fontVariationSettings, fontWeight: merged.fontWeight, fontWeightValue: merged.fontWeightValue, + letterSpacing: merged.letterSpacing, offset: merged.offset?.tryResolveParent(templates: templates), textColor: merged.textColor ) diff --git a/schema/div-focus.json b/schema/div-focus.json index 717f44fa7..fb0b68a27 100644 --- a/schema/div-focus.json +++ b/schema/div-focus.json @@ -47,7 +47,8 @@ "android" ], "unsupported_platforms": { - "web": "There is no direct implementation, no plans for support." + "web": "There is no direct implementation, no plans for support.", + "ios": "There is no direct implementation, no plans for support." } }, "down": { @@ -56,7 +57,8 @@ "android" ], "unsupported_platforms": { - "web": "There is no direct implementation, no plans for support." + "web": "There is no direct implementation, no plans for support.", + "ios": "There is no direct implementation, no plans for support." } }, "left": { @@ -65,7 +67,8 @@ "android" ], "unsupported_platforms": { - "web": "There is no direct implementation, no plans for support." + "web": "There is no direct implementation, no plans for support.", + "ios": "There is no direct implementation, no plans for support." } }, "up": { @@ -74,7 +77,8 @@ "android" ], "unsupported_platforms": { - "web": "There is no direct implementation, no plans for support." + "web": "There is no direct implementation, no plans for support.", + "ios": "There is no direct implementation, no plans for support." } } } diff --git a/schema/div-gallery.json b/schema/div-gallery.json index 36279bf4f..a85f9ef2a 100644 --- a/schema/div-gallery.json +++ b/schema/div-gallery.json @@ -121,7 +121,8 @@ "$description": "translations.json#/div_scrollbar", "platforms": [ "web", - "android" + "android", + "ios" ] } } diff --git a/schema/div-slider.json b/schema/div-slider.json index 7c92223a2..3f23d6c5c 100644 --- a/schema/div-slider.json +++ b/schema/div-slider.json @@ -125,7 +125,10 @@ "$description": "translations.json#/div_slider_secondary_value_accessibility", "platforms": [ "web" - ] + ], + "unsupported_platforms": { + "ios": "There is no direct implementation, no plans for support." + } }, "is_enabled": { "$ref": "common.json#/boolean_int", diff --git a/schema/div-text.json b/schema/div-text.json index 7de00f1ff..3453ebfd4 100644 --- a/schema/div-text.json +++ b/schema/div-text.json @@ -216,7 +216,10 @@ "platforms": [ "android", "web" - ] + ], + "unsupported_platforms": { + "ios": "There is no direct implementation, no plans for support." + } }, "alignment_vertical": { "$ref": "div-text-alignment-vertical.json",