diff --git a/.mapping.json b/.mapping.json index 8c8a4e9db..30135f3bc 100644 --- a/.mapping.json +++ b/.mapping.json @@ -17798,6 +17798,10 @@ "schema/div-text-gradient.json":"divkit/public/schema/div-text-gradient.json", "schema/div-text-range-background.json":"divkit/public/schema/div-text-range-background.json", "schema/div-text-range-border.json":"divkit/public/schema/div-text-range-border.json", + "schema/div-text-range-mask-base.json":"divkit/public/schema/div-text-range-mask-base.json", + "schema/div-text-range-mask-particles.json":"divkit/public/schema/div-text-range-mask-particles.json", + "schema/div-text-range-mask-solid.json":"divkit/public/schema/div-text-range-mask-solid.json", + "schema/div-text-range-mask.json":"divkit/public/schema/div-text-range-mask.json", "schema/div-text.json":"divkit/public/schema/div-text.json", "schema/div-timer.json":"divkit/public/schema/div-timer.json", "schema/div-tooltip.json":"divkit/public/schema/div-tooltip.json", diff --git a/schema/div-text-range-mask-base.json b/schema/div-text-range-mask-base.json new file mode 100644 index 000000000..62f035228 --- /dev/null +++ b/schema/div-text-range-mask-base.json @@ -0,0 +1,10 @@ +{ + "type": "object", + "properties": { + "is_enabled": { + "type": "boolean", + "$description": "translations.json#/div_text_range_mask_is_enabled", + "default_value": "true" + } + } +} diff --git a/schema/div-text-range-mask-particles.json b/schema/div-text-range-mask-particles.json new file mode 100644 index 000000000..ee7a33bd9 --- /dev/null +++ b/schema/div-text-range-mask-particles.json @@ -0,0 +1,43 @@ +{ + "allOf": [ + { + "$ref": "div-text-range-mask-base.json" + }, + { + "$description": "translations.json#/div_text_range_mask_particles", + "properties": { + "type": { + "type": "string", + "enum": [ + "particles" + ] + }, + "color": { + "$ref": "common.json#/color", + "$description": "translations.json#/div_text_range_mask_particles_color" + }, + "is_animated": { + "type": "boolean", + "default_value": "false", + "$description": "translations.json#/div_text_range_mask_particles_animated" + }, + "particle_size": { + "$ref": "div-fixed-size.json", + "$description": "translations.json#/div_text_range_mask_particles_size", + "default_value": "{\"type\":\"fixed\",\"value\":1}" + }, + "density": { + "type": "number", + "default_value": "0.8", + "$description": "translations.json#/div_text_range_mask_particles_density" + } + }, + "platforms": [ + ], + "required": [ + "type", + "color" + ] + } + ] +} diff --git a/schema/div-text-range-mask-solid.json b/schema/div-text-range-mask-solid.json new file mode 100644 index 000000000..768f152cf --- /dev/null +++ b/schema/div-text-range-mask-solid.json @@ -0,0 +1,28 @@ +{ + "allOf": [ + { + "$ref": "div-text-range-mask-base.json" + }, + { + "$description": "translations.json#/div_text_range_mask_solid", + "properties": { + "type": { + "type": "string", + "enum": [ + "solid" + ] + }, + "color": { + "$ref": "common.json#/color", + "$description": "translations.json#/div_solid_background_color" + } + }, + "platforms": [ + ], + "required": [ + "color", + "type" + ] + } + ] +} diff --git a/schema/div-text-range-mask.json b/schema/div-text-range-mask.json new file mode 100644 index 000000000..ad3282859 --- /dev/null +++ b/schema/div-text-range-mask.json @@ -0,0 +1,10 @@ +{ + "anyOf": [ + { + "$ref": "div-text-range-mask-particles.json" + }, + { + "$ref": "div-text-range-mask-solid.json" + } + ] +} diff --git a/schema/div-text.json b/schema/div-text.json index d85ad8112..98bc4f879 100644 --- a/schema/div-text.json +++ b/schema/div-text.json @@ -118,6 +118,12 @@ "android", "web" ] + }, + "mask": { + "$ref": "div-text-range-mask.json", + "$description": "translations.json#/div_text_range_mask", + "platforms": [ + ] } }, "$description": "translations.json#/div_text_range" diff --git a/schema/translations.json b/schema/translations.json index e8f670de2..01a120872 100644 --- a/schema/translations.json +++ b/schema/translations.json @@ -2387,6 +2387,38 @@ "en": "Line spacing of the text. Units specified in `font_size_unit`.", "ru": "Межстрочный интервал (интерлиньяж) текста. Измеряется в единицах, заданных в `font_size_unit`." }, + "div_text_range_mask": { + "en": "A mask that hides a part of text, text can be revealed by disabling mask through `is_enabled` property.", + "ru": "Маска, закрывающая участок текста, для показа скрытого текста маска может быть отключена через свойство `is_enabled`." + }, + "div_text_range_mask_particles": { + "en": "A mask to hide text (spoiler) that looks like randomly distributed particles (telegram alike).", + "ru": "Маска для скрытия текста (спойлер) в виде случайно расположенных частиц, как в телеграмме." + }, + "div_text_range_mask_particles_animated": { + "en": "Defines whether particles on the mask will be animated or not. Animation looks like smooth random particle movements (telegram alike).", + "ru": "Определяет будут ли частички на маске анимироваться или нет. Анимация выглядит как плавное перемещение частиц по маске, как в телеграмме." + }, + "div_text_range_mask_particles_color": { + "en": "Color of particles on the mask.", + "ru": "Цвет частиц на маске." + }, + "div_text_range_mask_particles_density": { + "en": "Density of particles on the mask, interpreted as a probability of a particle to spawn in a given point on the mask.", + "ru": "Плотность частиц на маске, интерпретируется как вероятность частицы появиться в заданной точке маски." + }, + "div_text_range_mask_particles_size": { + "en": "Size of a single particle on a mask.", + "ru": "Размер одной частицы на маске." + }, + "div_text_range_mask_is_enabled": { + "en": "Controls mask state: if set to `true` mask will hide specified part of the text, otherwise the text will be shown.", + "ru": "Управляет состоянием маски, при значении `true` указанная часть текста будет скрыта под маской, иначе текст будет показан." + }, + "div_text_range_mask_solid": { + "en": "A mask to hide text (spoiler) that looks like a rectangle filled with color specified by `color` parameter.", + "ru": "Маска для скрытия текста (спойлер) в виде прямоугольника, залитого указанным в параметре `color` цветом, как в телеграмме." + }, "div_text_range_shadow": { "en": "Parameters of the shadow applied to the character range.", "ru": "Параметры тени, применяемой к диапазону символов."