wenay-react2 1.0.1
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.
- package/lib/common/api.d.ts +17 -0
- package/lib/common/api.js +24 -0
- package/lib/common/src/components/Buttons/MiniButton.d.ts +17 -0
- package/lib/common/src/components/Buttons/MiniButton.js +18 -0
- package/lib/common/src/components/Buttons/index.d.ts +1 -0
- package/lib/common/src/components/Buttons/index.js +1 -0
- package/lib/common/src/components/Dnd/DraggableOutlineDiv.d.ts +1 -0
- package/lib/common/src/components/Dnd/DraggableOutlineDiv.js +31 -0
- package/lib/common/src/components/Dnd/RNDFunc.d.ts +13 -0
- package/lib/common/src/components/Dnd/RNDFunc.js +111 -0
- package/lib/common/src/components/Dnd/RNDFunc3.d.ts +81 -0
- package/lib/common/src/components/Dnd/RNDFunc3.js +380 -0
- package/lib/common/src/components/Dnd/Resizable.d.ts +15 -0
- package/lib/common/src/components/Dnd/Resizable.js +36 -0
- package/lib/common/src/components/Dnd/index.d.ts +4 -0
- package/lib/common/src/components/Dnd/index.js +4 -0
- package/lib/common/src/components/Input.d.ts +28 -0
- package/lib/common/src/components/Input.js +30 -0
- package/lib/common/src/components/Menu/RightMenu.d.ts +22 -0
- package/lib/common/src/components/Menu/RightMenu.js +179 -0
- package/lib/common/src/components/Menu/StickerMenu.d.ts +5 -0
- package/lib/common/src/components/Menu/StickerMenu.js +110 -0
- package/lib/common/src/components/Menu/index.d.ts +2 -0
- package/lib/common/src/components/Menu/index.js +2 -0
- package/lib/common/src/components/Modal/LeftModal.d.ts +58 -0
- package/lib/common/src/components/Modal/LeftModal.js +284 -0
- package/lib/common/src/components/Modal/Modal.d.ts +31 -0
- package/lib/common/src/components/Modal/Modal.js +104 -0
- package/lib/common/src/components/Modal/index.d.ts +2 -0
- package/lib/common/src/components/Modal/index.js +2 -0
- package/lib/common/src/components/MyResizeObserver.d.ts +10 -0
- package/lib/common/src/components/MyResizeObserver.js +94 -0
- package/lib/common/src/components/Other.d.ts +9 -0
- package/lib/common/src/components/Other.js +31 -0
- package/lib/common/src/components/Parameters.d.ts +10 -0
- package/lib/common/src/components/Parameters.js +24 -0
- package/lib/common/src/components/ParametersEngine.d.ts +8 -0
- package/lib/common/src/components/ParametersEngine.js +373 -0
- package/lib/common/src/components/index.d.ts +9 -0
- package/lib/common/src/components/index.js +9 -0
- package/lib/common/src/hooks/index.d.ts +3 -0
- package/lib/common/src/hooks/index.js +3 -0
- package/lib/common/src/hooks/useAddDownAnyKey.d.ts +5 -0
- package/lib/common/src/hooks/useAddDownAnyKey.js +22 -0
- package/lib/common/src/hooks/useDraggable.d.ts +15 -0
- package/lib/common/src/hooks/useDraggable.js +134 -0
- package/lib/common/src/hooks/useOutside.d.ts +40 -0
- package/lib/common/src/hooks/useOutside.js +68 -0
- package/lib/common/src/logs/logs.d.ts +163 -0
- package/lib/common/src/logs/logs.js +249 -0
- package/lib/common/src/logs/logs3.d.ts +63 -0
- package/lib/common/src/logs/logs3.js +245 -0
- package/lib/common/src/logs/miniLogs.d.ts +5 -0
- package/lib/common/src/logs/miniLogs.js +51 -0
- package/lib/common/src/menu/menu.d.ts +72 -0
- package/lib/common/src/menu/menu.js +230 -0
- package/lib/common/src/menu/menuMouse.d.ts +21 -0
- package/lib/common/src/menu/menuMouse.js +32 -0
- package/lib/common/src/menu/menuR.d.ts +17 -0
- package/lib/common/src/menu/menuR.js +116 -0
- package/lib/common/src/myChart/1/myChart.d.ts +40 -0
- package/lib/common/src/myChart/1/myChart.js +306 -0
- package/lib/common/src/myChart/1/myChartTest.d.ts +1 -0
- package/lib/common/src/myChart/1/myChartTest.js +45 -0
- package/lib/common/src/myChart/chartEngine/chartEngineReact.d.ts +164 -0
- package/lib/common/src/myChart/chartEngine/chartEngineReact.js +834 -0
- package/lib/common/src/styles/index.d.ts +1 -0
- package/lib/common/src/styles/index.js +1 -0
- package/lib/common/src/styles/styleGrid.d.ts +20 -0
- package/lib/common/src/styles/styleGrid.js +50 -0
- package/lib/common/src/utils/applyTransactionAsyncUpdate.d.ts +42 -0
- package/lib/common/src/utils/applyTransactionAsyncUpdate.js +97 -0
- package/lib/common/src/utils/arrayPromise.d.ts +5 -0
- package/lib/common/src/utils/arrayPromise.js +16 -0
- package/lib/common/src/utils/cache.d.ts +31 -0
- package/lib/common/src/utils/cache.js +119 -0
- package/lib/common/src/utils/index.d.ts +6 -0
- package/lib/common/src/utils/index.js +6 -0
- package/lib/common/src/utils/inputAutoStep.d.ts +4 -0
- package/lib/common/src/utils/inputAutoStep.js +79 -0
- package/lib/common/src/utils/mapMemory.d.ts +26 -0
- package/lib/common/src/utils/mapMemory.js +72 -0
- package/lib/common/src/utils/pageVisibilityContext.d.ts +5 -0
- package/lib/common/src/utils/pageVisibilityContext.js +18 -0
- package/lib/common/updateBy.d.ts +12 -0
- package/lib/common/updateBy.js +88 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/style/menuRight.css +139 -0
- package/lib/style/style.css +334 -0
- package/lib/tsconfig.json +6 -0
- package/package.json +50 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "../style/menuRight.css";
|
|
2
|
+
import "../style/style.css";
|
|
3
|
+
export * from "./src/components";
|
|
4
|
+
export * from "./src/hooks";
|
|
5
|
+
export * from "./src/styles";
|
|
6
|
+
export * from "./src/utils";
|
|
7
|
+
export * from "./src/menu/menu";
|
|
8
|
+
export * from "./src/menu/menuMouse";
|
|
9
|
+
export * from "./src/menu/menuR";
|
|
10
|
+
export * from "./src/logs/logs";
|
|
11
|
+
export * from "./src/logs/logs3";
|
|
12
|
+
export * from "./src/logs/miniLogs";
|
|
13
|
+
export * from "./src/myChart/1/myChart";
|
|
14
|
+
export * from "./src/myChart/1/myChartTest";
|
|
15
|
+
export * from "./src/myChart/chartEngine/chartEngineReact";
|
|
16
|
+
export * from "./updateBy";
|
|
17
|
+
export declare function test(): number;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// ... existing code ...
|
|
2
|
+
import "../style/menuRight.css";
|
|
3
|
+
import "../style/style.css";
|
|
4
|
+
// Папки с index.ts
|
|
5
|
+
export * from "./src/components";
|
|
6
|
+
export * from "./src/hooks";
|
|
7
|
+
export * from "./src/styles";
|
|
8
|
+
export * from "./src/utils";
|
|
9
|
+
// Папки без index.ts, экспортируем каждый файл отдельно
|
|
10
|
+
export * from "./src/menu/menu";
|
|
11
|
+
export * from "./src/menu/menuMouse";
|
|
12
|
+
export * from "./src/menu/menuR";
|
|
13
|
+
export * from "./src/logs/logs";
|
|
14
|
+
export * from "./src/logs/logs3";
|
|
15
|
+
export * from "./src/logs/miniLogs";
|
|
16
|
+
export * from "./src/myChart/1/myChart";
|
|
17
|
+
export * from "./src/myChart/1/myChartTest";
|
|
18
|
+
export * from "./src/myChart/chartEngine/chartEngineReact";
|
|
19
|
+
// Файлы в корне src/common
|
|
20
|
+
export * from "./updateBy";
|
|
21
|
+
export function test() {
|
|
22
|
+
return 5;
|
|
23
|
+
}
|
|
24
|
+
// ... existing code ...
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare function MiniButton({ name, arr, get, onClick, style }: {
|
|
3
|
+
name: string;
|
|
4
|
+
arr: (string | number)[];
|
|
5
|
+
get: () => {
|
|
6
|
+
[k: string]: boolean;
|
|
7
|
+
};
|
|
8
|
+
onClick: (index: number) => void;
|
|
9
|
+
style?: React.CSSProperties | undefined;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function MiniButton2({ name, children, statusDef, className }: {
|
|
12
|
+
name: string;
|
|
13
|
+
statusDef?: boolean;
|
|
14
|
+
children: React.ReactElement | (() => React.ReactElement);
|
|
15
|
+
className?: string;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const MiniButton3: typeof MiniButton2;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from "../../hooks";
|
|
3
|
+
export function MiniButton({ name, arr, get, onClick, style }) {
|
|
4
|
+
const data = get();
|
|
5
|
+
const a = Object.values(data);
|
|
6
|
+
const status = a.length > 0 && !(a.indexOf(false) >= 0);
|
|
7
|
+
return _jsx(Button, { style: style, className: "newButtonSimple", button: (e) => _jsx("div", { className: status ? "msTradeAlt msTradeActive" : "msTradeAlt", children: name }), children: _jsx(_Fragment, { children: _jsx("div", { className: "maxSize", style: { height: "auto", display: "flex", flexWrap: "wrap" }, children: arr.map((k, i) => _jsx("div", { className: data[k] ? 'msTradeAlt msTradeActive' : 'msTradeAlt', onClick: () => {
|
|
8
|
+
const t = data;
|
|
9
|
+
t[k] = !(t[k] ?? false);
|
|
10
|
+
onClick(i);
|
|
11
|
+
}, children: k }, i)) }) }) });
|
|
12
|
+
}
|
|
13
|
+
export function MiniButton2({ name, children, statusDef, className = "newButtonSimple" }) {
|
|
14
|
+
const content = typeof children === 'function' ? children() : children;
|
|
15
|
+
return _jsx(Button, { className: className, statusDef: statusDef, button: (e) => _jsx("div", { className: e ? "msTradeAlt msTradeActive" : "msTradeAlt", children: name }), children: content });
|
|
16
|
+
}
|
|
17
|
+
// Deprecated: Use MiniButton2 instead
|
|
18
|
+
export const MiniButton3 = MiniButton2;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MiniButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MiniButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function DraggableOutlineDiv(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useState } from "react";
|
|
3
|
+
const ANIMATION_DURATION = 500; // длительность анимации в мс
|
|
4
|
+
export function DraggableOutlineDiv() {
|
|
5
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
6
|
+
const [animationFinished, setAnimationFinished] = useState(false);
|
|
7
|
+
const timerRef = useRef(null);
|
|
8
|
+
const handleMouseDown = (e) => {
|
|
9
|
+
// Проверяем, что нажата именно левая кнопка мыши
|
|
10
|
+
if (e.button !== 0)
|
|
11
|
+
return;
|
|
12
|
+
setIsDragging(true);
|
|
13
|
+
setAnimationFinished(false);
|
|
14
|
+
// Запускаем анимацию - по истечении времени флаг animationFinished становится true
|
|
15
|
+
timerRef.current = window.setTimeout(() => {
|
|
16
|
+
setAnimationFinished(true); // Анимация завершена – обводка остается
|
|
17
|
+
timerRef.current = null;
|
|
18
|
+
}, ANIMATION_DURATION);
|
|
19
|
+
};
|
|
20
|
+
const handleMouseUp = () => {
|
|
21
|
+
setIsDragging(false);
|
|
22
|
+
setAnimationFinished(false);
|
|
23
|
+
// Если анимация еще не завершилась, отменяем таймер и убираем обводку
|
|
24
|
+
if (timerRef.current) {
|
|
25
|
+
window.clearTimeout(timerRef.current);
|
|
26
|
+
timerRef.current = null;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
return (_jsx("div", { className: `draggable-div ${isDragging ? 'outline-animation' : ''} ${animationFinished ? 'outline-complete' : ''}`, onMouseDown: handleMouseDown, onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, children: "\u0421\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435 \u0434\u0438\u0432\u0430" }));
|
|
30
|
+
}
|
|
31
|
+
;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare function Drag2({ children, onY, onX, x, y, last, onStart, onStop, }: {
|
|
2
|
+
children: React.JSX.Element;
|
|
3
|
+
onX?: (x: number) => void;
|
|
4
|
+
onY?: (y: number) => void;
|
|
5
|
+
x?: number;
|
|
6
|
+
y?: number;
|
|
7
|
+
last?: React.RefObject<{
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
}>;
|
|
11
|
+
onStart?: () => void;
|
|
12
|
+
onStop?: () => void;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
3
|
+
//
|
|
4
|
+
export function Drag2({ children, onY, onX, x = 0, y = 0, last, onStart, onStop, }) {
|
|
5
|
+
const lastC = useRef(null);
|
|
6
|
+
const lastT = useRef(null);
|
|
7
|
+
const [a, setA] = useState(false);
|
|
8
|
+
const [b, setB] = useState(false);
|
|
9
|
+
const lastD = useRef(last?.current ?? { y: x, x: y });
|
|
10
|
+
// Обновляем значения `lastD` при изменении `x` или `y`
|
|
11
|
+
useLayoutEffect(() => {
|
|
12
|
+
lastD.current.x = x;
|
|
13
|
+
lastD.current.y = y;
|
|
14
|
+
}, [x, y]);
|
|
15
|
+
// Основная логика обработки событий перемещения
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
if (!(a || b)) {
|
|
18
|
+
onStop?.();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (a) {
|
|
22
|
+
const handleMouseMove = (e) => {
|
|
23
|
+
if (!lastC.current) {
|
|
24
|
+
lastC.current = { x: e.clientX, y: e.clientY };
|
|
25
|
+
}
|
|
26
|
+
const data = lastC.current;
|
|
27
|
+
// Вычисляем и обновляем координаты
|
|
28
|
+
lastD.current.x = e.clientX + data.x;
|
|
29
|
+
lastD.current.y = e.clientY + data.y;
|
|
30
|
+
onX?.(lastD.current.x);
|
|
31
|
+
onY?.(lastD.current.y);
|
|
32
|
+
e.stopPropagation();
|
|
33
|
+
};
|
|
34
|
+
const handleMouseUp = () => {
|
|
35
|
+
document.body.removeEventListener("mousemove", handleMouseMove);
|
|
36
|
+
document.body.removeEventListener("mouseup", handleMouseUp);
|
|
37
|
+
lastC.current = null;
|
|
38
|
+
setA(false);
|
|
39
|
+
};
|
|
40
|
+
document.body.addEventListener("mousemove", handleMouseMove);
|
|
41
|
+
document.body.addEventListener("mouseup", handleMouseUp);
|
|
42
|
+
onStart?.();
|
|
43
|
+
return () => {
|
|
44
|
+
document.body.removeEventListener("mousemove", handleMouseMove);
|
|
45
|
+
document.body.removeEventListener("mouseup", handleMouseUp);
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
if (b) {
|
|
49
|
+
const handleTouchMove = (e) => {
|
|
50
|
+
const data = lastT.current;
|
|
51
|
+
if (!data)
|
|
52
|
+
return;
|
|
53
|
+
const touch = Array.from(e.changedTouches).find((t) => t.identifier === data.id);
|
|
54
|
+
if (!touch)
|
|
55
|
+
return;
|
|
56
|
+
// Вычисляем и обновляем координаты
|
|
57
|
+
lastD.current.x = touch.clientX + data.x;
|
|
58
|
+
lastD.current.y = touch.clientY + data.y;
|
|
59
|
+
onX?.(lastD.current.x);
|
|
60
|
+
onY?.(lastD.current.y);
|
|
61
|
+
e.stopPropagation();
|
|
62
|
+
};
|
|
63
|
+
const handleTouchEnd = (e) => {
|
|
64
|
+
const data = lastT.current;
|
|
65
|
+
if (data) {
|
|
66
|
+
const touch = Array.from(e.changedTouches).find((t) => t.identifier === data.id);
|
|
67
|
+
if (touch) {
|
|
68
|
+
lastT.current = null;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (!lastT.current) {
|
|
72
|
+
document.body.removeEventListener("touchmove", handleTouchMove);
|
|
73
|
+
document.body.removeEventListener("touchend", handleTouchEnd);
|
|
74
|
+
setB(false);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
document.body.addEventListener("touchmove", handleTouchMove);
|
|
78
|
+
document.body.addEventListener("touchend", handleTouchEnd);
|
|
79
|
+
onStart?.();
|
|
80
|
+
return () => {
|
|
81
|
+
document.body.removeEventListener("touchmove", handleTouchMove);
|
|
82
|
+
document.body.removeEventListener("touchend", handleTouchEnd);
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
}, [a, b, onX, onY, onStart, onStop]);
|
|
86
|
+
// Создаем элемент для перемещения
|
|
87
|
+
return useMemo(() => (_jsx("div", { style: {
|
|
88
|
+
width: "auto",
|
|
89
|
+
height: "auto",
|
|
90
|
+
}, onTouchStart: (e) => {
|
|
91
|
+
const touch = e.changedTouches[0];
|
|
92
|
+
if (touch) {
|
|
93
|
+
lastD.current.x = x;
|
|
94
|
+
lastD.current.y = y;
|
|
95
|
+
lastT.current = {
|
|
96
|
+
x: lastD.current.x - touch.clientX,
|
|
97
|
+
y: lastD.current.y - touch.clientY,
|
|
98
|
+
id: touch.identifier,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
setB(true);
|
|
102
|
+
}, onMouseDown: (e) => {
|
|
103
|
+
lastD.current.x = x;
|
|
104
|
+
lastD.current.y = y;
|
|
105
|
+
lastC.current = {
|
|
106
|
+
x: lastD.current.x - e.clientX,
|
|
107
|
+
y: lastD.current.y - e.clientY,
|
|
108
|
+
};
|
|
109
|
+
setA(true);
|
|
110
|
+
}, children: children })), [children, x, y]);
|
|
111
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
type tPosition = {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
};
|
|
6
|
+
type tSize = {
|
|
7
|
+
height: number | string;
|
|
8
|
+
width: number | string;
|
|
9
|
+
};
|
|
10
|
+
type tRND = {
|
|
11
|
+
position: tPosition;
|
|
12
|
+
size: tSize;
|
|
13
|
+
};
|
|
14
|
+
type tDivRndBase = {
|
|
15
|
+
zIndex?: number;
|
|
16
|
+
disableDragging?: () => boolean;
|
|
17
|
+
keyForSave?: string;
|
|
18
|
+
onUpdate?: (data: any) => void;
|
|
19
|
+
position?: tPosition;
|
|
20
|
+
size?: tSize;
|
|
21
|
+
moveOnlyHeader?: boolean;
|
|
22
|
+
onCLickClose?: () => void;
|
|
23
|
+
header?: React.ReactElement | boolean;
|
|
24
|
+
overflow?: boolean;
|
|
25
|
+
sizeByWindow?: boolean;
|
|
26
|
+
limit?: {
|
|
27
|
+
x?: {
|
|
28
|
+
max?: number;
|
|
29
|
+
min?: number;
|
|
30
|
+
};
|
|
31
|
+
y?: {
|
|
32
|
+
max?: number;
|
|
33
|
+
min?: number;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
children: React.ReactElement | ((update: number) => React.ReactElement);
|
|
37
|
+
className?: string;
|
|
38
|
+
};
|
|
39
|
+
export declare const ExRNDMap3: Map<string, tRND>;
|
|
40
|
+
export declare const DivRnd3: typeof DivRndBase3;
|
|
41
|
+
/**
|
|
42
|
+
* Компонент-обёртка над react-rnd.
|
|
43
|
+
* Обеспечивает перетаскивание и изменение размеров, опциональный заголовок и кнопку закрытия.
|
|
44
|
+
*/
|
|
45
|
+
export declare function DivRndBase3({ children, keyForSave: ks, position, size, overflow, zIndex, onUpdate, disableDragging, className, header, moveOnlyHeader, limit, onCLickClose, sizeByWindow }: tDivRndBase): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export type Drag2Props = {
|
|
47
|
+
/** Элемент-«ребёнок», который хотим сделать перетаскиваемым */
|
|
48
|
+
children: ReactNode;
|
|
49
|
+
/** Коллбек при изменении координаты X */
|
|
50
|
+
onX?: (val: number) => void;
|
|
51
|
+
/** Коллбек при изменении координаты Y */
|
|
52
|
+
onY?: (val: number) => void;
|
|
53
|
+
/** Начальное (или контролируемое) значение X */
|
|
54
|
+
x?: number;
|
|
55
|
+
/** Начальное (или контролируемое) значение Y */
|
|
56
|
+
y?: number;
|
|
57
|
+
/** вести отчет с правого края*/
|
|
58
|
+
right?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Внешний ref для хранения координат.
|
|
61
|
+
* Если передан, компонент будет обновлять ref при каждом движении.
|
|
62
|
+
*/
|
|
63
|
+
last?: React.RefObject<{
|
|
64
|
+
x: number;
|
|
65
|
+
y: number;
|
|
66
|
+
}>;
|
|
67
|
+
/** Вызывается при начале перетаскивания (мышь или touch) */
|
|
68
|
+
onStart?: () => void;
|
|
69
|
+
/** Вызывается при окончании перетаскивания (мышь и touch) */
|
|
70
|
+
onStop?: () => void;
|
|
71
|
+
dragging?: boolean;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Компонент-обёртка, позволяющий перетаскивать вложенный элемент
|
|
75
|
+
* как мышью, так и касаниями (touch).
|
|
76
|
+
*
|
|
77
|
+
* Функция исключительно как хук на изменения параметров при движении - хоть и имеет свой компонент (для отсчета)
|
|
78
|
+
* возвращает пройденное расстояние при перемещении дочернего элемента
|
|
79
|
+
*/
|
|
80
|
+
export declare function Drag22({ children, onX, onY, x, y, right, last, dragging, onStart, onStop }: Drag2Props): import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
export {};
|