sense-react-timeline-editor 1.1.3 → 1.1.5
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/dist/components/edit_area/edit_action.d.ts +1 -1
- package/dist/components/edit_area/edit_row.d.ts +1 -1
- package/dist/components/edit_area/hooks/drag_line_controller.d.ts +31 -0
- package/dist/engine/events.d.ts +16 -0
- package/dist/index.esm.js +281 -206
- package/dist/index.js +281 -205
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import './edit_action.less';
|
|
|
6
6
|
export declare type EditActionProps = CommonProp & {
|
|
7
7
|
row: TimelineRow;
|
|
8
8
|
action: TimelineAction;
|
|
9
|
-
dragLineData
|
|
9
|
+
dragLineData?: DragLineData;
|
|
10
10
|
setEditorData: (params: TimelineRow[]) => void;
|
|
11
11
|
handleTime: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => number;
|
|
12
12
|
areaRef: React.MutableRefObject<HTMLDivElement>;
|
|
@@ -7,7 +7,7 @@ export declare type EditRowProps = CommonProp & {
|
|
|
7
7
|
areaRef: React.MutableRefObject<HTMLDivElement>;
|
|
8
8
|
rowData?: TimelineRow;
|
|
9
9
|
style?: React.CSSProperties;
|
|
10
|
-
dragLineData
|
|
10
|
+
dragLineData?: DragLineData;
|
|
11
11
|
setEditorData: (params: TimelineRow[]) => void;
|
|
12
12
|
/** 距离左侧滚动距离 */
|
|
13
13
|
scrollLeft: number;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TimelineAction, TimelineRow } from "../../../interface/action";
|
|
3
|
+
export interface DragLineControllerRef {
|
|
4
|
+
initDragLine: (data: {
|
|
5
|
+
action: TimelineAction;
|
|
6
|
+
row: TimelineRow;
|
|
7
|
+
}) => void;
|
|
8
|
+
updateDragLine: (data: {
|
|
9
|
+
start: number;
|
|
10
|
+
end: number;
|
|
11
|
+
dir?: "right" | "left";
|
|
12
|
+
}) => void;
|
|
13
|
+
disposeDragLine: () => void;
|
|
14
|
+
}
|
|
15
|
+
interface DragLineControllerProps {
|
|
16
|
+
dragLine: boolean;
|
|
17
|
+
editorData: TimelineRow[];
|
|
18
|
+
cursorTime: number;
|
|
19
|
+
scale: number;
|
|
20
|
+
scaleWidth: number;
|
|
21
|
+
startLeft: number;
|
|
22
|
+
hideCursor: boolean;
|
|
23
|
+
scrollLeft: number;
|
|
24
|
+
getAssistDragLineActionIds?: (params: {
|
|
25
|
+
action: TimelineAction;
|
|
26
|
+
row: TimelineRow;
|
|
27
|
+
editorData: TimelineRow[];
|
|
28
|
+
}) => string[];
|
|
29
|
+
}
|
|
30
|
+
export declare const DragLineController: React.MemoExoticComponent<React.ForwardRefExoticComponent<DragLineControllerProps & React.RefAttributes<DragLineControllerRef>>>;
|
|
31
|
+
export {};
|
package/dist/engine/events.d.ts
CHANGED
|
@@ -83,4 +83,20 @@ export interface EventTypes {
|
|
|
83
83
|
target: HTMLElement;
|
|
84
84
|
evt: MouseEvent;
|
|
85
85
|
};
|
|
86
|
+
/**
|
|
87
|
+
* 特效播放事件
|
|
88
|
+
* @type {{ id: string }}
|
|
89
|
+
* @memberof EventTypes
|
|
90
|
+
*/
|
|
91
|
+
"effect-play": {
|
|
92
|
+
id: string;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* 特效离开事件
|
|
96
|
+
* @type {{ id: string }}
|
|
97
|
+
* @memberof EventTypes
|
|
98
|
+
*/
|
|
99
|
+
"effect-leave": {
|
|
100
|
+
id: string;
|
|
101
|
+
};
|
|
86
102
|
}
|