@vidispine/vdt-react-timeline 22.4.0-pre.7 → 22.4.0-pre.9
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/index.es.js +351 -18
- package/package.json +6 -6
package/dist/index.es.js
CHANGED
|
@@ -256,7 +256,7 @@ TimelineContext.defaultProps = {
|
|
|
256
256
|
|
|
257
257
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
258
258
|
|
|
259
|
-
var css$7 = ":root {\n --vdt-timeline-palette-primary:#
|
|
259
|
+
var css$7 = ":root {\n --vdt-timeline-palette-primary:#49a6dd;\n --vdt-timeline-palette-primary-dark: #3c8bb8;\n --vdt-timeline-palette-secondary:#f50057;\n --vdt-timeline-palette-background-primary:#20232a;\n --vdt-timeline-palette-background-secondary:#282c34;\n --vdt-timeline-palette-background-hover: rgba(255, 255, 255, 0.08);\n --vdt-timeline-palette-text-primary:#fff;\n --vdt-timeline-palette-text-secondary:rgba(255, 255, 255, 0.7);\n}\n\n.VdtTimeline-root {\n display: flex;\n flex-direction: column;\n padding: 0 8px 8px 8px;\n background-color: var(--vdt-timeline-palette-background-primary);\n}";
|
|
260
260
|
n(css$7,{});
|
|
261
261
|
|
|
262
262
|
var _excluded$9 = ["start", "end", "time", "onChangeTime", "children", "className", "perspective", "onChangePerspective", "defaultPerspective", "zoomMultiplier"];
|
|
@@ -297,24 +297,59 @@ function Timeline(_ref) {
|
|
|
297
297
|
});
|
|
298
298
|
}
|
|
299
299
|
Timeline.propTypes = {
|
|
300
|
+
/**
|
|
301
|
+
* Start of timeline.
|
|
302
|
+
*/
|
|
300
303
|
start: PropTypes.number.isRequired,
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* End of timeline.
|
|
307
|
+
*/
|
|
301
308
|
end: PropTypes.number.isRequired,
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Place of timeline marker.
|
|
312
|
+
*/
|
|
302
313
|
time: PropTypes.number,
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Children components to render inside timeline.
|
|
317
|
+
*/
|
|
303
318
|
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Callback to trigger when changing the value of time prop.
|
|
322
|
+
*/
|
|
304
323
|
onChangeTime: PropTypes.func,
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Zoom level of timeline: shows ticks between start and end values (if start and end of timeline are within this range).
|
|
327
|
+
*/
|
|
305
328
|
perspective: PropTypes.shape({
|
|
306
329
|
start: PropTypes.number,
|
|
307
330
|
end: PropTypes.number
|
|
308
331
|
}),
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Callback to trigger when changing the value of perspective prop.
|
|
335
|
+
*/
|
|
309
336
|
onChangePerspective: PropTypes.func,
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Set default value for perspective when rendering component.
|
|
340
|
+
*/
|
|
310
341
|
defaultPerspective: PropTypes.shape({
|
|
311
342
|
start: PropTypes.number,
|
|
312
343
|
end: PropTypes.number
|
|
313
344
|
}),
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Multiply by value when zooming in.
|
|
348
|
+
*/
|
|
314
349
|
zoomMultiplier: PropTypes.oneOfType([PropTypes.number, PropTypes.func]),
|
|
315
350
|
|
|
316
351
|
/**
|
|
317
|
-
* Override styles with className
|
|
352
|
+
* Override styles with className.
|
|
318
353
|
*/
|
|
319
354
|
className: PropTypes.string
|
|
320
355
|
};
|
|
@@ -332,7 +367,7 @@ Timeline.defaultProps = {
|
|
|
332
367
|
var DEFAULT_EVENT_HEIGHT = 15;
|
|
333
368
|
var DEFAULT_PLAYHEAD_ZINDEX = 100;
|
|
334
369
|
|
|
335
|
-
var css$6 = ":root {\n --vdt-timeline-palette-primary:#
|
|
370
|
+
var css$6 = ":root {\n --vdt-timeline-palette-primary:#49a6dd;\n --vdt-timeline-palette-primary-dark: #3c8bb8;\n --vdt-timeline-palette-secondary:#f50057;\n --vdt-timeline-palette-background-primary:#20232a;\n --vdt-timeline-palette-background-secondary:#282c34;\n --vdt-timeline-palette-background-hover: rgba(255, 255, 255, 0.08);\n --vdt-timeline-palette-text-primary:#fff;\n --vdt-timeline-palette-text-secondary:rgba(255, 255, 255, 0.7);\n}\n\n.VdtTimelinePlayhead-root {\n background-color: var(--vdt-timeline-palette-secondary);\n position: absolute;\n}\n\n\n.VdtTimelinePlayhead-root:hover {\n cursor: ew-resize;\n}";
|
|
336
371
|
n(css$6,{});
|
|
337
372
|
|
|
338
373
|
var _excluded$8 = ["className", "perspective", "time", "lineWidth", "headWidth", "headHeight", "style", "onDrag", "HeadProps"];
|
|
@@ -460,16 +495,43 @@ function TimelinePlayhead(_ref) {
|
|
|
460
495
|
}));
|
|
461
496
|
}
|
|
462
497
|
TimelinePlayhead.propTypes = {
|
|
498
|
+
/**
|
|
499
|
+
* Apply inline CSS styling
|
|
500
|
+
*/
|
|
463
501
|
style: PropTypes.instanceOf(Object),
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Height of marker head in px
|
|
505
|
+
*/
|
|
464
506
|
headHeight: PropTypes.number,
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Width of marker head in px
|
|
510
|
+
*/
|
|
465
511
|
headWidth: PropTypes.number,
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* Width/thickness of marker line in px
|
|
515
|
+
*/
|
|
466
516
|
lineWidth: PropTypes.number,
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* Zoom level when looking at playhead.
|
|
520
|
+
*/
|
|
467
521
|
perspective: PropTypes.shape({
|
|
468
522
|
start: PropTypes.number,
|
|
469
523
|
end: PropTypes.number
|
|
470
524
|
}),
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Timeline placement of marker
|
|
528
|
+
*/
|
|
471
529
|
time: PropTypes.number,
|
|
472
530
|
onDrag: PropTypes.func,
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* Additional props for marker head
|
|
534
|
+
*/
|
|
473
535
|
HeadProps: PropTypes.instanceOf(Object),
|
|
474
536
|
|
|
475
537
|
/**
|
|
@@ -521,7 +583,7 @@ function useResizeObserver(ref) {
|
|
|
521
583
|
return rect;
|
|
522
584
|
}
|
|
523
585
|
|
|
524
|
-
var css$5 = ":root {\n --vdt-timeline-palette-primary:#
|
|
586
|
+
var css$5 = ":root {\n --vdt-timeline-palette-primary:#49a6dd;\n --vdt-timeline-palette-primary-dark: #3c8bb8;\n --vdt-timeline-palette-secondary:#f50057;\n --vdt-timeline-palette-background-primary:#20232a;\n --vdt-timeline-palette-background-secondary:#282c34;\n --vdt-timeline-palette-background-hover: rgba(255, 255, 255, 0.08);\n --vdt-timeline-palette-text-primary:#fff;\n --vdt-timeline-palette-text-secondary:rgba(255, 255, 255, 0.7);\n}";
|
|
525
587
|
n(css$5,{});
|
|
526
588
|
|
|
527
589
|
var css$4 = ".VdtTimelineWaveform-root {\n height: 40px;\n}";
|
|
@@ -638,16 +700,47 @@ function TimelineWaveform(_ref3) {
|
|
|
638
700
|
}));
|
|
639
701
|
}
|
|
640
702
|
TimelineWaveform.propTypes = {
|
|
703
|
+
/**
|
|
704
|
+
* Array of integers to form the wave.
|
|
705
|
+
*/
|
|
641
706
|
waveform: PropTypes.arrayOf(PropTypes.number),
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* Set starting point of the waveform. The value provided is the value of the respective data point in passed data.
|
|
710
|
+
*/
|
|
642
711
|
start: PropTypes.number,
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* Set ending point of the waveform. The value provided is the value of the respective data point in passed data.
|
|
715
|
+
*/
|
|
643
716
|
end: PropTypes.number,
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* Zoom level when looking at waveform.
|
|
720
|
+
*/
|
|
644
721
|
perspective: PropTypes.shape({
|
|
645
722
|
start: PropTypes.number,
|
|
646
723
|
end: PropTypes.number
|
|
647
724
|
}),
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Props for Stage component. For more information: https://konvajs.org/api/Konva.Stage.html
|
|
728
|
+
*/
|
|
648
729
|
StageProps: PropTypes.instanceOf(Object),
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Props for Stage component. For more information: https://konvajs.org/api/Konva.Layer.html
|
|
733
|
+
*/
|
|
649
734
|
LayerProps: PropTypes.instanceOf(Object),
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* Props for Stage component. For more information: https://konvajs.org/api/Konva.Rect.html
|
|
738
|
+
*/
|
|
650
739
|
RectProps: PropTypes.instanceOf(Object),
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* Props for Stage component. For more information: https://konvajs.org/api/Konva.Rect.html
|
|
743
|
+
*/
|
|
651
744
|
WaveRectProps: PropTypes.instanceOf(Object),
|
|
652
745
|
|
|
653
746
|
/**
|
|
@@ -867,21 +960,85 @@ function TimelineEvent(_ref) {
|
|
|
867
960
|
});
|
|
868
961
|
}
|
|
869
962
|
TimelineEvent.propTypes = {
|
|
963
|
+
/**
|
|
964
|
+
* Callback to trigger on clicking on timeline event component.
|
|
965
|
+
*/
|
|
870
966
|
onClick: PropTypes.func,
|
|
967
|
+
|
|
968
|
+
/**
|
|
969
|
+
* Callback to trigger on hovering over timeline event component.
|
|
970
|
+
*/
|
|
871
971
|
onHover: PropTypes.func,
|
|
972
|
+
|
|
973
|
+
/**
|
|
974
|
+
* Callback to trigger on moving a timeline event component (when mousedown and dragging).
|
|
975
|
+
*/
|
|
872
976
|
onMove: PropTypes.func,
|
|
977
|
+
|
|
978
|
+
/**
|
|
979
|
+
* Callback to trigger on moving a timeline event component only when mousedown and dragging.
|
|
980
|
+
*/
|
|
873
981
|
onMoveStart: PropTypes.func,
|
|
982
|
+
|
|
983
|
+
/**
|
|
984
|
+
* Callback to trigger on moving a timeline event component only when mouseup and not dragging.
|
|
985
|
+
*/
|
|
874
986
|
onMoveEnd: PropTypes.func,
|
|
987
|
+
|
|
988
|
+
/**
|
|
989
|
+
* Callback to trigger on resizing a timeline event component.
|
|
990
|
+
*/
|
|
875
991
|
onResize: PropTypes.func,
|
|
992
|
+
|
|
993
|
+
/**
|
|
994
|
+
* Callback to trigger on resizing a timeline event component only when mousedown and dragging.
|
|
995
|
+
*/
|
|
876
996
|
onResizeStart: PropTypes.func,
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* Callback to trigger on resizing a timeline event component only when mouseup and not dragging.
|
|
1000
|
+
*/
|
|
877
1001
|
onResizeEnd: PropTypes.func,
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* Position of event bar in x-axis (px)
|
|
1005
|
+
*/
|
|
878
1006
|
x: PropTypes.number,
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
1009
|
+
* Width of event bar in px
|
|
1010
|
+
*/
|
|
879
1011
|
width: PropTypes.number,
|
|
1012
|
+
|
|
1013
|
+
/**
|
|
1014
|
+
* Position of event bar in y-axis (px)
|
|
1015
|
+
*/
|
|
880
1016
|
y: PropTypes.number,
|
|
1017
|
+
|
|
1018
|
+
/**
|
|
1019
|
+
* Height of event bar in px
|
|
1020
|
+
*/
|
|
881
1021
|
height: PropTypes.number,
|
|
1022
|
+
|
|
1023
|
+
/**
|
|
1024
|
+
* Padding of event bar in px
|
|
1025
|
+
*/
|
|
882
1026
|
padding: PropTypes.number,
|
|
1027
|
+
|
|
1028
|
+
/**
|
|
1029
|
+
* Start of timeline event
|
|
1030
|
+
*/
|
|
883
1031
|
start: PropTypes.number.isRequired,
|
|
884
|
-
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* End of timeline event
|
|
1035
|
+
*/
|
|
1036
|
+
end: PropTypes.number.isRequired,
|
|
1037
|
+
|
|
1038
|
+
/**
|
|
1039
|
+
* Override styles with className
|
|
1040
|
+
*/
|
|
1041
|
+
className: PropTypes.string
|
|
885
1042
|
};
|
|
886
1043
|
TimelineEvent.defaultProps = {
|
|
887
1044
|
onClick: undefined,
|
|
@@ -896,7 +1053,8 @@ TimelineEvent.defaultProps = {
|
|
|
896
1053
|
width: undefined,
|
|
897
1054
|
y: 0,
|
|
898
1055
|
height: DEFAULT_EVENT_HEIGHT,
|
|
899
|
-
padding: 1
|
|
1056
|
+
padding: 1,
|
|
1057
|
+
className: undefined
|
|
900
1058
|
};
|
|
901
1059
|
|
|
902
1060
|
var _excluded$5 = ["className", "children", "perspective", "onClick", "style", "onHover", "StageProps", "LayerProps", "GroupProps", "RectProps"],
|
|
@@ -1020,8 +1178,6 @@ function TimelineTrack(_ref) {
|
|
|
1020
1178
|
}));
|
|
1021
1179
|
}
|
|
1022
1180
|
TimelineTrack.propTypes = {
|
|
1023
|
-
style: PropTypes.instanceOf(Object),
|
|
1024
|
-
|
|
1025
1181
|
/**
|
|
1026
1182
|
* children are positioned within the track according to 'start' and 'end' props passed to them
|
|
1027
1183
|
*/
|
|
@@ -1041,21 +1197,54 @@ TimelineTrack.propTypes = {
|
|
|
1041
1197
|
});
|
|
1042
1198
|
return err;
|
|
1043
1199
|
},
|
|
1200
|
+
|
|
1201
|
+
/**
|
|
1202
|
+
* Start and end of timeline scroll, unzoomed
|
|
1203
|
+
*/
|
|
1044
1204
|
perspective: PropTypes.shape({
|
|
1045
1205
|
start: PropTypes.number,
|
|
1046
1206
|
end: PropTypes.number
|
|
1047
1207
|
}),
|
|
1208
|
+
|
|
1209
|
+
/**
|
|
1210
|
+
* Callback to trigger on timeline track component click.
|
|
1211
|
+
*/
|
|
1048
1212
|
onClick: PropTypes.func,
|
|
1213
|
+
|
|
1214
|
+
/**
|
|
1215
|
+
* Callback to trigger on mouse hover over timeline track component.
|
|
1216
|
+
*/
|
|
1049
1217
|
onHover: PropTypes.func,
|
|
1218
|
+
|
|
1219
|
+
/**
|
|
1220
|
+
* Props for Stage component. For more information: https://konvajs.org/api/Konva.Stage.html
|
|
1221
|
+
*/
|
|
1050
1222
|
StageProps: PropTypes.instanceOf(Object),
|
|
1223
|
+
|
|
1224
|
+
/**
|
|
1225
|
+
* Props for Layer component. For more information: https://konvajs.org/api/Konva.Layer.html
|
|
1226
|
+
*/
|
|
1051
1227
|
LayerProps: PropTypes.instanceOf(Object),
|
|
1228
|
+
|
|
1229
|
+
/**
|
|
1230
|
+
* Props for Group component. For more information: https://konvajs.org/api/Konva.Group.html
|
|
1231
|
+
*/
|
|
1052
1232
|
GroupProps: PropTypes.instanceOf(Object),
|
|
1233
|
+
|
|
1234
|
+
/**
|
|
1235
|
+
* Props for Rect component. For more information: https://konvajs.org/api/Konva.Rect.html
|
|
1236
|
+
*/
|
|
1053
1237
|
RectProps: PropTypes.instanceOf(Object),
|
|
1054
1238
|
|
|
1055
1239
|
/**
|
|
1056
1240
|
* Override styles with className
|
|
1057
1241
|
*/
|
|
1058
|
-
className: PropTypes.string
|
|
1242
|
+
className: PropTypes.string,
|
|
1243
|
+
|
|
1244
|
+
/**
|
|
1245
|
+
* Apply inline CSS styling
|
|
1246
|
+
*/
|
|
1247
|
+
style: PropTypes.instanceOf(Object)
|
|
1059
1248
|
};
|
|
1060
1249
|
TimelineTrack.defaultProps = {
|
|
1061
1250
|
style: {},
|
|
@@ -1070,7 +1259,7 @@ TimelineTrack.defaultProps = {
|
|
|
1070
1259
|
className: undefined
|
|
1071
1260
|
};
|
|
1072
1261
|
|
|
1073
|
-
var css$3 = ":root {\n --vdt-timeline-palette-primary:#
|
|
1262
|
+
var css$3 = ":root {\n --vdt-timeline-palette-primary:#49a6dd;\n --vdt-timeline-palette-primary-dark: #3c8bb8;\n --vdt-timeline-palette-secondary:#f50057;\n --vdt-timeline-palette-background-primary:#20232a;\n --vdt-timeline-palette-background-secondary:#282c34;\n --vdt-timeline-palette-background-hover: rgba(255, 255, 255, 0.08);\n --vdt-timeline-palette-text-primary:#fff;\n --vdt-timeline-palette-text-secondary:rgba(255, 255, 255, 0.7);\n}\n\n.VdtTimelineRow-root {\n display: flex;\n}\n\n.VdtTimelineRow-root.VdtTimelineRow-hasLabel:hover {\n background-color: var(--vdt-timeline-palette-background-hover);\n}\n\n.VdtTimelineRow-root.VdtTimelineRow-hasLabel {\n border-width: 2px 0 0 0;\n border-style: solid;\n border-color: var(--vdt-timeline-palette-background-secondary);\n}\n\n.VdtTimelineRow-root.VdtTimelineRow-hasLabel > :first-child {\n width: 98px;\n border-width: 0 2px 0 0;\n border-style: solid;\n border-color: var(--vdt-timeline-palette-background-secondary);\n}\n\n.VdtTimelineRow-root > :not(.VdtTimelineRow-label) {\n flex-grow: 1;\n margin: 4px 0;\n}\n\n.VdtTimelineRow-root:not(.VdtTimelineRow-hasLabel) > :first-child {\n margin-left: 100px;\n}\n\n.VdtTimelineRow-label {\n display: flex;\n align-items: center;\n flex-basis: 98px;\n}\n\n.VdtTimelineRow-labelText {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: center;\n padding: 0 8px;\n}";
|
|
1074
1263
|
n(css$3,{});
|
|
1075
1264
|
|
|
1076
1265
|
var _excluded$4 = ["className", "children", "label", "LabelProps", "LabelTextProps"];
|
|
@@ -1103,22 +1292,43 @@ function TimelineRow(_ref) {
|
|
|
1103
1292
|
}));
|
|
1104
1293
|
}
|
|
1105
1294
|
TimelineRow.propTypes = {
|
|
1295
|
+
/**
|
|
1296
|
+
* Children components to render inside row content container.
|
|
1297
|
+
*/
|
|
1106
1298
|
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
1299
|
+
|
|
1300
|
+
/**
|
|
1301
|
+
* Custom row label
|
|
1302
|
+
*/
|
|
1107
1303
|
label: PropTypes.node,
|
|
1304
|
+
|
|
1305
|
+
/**
|
|
1306
|
+
* Props for Layer component. For more information: https://konvajs.org/api/Konva.Label.html
|
|
1307
|
+
*/
|
|
1108
1308
|
LabelProps: PropTypes.instanceOf(Object),
|
|
1309
|
+
|
|
1310
|
+
/**
|
|
1311
|
+
* Props for Layer component. For more information: https://konvajs.org/api/Konva.Label.html
|
|
1312
|
+
*/
|
|
1109
1313
|
LabelTextProps: PropTypes.instanceOf(Object),
|
|
1110
1314
|
|
|
1111
1315
|
/**
|
|
1112
1316
|
* Override styles with className
|
|
1113
1317
|
*/
|
|
1114
|
-
className: PropTypes.string
|
|
1318
|
+
className: PropTypes.string,
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* Apply inline CSS styling
|
|
1322
|
+
*/
|
|
1323
|
+
style: PropTypes.instanceOf(Object)
|
|
1115
1324
|
};
|
|
1116
1325
|
TimelineRow.defaultProps = {
|
|
1117
1326
|
children: undefined,
|
|
1118
1327
|
label: undefined,
|
|
1119
1328
|
LabelProps: {},
|
|
1120
1329
|
LabelTextProps: {},
|
|
1121
|
-
className: undefined
|
|
1330
|
+
className: undefined,
|
|
1331
|
+
style: {}
|
|
1122
1332
|
};
|
|
1123
1333
|
|
|
1124
1334
|
var css$2 = "\n.VdtTimelinePlayheadTrack-root {\n height: 40px;\n position: relative;\n}";
|
|
@@ -1429,36 +1639,108 @@ function TimelinePlayheadTrack(_ref4) {
|
|
|
1429
1639
|
}));
|
|
1430
1640
|
}
|
|
1431
1641
|
TimelinePlayheadTrack.propTypes = {
|
|
1642
|
+
/**
|
|
1643
|
+
* Callback to trigger on clicking on playhead track component.
|
|
1644
|
+
*/
|
|
1432
1645
|
onClick: PropTypes.func,
|
|
1646
|
+
|
|
1647
|
+
/**
|
|
1648
|
+
* Callback to trigger on mouse hover over playhead track component.
|
|
1649
|
+
*/
|
|
1433
1650
|
onHover: PropTypes.func,
|
|
1651
|
+
|
|
1652
|
+
/**
|
|
1653
|
+
* Array of (large) timeline tick objects. Set time and label.
|
|
1654
|
+
*/
|
|
1434
1655
|
ticks: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.shape({
|
|
1435
1656
|
time: PropTypes.number,
|
|
1436
1657
|
label: PropTypes.string
|
|
1437
1658
|
})), PropTypes.func]),
|
|
1659
|
+
|
|
1660
|
+
/**
|
|
1661
|
+
* Callback to trigger on using the mouse wheel.
|
|
1662
|
+
*/
|
|
1438
1663
|
onWheel: PropTypes.func,
|
|
1664
|
+
|
|
1665
|
+
/**
|
|
1666
|
+
* Callback to trigger on dragging playhead track component
|
|
1667
|
+
*/
|
|
1439
1668
|
onDrag: PropTypes.func,
|
|
1669
|
+
|
|
1670
|
+
/**
|
|
1671
|
+
* Children components to render before/above the playhead track, according to top and height props passed to playhead track.
|
|
1672
|
+
*/
|
|
1440
1673
|
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
1674
|
+
|
|
1675
|
+
/**
|
|
1676
|
+
* Start of playhead track.
|
|
1677
|
+
*/
|
|
1441
1678
|
start: PropTypes.number,
|
|
1679
|
+
|
|
1680
|
+
/**
|
|
1681
|
+
* End of playhead track.
|
|
1682
|
+
*/
|
|
1442
1683
|
end: PropTypes.number,
|
|
1684
|
+
|
|
1685
|
+
/**
|
|
1686
|
+
* Zoom level when looking at track.
|
|
1687
|
+
*/
|
|
1443
1688
|
perspective: PropTypes.shape({
|
|
1444
1689
|
start: PropTypes.number,
|
|
1445
1690
|
end: PropTypes.number
|
|
1446
1691
|
}),
|
|
1692
|
+
|
|
1693
|
+
/**
|
|
1694
|
+
* Ref object to track timeline events.
|
|
1695
|
+
*/
|
|
1447
1696
|
timelineRef: PropTypes.shape({
|
|
1448
1697
|
current: PropTypes.instanceOf(Element)
|
|
1449
1698
|
}),
|
|
1699
|
+
|
|
1700
|
+
/**
|
|
1701
|
+
* Props for Stage component. For more information: https://konvajs.org/api/Konva.Stage.html
|
|
1702
|
+
*/
|
|
1450
1703
|
StageProps: PropTypes.instanceOf(Object),
|
|
1704
|
+
|
|
1705
|
+
/**
|
|
1706
|
+
* Props for Layer component. For more information: https://konvajs.org/api/Konva.Layer.html
|
|
1707
|
+
*/
|
|
1451
1708
|
LayerProps: PropTypes.instanceOf(Object),
|
|
1709
|
+
|
|
1710
|
+
/**
|
|
1711
|
+
* Props for Group component. For more information: https://konvajs.org/api/Konva.Group.html
|
|
1712
|
+
*/
|
|
1452
1713
|
GroupProps: PropTypes.instanceOf(Object),
|
|
1714
|
+
|
|
1715
|
+
/**
|
|
1716
|
+
* Props for React component. For more information: https://konvajs.org/api/Konva.Rect.html
|
|
1717
|
+
*/
|
|
1453
1718
|
RectProps: PropTypes.instanceOf(Object),
|
|
1719
|
+
|
|
1720
|
+
/**
|
|
1721
|
+
* Props for Group component. For more information: https://konvajs.org/api/Konva.Group.html
|
|
1722
|
+
*/
|
|
1454
1723
|
TickGroupProps: PropTypes.instanceOf(Object),
|
|
1724
|
+
|
|
1725
|
+
/**
|
|
1726
|
+
* Props for Group component. For more information: https://konvajs.org/api/Konva.Text.html
|
|
1727
|
+
*/
|
|
1455
1728
|
TickTextProps: PropTypes.instanceOf(Object),
|
|
1729
|
+
|
|
1730
|
+
/**
|
|
1731
|
+
* Props for Group component. For more information: https://konvajs.org/api/Konva.Line.html
|
|
1732
|
+
*/
|
|
1456
1733
|
TickLineProps: PropTypes.instanceOf(Object),
|
|
1457
1734
|
|
|
1458
1735
|
/**
|
|
1459
1736
|
* Override styles with className
|
|
1460
1737
|
*/
|
|
1461
|
-
className: PropTypes.string
|
|
1738
|
+
className: PropTypes.string,
|
|
1739
|
+
|
|
1740
|
+
/**
|
|
1741
|
+
* Apply inline CSS styling
|
|
1742
|
+
*/
|
|
1743
|
+
style: PropTypes.instanceOf(Object)
|
|
1462
1744
|
};
|
|
1463
1745
|
TimelinePlayheadTrack.defaultProps = {
|
|
1464
1746
|
onClick: undefined,
|
|
@@ -1478,7 +1760,8 @@ TimelinePlayheadTrack.defaultProps = {
|
|
|
1478
1760
|
TickGroupProps: {},
|
|
1479
1761
|
TickTextProps: {},
|
|
1480
1762
|
TickLineProps: {},
|
|
1481
|
-
className: undefined
|
|
1763
|
+
className: undefined,
|
|
1764
|
+
style: {}
|
|
1482
1765
|
};
|
|
1483
1766
|
|
|
1484
1767
|
var _excluded$2 = ["index"];
|
|
@@ -1546,7 +1829,7 @@ var getStackOverlappingEventProps = function getStackOverlappingEventProps(event
|
|
|
1546
1829
|
});
|
|
1547
1830
|
};
|
|
1548
1831
|
|
|
1549
|
-
var css$1 = ":root {\n --vdt-timeline-palette-primary:#
|
|
1832
|
+
var css$1 = ":root {\n --vdt-timeline-palette-primary:#49a6dd;\n --vdt-timeline-palette-primary-dark: #3c8bb8;\n --vdt-timeline-palette-secondary:#f50057;\n --vdt-timeline-palette-background-primary:#20232a;\n --vdt-timeline-palette-background-secondary:#282c34;\n --vdt-timeline-palette-background-hover: rgba(255, 255, 255, 0.08);\n --vdt-timeline-palette-text-primary:#fff;\n --vdt-timeline-palette-text-secondary:rgba(255, 255, 255, 0.7);\n}\n\n.VdtTimelineScroll-root {\n height: 4px;\n background-color: var(--vdt-timeline-palette-background-secondary);\n}";
|
|
1550
1833
|
n(css$1,{});
|
|
1551
1834
|
|
|
1552
1835
|
var _excluded$1 = ["className", "onScroll", "onClick", "start", "end", "perspective", "style", "StageProps", "LayerProps", "RectProps"];
|
|
@@ -1675,17 +1958,52 @@ function TimelineScroll(_ref) {
|
|
|
1675
1958
|
}));
|
|
1676
1959
|
}
|
|
1677
1960
|
TimelineScroll.propTypes = {
|
|
1961
|
+
/**
|
|
1962
|
+
* Callback to trigger on timeline component scroll.
|
|
1963
|
+
*/
|
|
1678
1964
|
onScroll: PropTypes.func,
|
|
1965
|
+
|
|
1966
|
+
/**
|
|
1967
|
+
* Callback to trigger on timeline component click.
|
|
1968
|
+
*/
|
|
1679
1969
|
onClick: PropTypes.func,
|
|
1970
|
+
|
|
1971
|
+
/**
|
|
1972
|
+
* Start time of timeline scroll.
|
|
1973
|
+
*/
|
|
1680
1974
|
start: PropTypes.number,
|
|
1975
|
+
|
|
1976
|
+
/**
|
|
1977
|
+
* End time of timeline scroll
|
|
1978
|
+
*/
|
|
1681
1979
|
end: PropTypes.number,
|
|
1980
|
+
|
|
1981
|
+
/**
|
|
1982
|
+
* Zoom level of timeline scroll.
|
|
1983
|
+
*/
|
|
1682
1984
|
perspective: PropTypes.shape({
|
|
1683
1985
|
start: PropTypes.number,
|
|
1684
1986
|
end: PropTypes.number
|
|
1685
1987
|
}),
|
|
1988
|
+
|
|
1989
|
+
/**
|
|
1990
|
+
* Apply inline CSS styling
|
|
1991
|
+
*/
|
|
1686
1992
|
style: PropTypes.instanceOf(Object),
|
|
1993
|
+
|
|
1994
|
+
/**
|
|
1995
|
+
* Props for Stage component. For more information: https://konvajs.org/api/Konva.Stage.html
|
|
1996
|
+
*/
|
|
1687
1997
|
StageProps: PropTypes.instanceOf(Object),
|
|
1998
|
+
|
|
1999
|
+
/**
|
|
2000
|
+
* Props for Stage component. For more information: https://konvajs.org/api/Konva.Layer.html
|
|
2001
|
+
*/
|
|
1688
2002
|
LayerProps: PropTypes.instanceOf(Object),
|
|
2003
|
+
|
|
2004
|
+
/**
|
|
2005
|
+
* Props for Stage component. For more information: https://konvajs.org/api/Konva.Rect.html
|
|
2006
|
+
*/
|
|
1689
2007
|
RectProps: PropTypes.instanceOf(Object),
|
|
1690
2008
|
|
|
1691
2009
|
/**
|
|
@@ -1766,15 +2084,30 @@ function TimelineScrollContainer(_ref2) {
|
|
|
1766
2084
|
}));
|
|
1767
2085
|
}
|
|
1768
2086
|
TimelineScrollContainer.propTypes = {
|
|
2087
|
+
/**
|
|
2088
|
+
* Override styles with className
|
|
2089
|
+
*/
|
|
1769
2090
|
className: PropTypes.string,
|
|
2091
|
+
|
|
2092
|
+
/**
|
|
2093
|
+
* Children components to render
|
|
2094
|
+
*/
|
|
1770
2095
|
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
2096
|
+
|
|
2097
|
+
/**
|
|
2098
|
+
* Get distance of scrolling
|
|
2099
|
+
*/
|
|
1771
2100
|
getScrollDistance: PropTypes.func,
|
|
1772
|
-
|
|
1773
|
-
ScrollProps: PropTypes.instanceOf(Object)
|
|
2101
|
+
|
|
1774
2102
|
/**
|
|
1775
|
-
*
|
|
2103
|
+
* Additional props for row component
|
|
1776
2104
|
*/
|
|
2105
|
+
RowProps: PropTypes.instanceOf(Object),
|
|
1777
2106
|
|
|
2107
|
+
/**
|
|
2108
|
+
* Additional props for scroll component
|
|
2109
|
+
*/
|
|
2110
|
+
ScrollProps: PropTypes.instanceOf(Object)
|
|
1778
2111
|
};
|
|
1779
2112
|
TimelineScrollContainer.defaultProps = {
|
|
1780
2113
|
children: undefined,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vidispine/vdt-react-timeline",
|
|
3
|
-
"version": "22.4.0-pre.
|
|
3
|
+
"version": "22.4.0-pre.9",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.18.9",
|
|
27
|
-
"@vidispine/vdt-js": "22.4.0-pre.
|
|
27
|
+
"@vidispine/vdt-js": "22.4.0-pre.9",
|
|
28
28
|
"clsx": "^1.2.1",
|
|
29
29
|
"konva": "^8.3.11",
|
|
30
30
|
"lodash.clamp": "^4.0.3",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"@rollup/plugin-babel": "5.3.1",
|
|
47
47
|
"@rollup/plugin-commonjs": "22.0.2",
|
|
48
48
|
"@rollup/plugin-node-resolve": "13.3.0",
|
|
49
|
-
"@vidispine/eslint-config-mdx": "22.4.0-pre.
|
|
50
|
-
"@vidispine/eslint-config-react": "22.4.0-pre.
|
|
51
|
-
"@vidispine/eslint-config-storybook": "22.4.0-pre.
|
|
52
|
-
"@vidispine/prettier-config": "22.4.0-pre.
|
|
49
|
+
"@vidispine/eslint-config-mdx": "22.4.0-pre.9",
|
|
50
|
+
"@vidispine/eslint-config-react": "22.4.0-pre.9",
|
|
51
|
+
"@vidispine/eslint-config-storybook": "22.4.0-pre.9",
|
|
52
|
+
"@vidispine/prettier-config": "22.4.0-pre.9",
|
|
53
53
|
"eslint": "8.23.1",
|
|
54
54
|
"prettier": "2.7.1",
|
|
55
55
|
"rimraf": "3.0.2",
|