@elcrm/telegram 0.0.70 → 0.0.71

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.
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from "react";
2
2
  declare let toggleBottomsheet: () => void;
3
3
  type TBottomsheet = {
4
4
  children: React.ReactNode;
@@ -13,6 +13,10 @@ type TBottomsheet = {
13
13
  * @param {string} [props.title] - Заголовок окна (опционально)
14
14
  * @param {boolean} [props.isOverlay=true] - Показывать ли затемняющую подложку (по умолчанию true)
15
15
  */
16
- declare const BottomSheet: ({ children, title, isOverlay }: TBottomsheet) => import("react/jsx-runtime").JSX.Element;
16
+ declare const BottomSheet: ({
17
+ children,
18
+ title,
19
+ isOverlay,
20
+ }: TBottomsheet) => import("react/jsx-runtime").JSX.Element;
17
21
  export default BottomSheet;
18
22
  export { toggleBottomsheet };
@@ -0,0 +1,7 @@
1
+ export declare const _debug: {
2
+ is: boolean;
3
+ MainButton: any;
4
+ BackButton: any;
5
+ };
6
+ declare const Header: () => import("react/jsx-runtime").JSX.Element;
7
+ export default Header;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,12 @@
1
- import { default as React } from 'react';
2
1
  import { Modal as _Modal } from './Madal/index';
2
+ type MainButton = {
3
+ text?: string;
4
+ color?: string;
5
+ textColor?: string;
6
+ isActive?: boolean;
7
+ callback?: () => void;
8
+ page: string;
9
+ };
3
10
  declare namespace Telegram {
4
11
  const WebApp: any;
5
12
  const getUser: () => any;
@@ -15,10 +22,16 @@ declare namespace Telegram {
15
22
  */
16
23
  const Notice: (type: any, text?: any, thema?: any) => void;
17
24
  const Header: () => import("react/jsx-runtime").JSX.Element;
25
+ /**
26
+ * @param {TAction[]} [actions] - Массив действий для отображения в футере
27
+ * @param {React.ReactNode} [children] - Дополнительные дочерние элементы
28
+ * @param {string} [className] - Пользовательский CSS-класс
29
+ * @param {string} [page] - Текущая страница для определения активного действия
30
+ * @param {"row"|"column"} [direction="row"] - Направление расположения элементов футера
31
+ * @param {(page: string) => void} [onPageChange] - Функция для обработки смены страницы
32
+ */
18
33
  const Footer: ({ actions, children, className, page, onPageChange, direction, }: import("./Footer").TFooter) => import("react/jsx-runtime").JSX.Element;
19
34
  /**
20
- * Компонент BottomSheet
21
- *
22
35
  * @param {object} props - параметры компонента
23
36
  * @param {React.ReactNode} props.children - Контент внутри шита
24
37
  * @param {string} [props.title] - Заголовок окна (опционально)
@@ -35,24 +48,17 @@ declare namespace Telegram {
35
48
  callback: never[];
36
49
  set: (j: MainButton | boolean) => void;
37
50
  };
38
- const BackButton: {
39
- state: boolean[];
40
- listen: any;
41
- router: (j: any) => void;
42
- set: (j: any) => void;
43
- };
51
+ /**
52
+ * @param {object} params - параметры компонента
53
+ * @param {string} [params.page] - Текущая страница для определения активного действия
54
+ * @param {() => void} [params.callback] - Функция для обработки смены страницы
55
+ */
56
+ const BackButton: (params: boolean | {
57
+ page?: string;
58
+ callback?: () => void;
59
+ }) => void;
44
60
  }
45
- type MainButton = {
46
- text?: string;
47
- color?: string;
48
- textColor?: string;
49
- isActive?: boolean;
50
- callback?: () => void;
51
- page: string;
52
- };
53
61
  /**
54
- * Компонент Footer
55
- *
56
62
  * @param {TAction[]} [actions] - Массив действий для отображения в футере
57
63
  * @param {React.ReactNode} [children] - Дополнительные дочерние элементы
58
64
  * @param {string} [className] - Пользовательский CSS-класс
@@ -61,17 +67,39 @@ type MainButton = {
61
67
  * @param {(page: string) => void} [onPageChange] - Функция для обработки смены страницы
62
68
  */
63
69
  export declare const Footer: ({ actions, children, className, page, onPageChange, direction, }: import('./Footer').TFooter) => import("react/jsx-runtime").JSX.Element;
64
- export declare const Header: () => import("react/jsx-runtime").JSX.Element, toggleBottomSheet: () => void, Modal: typeof _Modal, MainButton: {
65
- callback: never[];
66
- set: (j: MainButton | boolean) => void;
67
- }, BackButton: {
68
- state: boolean[];
69
- listen: any;
70
- router: (j: any) => void;
71
- set: (j: any) => void;
72
- }, BottomSheet: ({ children, title, isOverlay }: {
70
+ /**
71
+ * @param {object} props - параметры компонента
72
+ * @param {React.ReactNode} props.children - Контент внутри шита
73
+ * @param {string} [props.title] - Заголовок окна (опционально)
74
+ * @param {boolean} [props.isOverlay=true] - Показывать ли затемняющую подложку (по умолчанию true)
75
+ */
76
+ export declare const BottomSheet: ({ children, title, isOverlay }: {
73
77
  children: React.ReactNode;
74
78
  title?: string;
75
79
  isOverlay?: boolean;
76
- }) => import("react/jsx-runtime").JSX.Element, WebApp: any, getUser: () => any, Notice: (type: any, text?: any, thema?: any) => void;
80
+ }) => import("react/jsx-runtime").JSX.Element;
81
+ /**
82
+ * @param {object} params - параметры компонента
83
+ * @param {string} [params.page] - Текущая страница для определения активного действия
84
+ * @param {() => void} [params.callback] - Функция для обработки смены страницы
85
+ */
86
+ export declare const BackButton: (params: boolean | {
87
+ page?: string;
88
+ callback?: () => void;
89
+ }) => void;
90
+ /**
91
+ * Показывает уведомление с поддержкой тем оформления и хаптик-отклика.
92
+ * @param {string|object} type - Тип уведомления ('error', 'success', 'warning') или объект: {type, text, thema}.
93
+ * @param {string} [text] - Текст уведомления.
94
+ * @param {boolean} [thema] - Признак применения темы оформния.
95
+ *
96
+ * Пример использования:
97
+ * Notice('error', 'Что-то пошло не так');
98
+ * Notice({type: 'success', text: 'Операция выполнена', thema: true});
99
+ */
100
+ export declare const Notice: (type: any, text?: any, thema?: any) => void;
101
+ export declare const Header: () => import("react/jsx-runtime").JSX.Element, toggleBottomSheet: () => void, Modal: typeof _Modal, MainButton: {
102
+ callback: never[];
103
+ set: (j: MainButton | boolean) => void;
104
+ }, WebApp: any, getUser: () => any;
77
105
  export default Telegram;