sense-react-timeline-editor 1.0.3 → 1.0.6

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.
@@ -24,6 +24,8 @@ export interface TimelineAction {
24
24
  minStart?: number;
25
25
  /** 动作最大结束时间限制 */
26
26
  maxEnd?: number;
27
+ /** 动作的url */
28
+ url?: string;
27
29
  }
28
30
  /**
29
31
  * 动作行基本参数
@@ -43,4 +45,7 @@ export interface TimelineRow {
43
45
  classNames?: string[];
44
46
  /** 行的类型 */
45
47
  type?: string;
48
+ canUpload?: boolean;
49
+ /** 是否为预览轨道 */
50
+ isPreview?: boolean;
46
51
  }
@@ -5,6 +5,7 @@ import { Emitter } from '../engine/emitter';
5
5
  import { EventTypes } from '../engine/events';
6
6
  import { TimelineAction, TimelineRow } from './action';
7
7
  import { TimelineEffect } from './effect';
8
+ import { type UploadProps } from 'antd/es/upload';
8
9
  export * from './action';
9
10
  export * from './effect';
10
11
  export interface EditData {
@@ -71,6 +72,11 @@ export interface EditData {
71
72
  * @default false
72
73
  */
73
74
  disableDrag?: boolean;
75
+ /**
76
+ * @description 允许拖拽创建新轨道
77
+ * @default true
78
+ */
79
+ allowCreateTrack?: boolean;
74
80
  /**
75
81
  * @description timeline运行器,不传则使用内置运行器
76
82
  */
@@ -107,6 +113,7 @@ export interface EditData {
107
113
  row: TimelineRow;
108
114
  start: number;
109
115
  end: number;
116
+ isNewRow?: boolean;
110
117
  }) => void;
111
118
  /**
112
119
  * @description 开始改变大小回调
@@ -213,6 +220,7 @@ export interface EditData {
213
220
  * @description 点击时间区域事件, 返回false时阻止设置时间
214
221
  */
215
222
  onClickTimeArea?: (time: number, e: React.MouseEvent<HTMLDivElement, MouseEvent>) => boolean | undefined;
223
+ onUpdateEditorData?: (editorData: TimelineRow, actions: TimelineAction[]) => void;
216
224
  }
217
225
  export interface TimelineState {
218
226
  /** dom节点 */
@@ -280,6 +288,9 @@ export interface TimelineEditor extends EditData {
280
288
  * @default true
281
289
  */
282
290
  autoReRender?: boolean;
291
+ /** 是否可以上传 */
292
+ canUpload?: boolean;
293
+ customRequest?: UploadProps['customRequest'];
283
294
  /**
284
295
  * @description 数据改变回调,会在操作动作end改变数据后触发(返回false会阻止自动engine同步,用于减少性能开销)
285
296
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sense-react-timeline-editor",
3
- "version": "1.0.3",
3
+ "version": "1.0.6",
4
4
  "author": "xzdarcy",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -34,14 +34,16 @@
34
34
  "typings": "dist/index.d.ts",
35
35
  "peerDependencies": {
36
36
  "react": "^15.3.0 || ^16.0.0-alpha || ^17.0.0 || ^18.0.0 || ^19.0.0",
37
- "react-dom": "^15.3.0 || ^16.0.0-alpha || ^17.0.0 || ^18.0.0 || ^19.0.0"
37
+ "react-dom": "^15.3.0 || ^16.0.0-alpha || ^17.0.0 || ^18.0.0 || ^19.0.0",
38
+ "lodash-es": "^4.17.23",
39
+ "howler": "^2.2.3",
40
+ "antd": "^5.26.5"
38
41
  },
39
42
  "dependencies": {
40
43
  "@interactjs/types": "^1.10.11",
41
44
  "@types/react-virtualized": "^9.21.14",
42
45
  "framework-utils": "^1.1.0",
43
46
  "interactjs": "^1.10.11",
44
- "lodash-es": "^4.17.23",
45
47
  "react-virtualized": "^9.22.3"
46
48
  },
47
49
  "devDependencies": {
@@ -50,11 +52,9 @@
50
52
  "@types/react": "^17.0.17",
51
53
  "@types/react-dom": "^17.0.17",
52
54
  "@umijs/test": "^3.0.5",
53
- "antd": "^4.16.13",
54
55
  "dumi": "^1.0.17",
55
56
  "father-build": "^1.17.2",
56
57
  "gh-pages": "^3.0.0",
57
- "howler": "^2.2.3",
58
58
  "lint-staged": "^10.0.7",
59
59
  "lodash": "^4.17.21",
60
60
  "lottie-web": "^5.8.1",