diff --git a/.mapping.json b/.mapping.json index 89e802b58..c163c666a 100644 --- a/.mapping.json +++ b/.mapping.json @@ -14927,6 +14927,9 @@ "schema/div-neighbour-page-size.json":"divkit/public/schema/div-neighbour-page-size.json", "schema/div-nine-patch-background.json":"divkit/public/schema/div-nine-patch-background.json", "schema/div-page-size.json":"divkit/public/schema/div-page-size.json", + "schema/div-page-transformation-overlap.json":"divkit/public/schema/div-page-transformation-overlap.json", + "schema/div-page-transformation-slide.json":"divkit/public/schema/div-page-transformation-slide.json", + "schema/div-page-transformation.json":"divkit/public/schema/div-page-transformation.json", "schema/div-pager-layout-mode.json":"divkit/public/schema/div-pager-layout-mode.json", "schema/div-pager.json":"divkit/public/schema/div-pager.json", "schema/div-patch.json":"divkit/public/schema/div-patch.json", diff --git a/schema/div-page-transformation-overlap.json b/schema/div-page-transformation-overlap.json new file mode 100644 index 000000000..cb939cc3b --- /dev/null +++ b/schema/div-page-transformation-overlap.json @@ -0,0 +1,49 @@ +{ + "type": "object", + "$description": "translations.json#/div_pager_page_transformation_overlap", + "properties": { + "type": { + "type": "string", + "enum": [ + "overlap" + ] + }, + "next_page_alpha": { + "type": "number", + "default_value": "1.0", + "constraint": "number >= 0.0 && number <= 1.0", + "$description": "translations.json#/div_pager_next_page_alpha" + }, + "previous_page_alpha": { + "type": "number", + "default_value": "1.0", + "constraint": "number >= 0.0 && number <= 1.0", + "$description": "translations.json#/div_pager_previous_page_alpha" + }, + "next_page_scale": { + "type": "number", + "default_value": "1.0", + "constraint": "number >= 0.0", + "$description": "translations.json#/div_pager_next_page_scale" + }, + "previous_page_scale": { + "type": "number", + "default_value": "1.0", + "constraint": "number >= 0.0", + "$description": "translations.json#/div_pager_previous_page_scale" + }, + "reversed_stacking_order": { + "$ref": "common.json#/boolean_int", + "default_value": "false", + "$description": "translations.json#/div_pager_page_transformation_overlap_reversed_stacking_order" + }, + "interpolator": { + "$ref": "div-animation-interpolator.json", + "default_value": "ease_in_out", + "$description": "translations.json#/div_pager_page_transformation_interpolator" + } + }, + "required": [ + "type" + ] +} diff --git a/schema/div-page-transformation-slide.json b/schema/div-page-transformation-slide.json new file mode 100644 index 000000000..2cc584be7 --- /dev/null +++ b/schema/div-page-transformation-slide.json @@ -0,0 +1,44 @@ +{ + "type": "object", + "$description": "translations.json#/div_pager_page_transformation_slide", + "properties": { + "type": { + "type": "string", + "enum": [ + "slide" + ] + }, + "next_page_alpha": { + "type": "number", + "default_value": "1.0", + "constraint": "number >= 0.0 && number <= 1.0", + "$description": "translations.json#/div_pager_next_page_alpha" + }, + "previous_page_alpha": { + "type": "number", + "default_value": "1.0", + "constraint": "number >= 0.0 && number <= 1.0", + "$description": "translations.json#/div_pager_previous_page_alpha" + }, + "next_page_scale": { + "type": "number", + "default_value": "1.0", + "constraint": "number >= 0.0", + "$description": "translations.json#/div_pager_next_page_scale" + }, + "previous_page_scale": { + "type": "number", + "default_value": "1.0", + "constraint": "number >= 0.0", + "$description": "translations.json#/div_pager_previous_page_scale" + }, + "interpolator": { + "$ref": "div-animation-interpolator.json", + "default_value": "ease_in_out", + "$description": "translations.json#/div_pager_page_transformation_interpolator" + } + }, + "required": [ + "type" + ] +} diff --git a/schema/div-page-transformation.json b/schema/div-page-transformation.json new file mode 100644 index 000000000..f53ab14a0 --- /dev/null +++ b/schema/div-page-transformation.json @@ -0,0 +1,12 @@ +{ + "anyOf": [ + { + "$description": "translations.json#/div_pager_page_transformation_slide", + "$ref": "div-page-transformation-slide.json" + }, + { + "$description": "translations.json#/div_pager_page_transformation_overlap", + "$ref": "div-page-transformation-overlap.json" + } + ] +} diff --git a/schema/div-pager.json b/schema/div-pager.json index b25ff5359..822ac21aa 100644 --- a/schema/div-pager.json +++ b/schema/div-pager.json @@ -56,6 +56,11 @@ "default_value": "0", "$description": "translations.json#/div_pager_default_item" }, + "page_transformation": { + "$ref": "div-page-transformation.json", + "platforms": [], + "$description": "translations.json#/div_pager_page_transformation" + }, "infinite_scroll": { "$ref": "common.json#/boolean_int", "default_value": "false", diff --git a/schema/translations.json b/schema/translations.json index 76652bd60..e87bfb688 100644 --- a/schema/translations.json +++ b/schema/translations.json @@ -1203,6 +1203,42 @@ "en": "Pager orientation.", "ru": "Ориентация пейджера." }, + "div_pager_page_transformation": { + "en": "Page transformation during movement.", + "ru": "Преобразование страницы пейджера во время движения." + }, + "div_pager_page_transformation_overlap": { + "en": "The pages are stacked when the pager is scrolled overlapping each other.", + "ru": "Страницы собираются в стопку при анимации, перекрывая друг друга." + }, + "div_pager_page_transformation_overlap_reversed_stacking_order": { + "en": "If the value set to false, the next pages will be stacked on top the previous ones. If the value set to true, then the opposite will occur. The next page is always a page with a large sequential number in the list of `items`, regardless of the direction of scrolling.", + "ru": "При значении false следующие страницы будут собираться в стопку над предыдущими. При значении true - наоборот. Следующая страница - это всегда страница с большим порядковым номером в списке `items`, независимо от направления листания." + }, + "div_pager_page_transformation_slide": { + "en": "The pages are moving when the pager is flipping without overlaping each other.", + "ru": "Страницы двигаются во время листания пейджера, не перекрывая друг друга." + }, + "div_pager_page_transformation_interpolator": { + "en": "Tranformation speed nature. When the value is set to `spring` — animation of damping fluctuations cut to 0.7 with the `damping=1` parameter. Other options correspond to the Bezier curve:
  • `linear` — cubic-bezier(0, 0, 1, 1);
  • `ease` — cubic-bezier(0.25, 0.1, 0.25, 1);
  • `ease_in` — cubic-bezier(0.42, 0, 1, 1);
  • `ease_out` — cubic-bezier(0, 0, 0.58, 1);
  • `ease_in_out` — cubic-bezier(0.42, 0, 0.58, 1).
  • ", + "ru": "Transformation скорости анимации. При значении `spring` — обрезанная до 0.7 анимация затухающих колебаний с параметром `damping=1`. Остальные варианты соответствует кривой Безье:
  • `linear` — cubic-bezier(0, 0, 1, 1);
  • `ease` — cubic-bezier(0.25, 0.1, 0.25, 1);
  • `ease_in` — cubic-bezier(0.42, 0, 1, 1);
  • `ease_out` — cubic-bezier(0, 0, 0.58, 1);
  • `ease_in_out` — cubic-bezier(0.42, 0, 0.58, 1).
  • " + }, + "div_pager_next_page_alpha": { + "en": "Minimum alpha of the next page during pager scrolling in bounds [0, 1]. The next page is always a page with a large sequential number in the list of `items`, regardless of the direction of scrolling.", + "ru": "Минимальная прозрачность следующей страницы во время листания пейджера в границах [0, 1]. Следующая страница - это всегда страница с большим порядковым номером в списке `items`, независимо от направления листания." + }, + "div_pager_previous_page_alpha": { + "en": "Minimum alpha of the previous page during pager scrolling in bounds [0, 1]. The previous page is always a page with a lower sequential number in the list of `items`, regardless of the direction of scrolling.", + "ru": "Минимальная прозрачность предыдущей страницы во время листания пейджера в границах [0, 1]. Предыдущая страница - это всегда страница с меньшим порядковым номером с списке `items`, независимо от направления листания." + }, + "div_pager_next_page_scale": { + "en": "Scale of the next page during pager scrolling. The next page is always a page with a large sequential number in the list of `items`, regardless of the direction of scrolling.", + "ru": "Маштабирование следующей страницы во время листания пейджера. Следующая страница - это всегда страница с большим порядковым номером в списке `items`, независимо от направления листания." + }, + "div_pager_previous_page_scale": { + "en": "Scale of the previous page during pager scrolling. The previous page is always a page with a lower sequential number in the list of `items`, regardless of the direction of scrolling.", + "ru": "Маштабирование предыдущей страницы во время листания пейджера. Предыдущая страница - это всегда страница с меньшим порядковым номером с списке `items`, независимо от направления листания." + }, "div_pager_restrict_parent_scroll": { "en": "If the parameter is enabled, the pager won't transmit the scroll gesture to the parent element.", "ru": "При включенном параметре пейджер не будет передавать жест скролла родительскому элементу."