@matreshka/bff 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,7 @@ import type { ComponentScrollPayload } from "@matreshka/shared/messages/client-t
10
10
  import { type FlexItemSpec } from "@matreshka/shared/types/flex-item";
11
11
  import type { PaddingPx } from "@matreshka/shared/types/padding-px";
12
12
  import type { RadiusPx } from "@matreshka/shared/types/radius-px";
13
+ import type { StackScroll } from "@matreshka/shared/types/stack-scroll";
13
14
  import type { StackConfig } from "@matreshka/shared/types/stack-config";
14
15
  import { Componentable, ComponentInstance, ComponentTreeNode, MixedWithCallbacksArray, StandaloneComponent } from "../core";
15
16
  import { Component, ComponentInitConfig, ComponentProperties, ServerComponentAction } from "./component";
@@ -24,6 +25,7 @@ export { StackDirection } from "@matreshka/shared/enums/stack-direction";
24
25
  export type { ComponentScrollPayload } from "@matreshka/shared/messages/client-to-bff/components/component-scroll-message";
25
26
  export type { DimensionalValue } from "@matreshka/shared/types/dimensional-value";
26
27
  export type { FlexItemSpec } from "@matreshka/shared/types/flex-item";
28
+ export type { StackScroll } from "@matreshka/shared/types/stack-scroll";
27
29
  export type StackProperties = {
28
30
  content: ComponentTreeNode[];
29
31
  align?: {
@@ -51,6 +53,10 @@ export type StackProperties = {
51
53
  */
52
54
  radius?: RadiusPx;
53
55
  padding?: PaddingPx;
56
+ /**
57
+ * Параметры прокрутки: `padding` → CSS `scroll-padding` на клиенте.
58
+ */
59
+ scroll?: StackScroll;
54
60
  safeArea?: SafeAreaSide[];
55
61
  overlays?: Overlay[];
56
62
  surface?: boolean;
@@ -73,6 +79,7 @@ export type StackProperties = {
73
79
  * @property content Список вложенных компонентов.
74
80
  * @property radius Скругление углов (логические px).
75
81
  * @property padding Внутренние отступы (логические px).
82
+ * @property scroll Прокрутка: `padding` — scroll-padding (логические px, схема как у `padding`).
76
83
  * @property safeArea Стороны, для которых клиент добавляет системный safe area к padding.
77
84
  * @property onClick Обработчики клика по контейнеру.
78
85
  * @property onKeyDown Обработчики нажатия клавиши, когда фокус находится на элементе.
@@ -114,6 +121,7 @@ export type StackInitConfig<ComponentType extends Componentable = Stack, Propert
114
121
  radius?: RadiusPx;
115
122
  content: MixedWithCallbacksArray<ComponentTreeNode>;
116
123
  padding?: PaddingPx;
124
+ scroll?: StackScroll;
117
125
  safeArea?: SafeAreaSide[];
118
126
  overlays?: Overlay[];
119
127
  surface?: boolean;
@@ -79,6 +79,7 @@ class Stack extends component_1.Component {
79
79
  radius: initValues.radius,
80
80
  content: (0, core_1.calculateComponents)(initValues.content),
81
81
  padding: initValues.padding,
82
+ scroll: initValues.scroll,
82
83
  safeArea: initValues.safeArea,
83
84
  overlays: initValues.overlays,
84
85
  surface: initValues.surface,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matreshka/bff",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "Matreshka BFF: server-driven UI runtime — routing, pages, context, component DSL, and platform APIs",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -62,7 +62,7 @@
62
62
  "vitest": "^4.1.0"
63
63
  },
64
64
  "dependencies": {
65
- "@matreshka/shared": "^0.15.0",
65
+ "@matreshka/shared": "^0.16.0",
66
66
  "@simplewebauthn/server": "^13.1.1",
67
67
  "@simplewebauthn/types": "^12.0.0",
68
68
  "fast-xml-parser": "^5.3.3",