@vidispine/vdt-react-timeline 22.3.0-pre.5 → 22.3.1-pre.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.
Files changed (2) hide show
  1. package/dist/index.es.js +352 -1317
  2. package/package.json +34 -33
package/dist/index.es.js CHANGED
@@ -1,1160 +1,16 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
- import { useState, useRef, useContext, createContext, useMemo, useEffect, memo, Children, cloneElement } from 'react';
3
+ import { useState, useRef, createContext, useMemo, useContext, useEffect, memo, Children, cloneElement } from 'react';
4
+ import clsx from 'clsx';
5
+ import PropTypes from 'prop-types';
4
6
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
5
7
  import clamp from 'lodash.clamp';
6
- import { jsx, jsxs } from 'react/jsx-runtime';
8
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
9
  import { Stage, Layer, Rect, Group, Text, Line } from 'react-konva';
8
10
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
9
11
  import sortBy from 'lodash.sortby';
10
12
  import uniq from 'lodash.uniq';
11
13
 
12
- function toVal(mix) {
13
- var k, y, str='';
14
-
15
- if (typeof mix === 'string' || typeof mix === 'number') {
16
- str += mix;
17
- } else if (typeof mix === 'object') {
18
- if (Array.isArray(mix)) {
19
- for (k=0; k < mix.length; k++) {
20
- if (mix[k]) {
21
- if (y = toVal(mix[k])) {
22
- str && (str += ' ');
23
- str += y;
24
- }
25
- }
26
- }
27
- } else {
28
- for (k in mix) {
29
- if (mix[k]) {
30
- str && (str += ' ');
31
- str += k;
32
- }
33
- }
34
- }
35
- }
36
-
37
- return str;
38
- }
39
-
40
- function clsx () {
41
- var i=0, tmp, x, str='';
42
- while (i < arguments.length) {
43
- if (tmp = arguments[i++]) {
44
- if (x = toVal(tmp)) {
45
- str && (str += ' ');
46
- str += x;
47
- }
48
- }
49
- }
50
- return str;
51
- }
52
-
53
- var propTypes = {exports: {}};
54
-
55
- var reactIs = {exports: {}};
56
-
57
- var reactIs_production_min = {};
58
-
59
- /** @license React v16.13.1
60
- * react-is.production.min.js
61
- *
62
- * Copyright (c) Facebook, Inc. and its affiliates.
63
- *
64
- * This source code is licensed under the MIT license found in the
65
- * LICENSE file in the root directory of this source tree.
66
- */
67
- var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e$1=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n$1=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
68
- Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t$1=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
69
- function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e$1:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n$1:case t$1:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n$1;reactIs_production_min.Fragment=e$1;reactIs_production_min.Lazy=t$1;reactIs_production_min.Memo=r;reactIs_production_min.Portal=d;
70
- reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f;reactIs_production_min.Suspense=p;reactIs_production_min.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min.isConcurrentMode=A;reactIs_production_min.isContextConsumer=function(a){return z(a)===k};reactIs_production_min.isContextProvider=function(a){return z(a)===h};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min.isForwardRef=function(a){return z(a)===n$1};reactIs_production_min.isFragment=function(a){return z(a)===e$1};reactIs_production_min.isLazy=function(a){return z(a)===t$1};
71
- reactIs_production_min.isMemo=function(a){return z(a)===r};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f};reactIs_production_min.isSuspense=function(a){return z(a)===p};
72
- reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e$1||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t$1||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n$1||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min.typeOf=z;
73
-
74
- var reactIs_development = {};
75
-
76
- /** @license React v16.13.1
77
- * react-is.development.js
78
- *
79
- * Copyright (c) Facebook, Inc. and its affiliates.
80
- *
81
- * This source code is licensed under the MIT license found in the
82
- * LICENSE file in the root directory of this source tree.
83
- */
84
-
85
-
86
-
87
- if (process.env.NODE_ENV !== "production") {
88
- (function() {
89
-
90
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
91
- // nor polyfill, then a plain number is used for performance.
92
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
93
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
94
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
95
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
96
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
97
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
98
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
99
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
100
- // (unstable) APIs that have been removed. Can we remove the symbols?
101
-
102
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
103
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
104
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
105
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
106
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
107
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
108
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
109
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
110
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
111
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
112
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
113
-
114
- function isValidElementType(type) {
115
- return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
116
- type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
117
- }
118
-
119
- function typeOf(object) {
120
- if (typeof object === 'object' && object !== null) {
121
- var $$typeof = object.$$typeof;
122
-
123
- switch ($$typeof) {
124
- case REACT_ELEMENT_TYPE:
125
- var type = object.type;
126
-
127
- switch (type) {
128
- case REACT_ASYNC_MODE_TYPE:
129
- case REACT_CONCURRENT_MODE_TYPE:
130
- case REACT_FRAGMENT_TYPE:
131
- case REACT_PROFILER_TYPE:
132
- case REACT_STRICT_MODE_TYPE:
133
- case REACT_SUSPENSE_TYPE:
134
- return type;
135
-
136
- default:
137
- var $$typeofType = type && type.$$typeof;
138
-
139
- switch ($$typeofType) {
140
- case REACT_CONTEXT_TYPE:
141
- case REACT_FORWARD_REF_TYPE:
142
- case REACT_LAZY_TYPE:
143
- case REACT_MEMO_TYPE:
144
- case REACT_PROVIDER_TYPE:
145
- return $$typeofType;
146
-
147
- default:
148
- return $$typeof;
149
- }
150
-
151
- }
152
-
153
- case REACT_PORTAL_TYPE:
154
- return $$typeof;
155
- }
156
- }
157
-
158
- return undefined;
159
- } // AsyncMode is deprecated along with isAsyncMode
160
-
161
- var AsyncMode = REACT_ASYNC_MODE_TYPE;
162
- var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
163
- var ContextConsumer = REACT_CONTEXT_TYPE;
164
- var ContextProvider = REACT_PROVIDER_TYPE;
165
- var Element = REACT_ELEMENT_TYPE;
166
- var ForwardRef = REACT_FORWARD_REF_TYPE;
167
- var Fragment = REACT_FRAGMENT_TYPE;
168
- var Lazy = REACT_LAZY_TYPE;
169
- var Memo = REACT_MEMO_TYPE;
170
- var Portal = REACT_PORTAL_TYPE;
171
- var Profiler = REACT_PROFILER_TYPE;
172
- var StrictMode = REACT_STRICT_MODE_TYPE;
173
- var Suspense = REACT_SUSPENSE_TYPE;
174
- var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
175
-
176
- function isAsyncMode(object) {
177
- {
178
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
179
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
180
-
181
- console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
182
- }
183
- }
184
-
185
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
186
- }
187
- function isConcurrentMode(object) {
188
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
189
- }
190
- function isContextConsumer(object) {
191
- return typeOf(object) === REACT_CONTEXT_TYPE;
192
- }
193
- function isContextProvider(object) {
194
- return typeOf(object) === REACT_PROVIDER_TYPE;
195
- }
196
- function isElement(object) {
197
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
198
- }
199
- function isForwardRef(object) {
200
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
201
- }
202
- function isFragment(object) {
203
- return typeOf(object) === REACT_FRAGMENT_TYPE;
204
- }
205
- function isLazy(object) {
206
- return typeOf(object) === REACT_LAZY_TYPE;
207
- }
208
- function isMemo(object) {
209
- return typeOf(object) === REACT_MEMO_TYPE;
210
- }
211
- function isPortal(object) {
212
- return typeOf(object) === REACT_PORTAL_TYPE;
213
- }
214
- function isProfiler(object) {
215
- return typeOf(object) === REACT_PROFILER_TYPE;
216
- }
217
- function isStrictMode(object) {
218
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
219
- }
220
- function isSuspense(object) {
221
- return typeOf(object) === REACT_SUSPENSE_TYPE;
222
- }
223
-
224
- reactIs_development.AsyncMode = AsyncMode;
225
- reactIs_development.ConcurrentMode = ConcurrentMode;
226
- reactIs_development.ContextConsumer = ContextConsumer;
227
- reactIs_development.ContextProvider = ContextProvider;
228
- reactIs_development.Element = Element;
229
- reactIs_development.ForwardRef = ForwardRef;
230
- reactIs_development.Fragment = Fragment;
231
- reactIs_development.Lazy = Lazy;
232
- reactIs_development.Memo = Memo;
233
- reactIs_development.Portal = Portal;
234
- reactIs_development.Profiler = Profiler;
235
- reactIs_development.StrictMode = StrictMode;
236
- reactIs_development.Suspense = Suspense;
237
- reactIs_development.isAsyncMode = isAsyncMode;
238
- reactIs_development.isConcurrentMode = isConcurrentMode;
239
- reactIs_development.isContextConsumer = isContextConsumer;
240
- reactIs_development.isContextProvider = isContextProvider;
241
- reactIs_development.isElement = isElement;
242
- reactIs_development.isForwardRef = isForwardRef;
243
- reactIs_development.isFragment = isFragment;
244
- reactIs_development.isLazy = isLazy;
245
- reactIs_development.isMemo = isMemo;
246
- reactIs_development.isPortal = isPortal;
247
- reactIs_development.isProfiler = isProfiler;
248
- reactIs_development.isStrictMode = isStrictMode;
249
- reactIs_development.isSuspense = isSuspense;
250
- reactIs_development.isValidElementType = isValidElementType;
251
- reactIs_development.typeOf = typeOf;
252
- })();
253
- }
254
-
255
- if (process.env.NODE_ENV === 'production') {
256
- reactIs.exports = reactIs_production_min;
257
- } else {
258
- reactIs.exports = reactIs_development;
259
- }
260
-
261
- /*
262
- object-assign
263
- (c) Sindre Sorhus
264
- @license MIT
265
- */
266
- /* eslint-disable no-unused-vars */
267
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
268
- var hasOwnProperty = Object.prototype.hasOwnProperty;
269
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
270
-
271
- function toObject(val) {
272
- if (val === null || val === undefined) {
273
- throw new TypeError('Object.assign cannot be called with null or undefined');
274
- }
275
-
276
- return Object(val);
277
- }
278
-
279
- function shouldUseNative() {
280
- try {
281
- if (!Object.assign) {
282
- return false;
283
- }
284
-
285
- // Detect buggy property enumeration order in older V8 versions.
286
-
287
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
288
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
289
- test1[5] = 'de';
290
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
291
- return false;
292
- }
293
-
294
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
295
- var test2 = {};
296
- for (var i = 0; i < 10; i++) {
297
- test2['_' + String.fromCharCode(i)] = i;
298
- }
299
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
300
- return test2[n];
301
- });
302
- if (order2.join('') !== '0123456789') {
303
- return false;
304
- }
305
-
306
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
307
- var test3 = {};
308
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
309
- test3[letter] = letter;
310
- });
311
- if (Object.keys(Object.assign({}, test3)).join('') !==
312
- 'abcdefghijklmnopqrst') {
313
- return false;
314
- }
315
-
316
- return true;
317
- } catch (err) {
318
- // We don't expect any of the above to throw, but better to be safe.
319
- return false;
320
- }
321
- }
322
-
323
- var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
324
- var from;
325
- var to = toObject(target);
326
- var symbols;
327
-
328
- for (var s = 1; s < arguments.length; s++) {
329
- from = Object(arguments[s]);
330
-
331
- for (var key in from) {
332
- if (hasOwnProperty.call(from, key)) {
333
- to[key] = from[key];
334
- }
335
- }
336
-
337
- if (getOwnPropertySymbols) {
338
- symbols = getOwnPropertySymbols(from);
339
- for (var i = 0; i < symbols.length; i++) {
340
- if (propIsEnumerable.call(from, symbols[i])) {
341
- to[symbols[i]] = from[symbols[i]];
342
- }
343
- }
344
- }
345
- }
346
-
347
- return to;
348
- };
349
-
350
- /**
351
- * Copyright (c) 2013-present, Facebook, Inc.
352
- *
353
- * This source code is licensed under the MIT license found in the
354
- * LICENSE file in the root directory of this source tree.
355
- */
356
-
357
- var ReactPropTypesSecret$3 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
358
-
359
- var ReactPropTypesSecret_1 = ReactPropTypesSecret$3;
360
-
361
- var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
362
-
363
- /**
364
- * Copyright (c) 2013-present, Facebook, Inc.
365
- *
366
- * This source code is licensed under the MIT license found in the
367
- * LICENSE file in the root directory of this source tree.
368
- */
369
-
370
- var printWarning$1 = function() {};
371
-
372
- if (process.env.NODE_ENV !== 'production') {
373
- var ReactPropTypesSecret$2 = ReactPropTypesSecret_1;
374
- var loggedTypeFailures = {};
375
- var has$1 = has$2;
376
-
377
- printWarning$1 = function(text) {
378
- var message = 'Warning: ' + text;
379
- if (typeof console !== 'undefined') {
380
- console.error(message);
381
- }
382
- try {
383
- // --- Welcome to debugging React ---
384
- // This error was thrown as a convenience so that you can use this stack
385
- // to find the callsite that caused this warning to fire.
386
- throw new Error(message);
387
- } catch (x) { /**/ }
388
- };
389
- }
390
-
391
- /**
392
- * Assert that the values match with the type specs.
393
- * Error messages are memorized and will only be shown once.
394
- *
395
- * @param {object} typeSpecs Map of name to a ReactPropType
396
- * @param {object} values Runtime values that need to be type-checked
397
- * @param {string} location e.g. "prop", "context", "child context"
398
- * @param {string} componentName Name of the component for error messages.
399
- * @param {?Function} getStack Returns the component stack.
400
- * @private
401
- */
402
- function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) {
403
- if (process.env.NODE_ENV !== 'production') {
404
- for (var typeSpecName in typeSpecs) {
405
- if (has$1(typeSpecs, typeSpecName)) {
406
- var error;
407
- // Prop type validation may throw. In case they do, we don't want to
408
- // fail the render phase where it didn't fail before. So we log it.
409
- // After these have been cleaned up, we'll let them throw.
410
- try {
411
- // This is intentionally an invariant that gets caught. It's the same
412
- // behavior as without this statement except with a better message.
413
- if (typeof typeSpecs[typeSpecName] !== 'function') {
414
- var err = Error(
415
- (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
416
- 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
417
- 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
418
- );
419
- err.name = 'Invariant Violation';
420
- throw err;
421
- }
422
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$2);
423
- } catch (ex) {
424
- error = ex;
425
- }
426
- if (error && !(error instanceof Error)) {
427
- printWarning$1(
428
- (componentName || 'React class') + ': type specification of ' +
429
- location + ' `' + typeSpecName + '` is invalid; the type checker ' +
430
- 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
431
- 'You may have forgotten to pass an argument to the type checker ' +
432
- 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
433
- 'shape all require an argument).'
434
- );
435
- }
436
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
437
- // Only monitor this failure once because there tends to be a lot of the
438
- // same error.
439
- loggedTypeFailures[error.message] = true;
440
-
441
- var stack = getStack ? getStack() : '';
442
-
443
- printWarning$1(
444
- 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
445
- );
446
- }
447
- }
448
- }
449
- }
450
- }
451
-
452
- /**
453
- * Resets warning cache when testing.
454
- *
455
- * @private
456
- */
457
- checkPropTypes$1.resetWarningCache = function() {
458
- if (process.env.NODE_ENV !== 'production') {
459
- loggedTypeFailures = {};
460
- }
461
- };
462
-
463
- var checkPropTypes_1 = checkPropTypes$1;
464
-
465
- /**
466
- * Copyright (c) 2013-present, Facebook, Inc.
467
- *
468
- * This source code is licensed under the MIT license found in the
469
- * LICENSE file in the root directory of this source tree.
470
- */
471
-
472
- var ReactIs$1 = reactIs.exports;
473
- var assign = objectAssign;
474
-
475
- var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
476
- var has = has$2;
477
- var checkPropTypes = checkPropTypes_1;
478
-
479
- var printWarning = function() {};
480
-
481
- if (process.env.NODE_ENV !== 'production') {
482
- printWarning = function(text) {
483
- var message = 'Warning: ' + text;
484
- if (typeof console !== 'undefined') {
485
- console.error(message);
486
- }
487
- try {
488
- // --- Welcome to debugging React ---
489
- // This error was thrown as a convenience so that you can use this stack
490
- // to find the callsite that caused this warning to fire.
491
- throw new Error(message);
492
- } catch (x) {}
493
- };
494
- }
495
-
496
- function emptyFunctionThatReturnsNull() {
497
- return null;
498
- }
499
-
500
- var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
501
- /* global Symbol */
502
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
503
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
504
-
505
- /**
506
- * Returns the iterator method function contained on the iterable object.
507
- *
508
- * Be sure to invoke the function with the iterable as context:
509
- *
510
- * var iteratorFn = getIteratorFn(myIterable);
511
- * if (iteratorFn) {
512
- * var iterator = iteratorFn.call(myIterable);
513
- * ...
514
- * }
515
- *
516
- * @param {?object} maybeIterable
517
- * @return {?function}
518
- */
519
- function getIteratorFn(maybeIterable) {
520
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
521
- if (typeof iteratorFn === 'function') {
522
- return iteratorFn;
523
- }
524
- }
525
-
526
- /**
527
- * Collection of methods that allow declaration and validation of props that are
528
- * supplied to React components. Example usage:
529
- *
530
- * var Props = require('ReactPropTypes');
531
- * var MyArticle = React.createClass({
532
- * propTypes: {
533
- * // An optional string prop named "description".
534
- * description: Props.string,
535
- *
536
- * // A required enum prop named "category".
537
- * category: Props.oneOf(['News','Photos']).isRequired,
538
- *
539
- * // A prop named "dialog" that requires an instance of Dialog.
540
- * dialog: Props.instanceOf(Dialog).isRequired
541
- * },
542
- * render: function() { ... }
543
- * });
544
- *
545
- * A more formal specification of how these methods are used:
546
- *
547
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
548
- * decl := ReactPropTypes.{type}(.isRequired)?
549
- *
550
- * Each and every declaration produces a function with the same signature. This
551
- * allows the creation of custom validation functions. For example:
552
- *
553
- * var MyLink = React.createClass({
554
- * propTypes: {
555
- * // An optional string or URI prop named "href".
556
- * href: function(props, propName, componentName) {
557
- * var propValue = props[propName];
558
- * if (propValue != null && typeof propValue !== 'string' &&
559
- * !(propValue instanceof URI)) {
560
- * return new Error(
561
- * 'Expected a string or an URI for ' + propName + ' in ' +
562
- * componentName
563
- * );
564
- * }
565
- * }
566
- * },
567
- * render: function() {...}
568
- * });
569
- *
570
- * @internal
571
- */
572
-
573
- var ANONYMOUS = '<<anonymous>>';
574
-
575
- // Important!
576
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
577
- var ReactPropTypes = {
578
- array: createPrimitiveTypeChecker('array'),
579
- bigint: createPrimitiveTypeChecker('bigint'),
580
- bool: createPrimitiveTypeChecker('boolean'),
581
- func: createPrimitiveTypeChecker('function'),
582
- number: createPrimitiveTypeChecker('number'),
583
- object: createPrimitiveTypeChecker('object'),
584
- string: createPrimitiveTypeChecker('string'),
585
- symbol: createPrimitiveTypeChecker('symbol'),
586
-
587
- any: createAnyTypeChecker(),
588
- arrayOf: createArrayOfTypeChecker,
589
- element: createElementTypeChecker(),
590
- elementType: createElementTypeTypeChecker(),
591
- instanceOf: createInstanceTypeChecker,
592
- node: createNodeChecker(),
593
- objectOf: createObjectOfTypeChecker,
594
- oneOf: createEnumTypeChecker,
595
- oneOfType: createUnionTypeChecker,
596
- shape: createShapeTypeChecker,
597
- exact: createStrictShapeTypeChecker,
598
- };
599
-
600
- /**
601
- * inlined Object.is polyfill to avoid requiring consumers ship their own
602
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
603
- */
604
- /*eslint-disable no-self-compare*/
605
- function is(x, y) {
606
- // SameValue algorithm
607
- if (x === y) {
608
- // Steps 1-5, 7-10
609
- // Steps 6.b-6.e: +0 != -0
610
- return x !== 0 || 1 / x === 1 / y;
611
- } else {
612
- // Step 6.a: NaN == NaN
613
- return x !== x && y !== y;
614
- }
615
- }
616
- /*eslint-enable no-self-compare*/
617
-
618
- /**
619
- * We use an Error-like object for backward compatibility as people may call
620
- * PropTypes directly and inspect their output. However, we don't use real
621
- * Errors anymore. We don't inspect their stack anyway, and creating them
622
- * is prohibitively expensive if they are created too often, such as what
623
- * happens in oneOfType() for any type before the one that matched.
624
- */
625
- function PropTypeError(message, data) {
626
- this.message = message;
627
- this.data = data && typeof data === 'object' ? data: {};
628
- this.stack = '';
629
- }
630
- // Make `instanceof Error` still work for returned errors.
631
- PropTypeError.prototype = Error.prototype;
632
-
633
- function createChainableTypeChecker(validate) {
634
- if (process.env.NODE_ENV !== 'production') {
635
- var manualPropTypeCallCache = {};
636
- var manualPropTypeWarningCount = 0;
637
- }
638
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
639
- componentName = componentName || ANONYMOUS;
640
- propFullName = propFullName || propName;
641
-
642
- if (secret !== ReactPropTypesSecret$1) {
643
- if (throwOnDirectAccess) {
644
- // New behavior only for users of `prop-types` package
645
- var err = new Error(
646
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
647
- 'Use `PropTypes.checkPropTypes()` to call them. ' +
648
- 'Read more at http://fb.me/use-check-prop-types'
649
- );
650
- err.name = 'Invariant Violation';
651
- throw err;
652
- } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
653
- // Old behavior for people using React.PropTypes
654
- var cacheKey = componentName + ':' + propName;
655
- if (
656
- !manualPropTypeCallCache[cacheKey] &&
657
- // Avoid spamming the console because they are often not actionable except for lib authors
658
- manualPropTypeWarningCount < 3
659
- ) {
660
- printWarning(
661
- 'You are manually calling a React.PropTypes validation ' +
662
- 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
663
- 'and will throw in the standalone `prop-types` package. ' +
664
- 'You may be seeing this warning due to a third-party PropTypes ' +
665
- 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
666
- );
667
- manualPropTypeCallCache[cacheKey] = true;
668
- manualPropTypeWarningCount++;
669
- }
670
- }
671
- }
672
- if (props[propName] == null) {
673
- if (isRequired) {
674
- if (props[propName] === null) {
675
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
676
- }
677
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
678
- }
679
- return null;
680
- } else {
681
- return validate(props, propName, componentName, location, propFullName);
682
- }
683
- }
684
-
685
- var chainedCheckType = checkType.bind(null, false);
686
- chainedCheckType.isRequired = checkType.bind(null, true);
687
-
688
- return chainedCheckType;
689
- }
690
-
691
- function createPrimitiveTypeChecker(expectedType) {
692
- function validate(props, propName, componentName, location, propFullName, secret) {
693
- var propValue = props[propName];
694
- var propType = getPropType(propValue);
695
- if (propType !== expectedType) {
696
- // `propValue` being instance of, say, date/regexp, pass the 'object'
697
- // check, but we can offer a more precise error message here rather than
698
- // 'of type `object`'.
699
- var preciseType = getPreciseType(propValue);
700
-
701
- return new PropTypeError(
702
- 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
703
- {expectedType: expectedType}
704
- );
705
- }
706
- return null;
707
- }
708
- return createChainableTypeChecker(validate);
709
- }
710
-
711
- function createAnyTypeChecker() {
712
- return createChainableTypeChecker(emptyFunctionThatReturnsNull);
713
- }
714
-
715
- function createArrayOfTypeChecker(typeChecker) {
716
- function validate(props, propName, componentName, location, propFullName) {
717
- if (typeof typeChecker !== 'function') {
718
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
719
- }
720
- var propValue = props[propName];
721
- if (!Array.isArray(propValue)) {
722
- var propType = getPropType(propValue);
723
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
724
- }
725
- for (var i = 0; i < propValue.length; i++) {
726
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret$1);
727
- if (error instanceof Error) {
728
- return error;
729
- }
730
- }
731
- return null;
732
- }
733
- return createChainableTypeChecker(validate);
734
- }
735
-
736
- function createElementTypeChecker() {
737
- function validate(props, propName, componentName, location, propFullName) {
738
- var propValue = props[propName];
739
- if (!isValidElement(propValue)) {
740
- var propType = getPropType(propValue);
741
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
742
- }
743
- return null;
744
- }
745
- return createChainableTypeChecker(validate);
746
- }
747
-
748
- function createElementTypeTypeChecker() {
749
- function validate(props, propName, componentName, location, propFullName) {
750
- var propValue = props[propName];
751
- if (!ReactIs$1.isValidElementType(propValue)) {
752
- var propType = getPropType(propValue);
753
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
754
- }
755
- return null;
756
- }
757
- return createChainableTypeChecker(validate);
758
- }
759
-
760
- function createInstanceTypeChecker(expectedClass) {
761
- function validate(props, propName, componentName, location, propFullName) {
762
- if (!(props[propName] instanceof expectedClass)) {
763
- var expectedClassName = expectedClass.name || ANONYMOUS;
764
- var actualClassName = getClassName(props[propName]);
765
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
766
- }
767
- return null;
768
- }
769
- return createChainableTypeChecker(validate);
770
- }
771
-
772
- function createEnumTypeChecker(expectedValues) {
773
- if (!Array.isArray(expectedValues)) {
774
- if (process.env.NODE_ENV !== 'production') {
775
- if (arguments.length > 1) {
776
- printWarning(
777
- 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
778
- 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
779
- );
780
- } else {
781
- printWarning('Invalid argument supplied to oneOf, expected an array.');
782
- }
783
- }
784
- return emptyFunctionThatReturnsNull;
785
- }
786
-
787
- function validate(props, propName, componentName, location, propFullName) {
788
- var propValue = props[propName];
789
- for (var i = 0; i < expectedValues.length; i++) {
790
- if (is(propValue, expectedValues[i])) {
791
- return null;
792
- }
793
- }
794
-
795
- var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
796
- var type = getPreciseType(value);
797
- if (type === 'symbol') {
798
- return String(value);
799
- }
800
- return value;
801
- });
802
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
803
- }
804
- return createChainableTypeChecker(validate);
805
- }
806
-
807
- function createObjectOfTypeChecker(typeChecker) {
808
- function validate(props, propName, componentName, location, propFullName) {
809
- if (typeof typeChecker !== 'function') {
810
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
811
- }
812
- var propValue = props[propName];
813
- var propType = getPropType(propValue);
814
- if (propType !== 'object') {
815
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
816
- }
817
- for (var key in propValue) {
818
- if (has(propValue, key)) {
819
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
820
- if (error instanceof Error) {
821
- return error;
822
- }
823
- }
824
- }
825
- return null;
826
- }
827
- return createChainableTypeChecker(validate);
828
- }
829
-
830
- function createUnionTypeChecker(arrayOfTypeCheckers) {
831
- if (!Array.isArray(arrayOfTypeCheckers)) {
832
- process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
833
- return emptyFunctionThatReturnsNull;
834
- }
835
-
836
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
837
- var checker = arrayOfTypeCheckers[i];
838
- if (typeof checker !== 'function') {
839
- printWarning(
840
- 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
841
- 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
842
- );
843
- return emptyFunctionThatReturnsNull;
844
- }
845
- }
846
-
847
- function validate(props, propName, componentName, location, propFullName) {
848
- var expectedTypes = [];
849
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
850
- var checker = arrayOfTypeCheckers[i];
851
- var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret$1);
852
- if (checkerResult == null) {
853
- return null;
854
- }
855
- if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
856
- expectedTypes.push(checkerResult.data.expectedType);
857
- }
858
- }
859
- var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
860
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
861
- }
862
- return createChainableTypeChecker(validate);
863
- }
864
-
865
- function createNodeChecker() {
866
- function validate(props, propName, componentName, location, propFullName) {
867
- if (!isNode(props[propName])) {
868
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
869
- }
870
- return null;
871
- }
872
- return createChainableTypeChecker(validate);
873
- }
874
-
875
- function invalidValidatorError(componentName, location, propFullName, key, type) {
876
- return new PropTypeError(
877
- (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
878
- 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
879
- );
880
- }
881
-
882
- function createShapeTypeChecker(shapeTypes) {
883
- function validate(props, propName, componentName, location, propFullName) {
884
- var propValue = props[propName];
885
- var propType = getPropType(propValue);
886
- if (propType !== 'object') {
887
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
888
- }
889
- for (var key in shapeTypes) {
890
- var checker = shapeTypes[key];
891
- if (typeof checker !== 'function') {
892
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
893
- }
894
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
895
- if (error) {
896
- return error;
897
- }
898
- }
899
- return null;
900
- }
901
- return createChainableTypeChecker(validate);
902
- }
903
-
904
- function createStrictShapeTypeChecker(shapeTypes) {
905
- function validate(props, propName, componentName, location, propFullName) {
906
- var propValue = props[propName];
907
- var propType = getPropType(propValue);
908
- if (propType !== 'object') {
909
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
910
- }
911
- // We need to check all keys in case some are required but missing from props.
912
- var allKeys = assign({}, props[propName], shapeTypes);
913
- for (var key in allKeys) {
914
- var checker = shapeTypes[key];
915
- if (has(shapeTypes, key) && typeof checker !== 'function') {
916
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
917
- }
918
- if (!checker) {
919
- return new PropTypeError(
920
- 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
921
- '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
922
- '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
923
- );
924
- }
925
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
926
- if (error) {
927
- return error;
928
- }
929
- }
930
- return null;
931
- }
932
-
933
- return createChainableTypeChecker(validate);
934
- }
935
-
936
- function isNode(propValue) {
937
- switch (typeof propValue) {
938
- case 'number':
939
- case 'string':
940
- case 'undefined':
941
- return true;
942
- case 'boolean':
943
- return !propValue;
944
- case 'object':
945
- if (Array.isArray(propValue)) {
946
- return propValue.every(isNode);
947
- }
948
- if (propValue === null || isValidElement(propValue)) {
949
- return true;
950
- }
951
-
952
- var iteratorFn = getIteratorFn(propValue);
953
- if (iteratorFn) {
954
- var iterator = iteratorFn.call(propValue);
955
- var step;
956
- if (iteratorFn !== propValue.entries) {
957
- while (!(step = iterator.next()).done) {
958
- if (!isNode(step.value)) {
959
- return false;
960
- }
961
- }
962
- } else {
963
- // Iterator will provide entry [k,v] tuples rather than values.
964
- while (!(step = iterator.next()).done) {
965
- var entry = step.value;
966
- if (entry) {
967
- if (!isNode(entry[1])) {
968
- return false;
969
- }
970
- }
971
- }
972
- }
973
- } else {
974
- return false;
975
- }
976
-
977
- return true;
978
- default:
979
- return false;
980
- }
981
- }
982
-
983
- function isSymbol(propType, propValue) {
984
- // Native Symbol.
985
- if (propType === 'symbol') {
986
- return true;
987
- }
988
-
989
- // falsy value can't be a Symbol
990
- if (!propValue) {
991
- return false;
992
- }
993
-
994
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
995
- if (propValue['@@toStringTag'] === 'Symbol') {
996
- return true;
997
- }
998
-
999
- // Fallback for non-spec compliant Symbols which are polyfilled.
1000
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
1001
- return true;
1002
- }
1003
-
1004
- return false;
1005
- }
1006
-
1007
- // Equivalent of `typeof` but with special handling for array and regexp.
1008
- function getPropType(propValue) {
1009
- var propType = typeof propValue;
1010
- if (Array.isArray(propValue)) {
1011
- return 'array';
1012
- }
1013
- if (propValue instanceof RegExp) {
1014
- // Old webkits (at least until Android 4.0) return 'function' rather than
1015
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1016
- // passes PropTypes.object.
1017
- return 'object';
1018
- }
1019
- if (isSymbol(propType, propValue)) {
1020
- return 'symbol';
1021
- }
1022
- return propType;
1023
- }
1024
-
1025
- // This handles more types than `getPropType`. Only used for error messages.
1026
- // See `createPrimitiveTypeChecker`.
1027
- function getPreciseType(propValue) {
1028
- if (typeof propValue === 'undefined' || propValue === null) {
1029
- return '' + propValue;
1030
- }
1031
- var propType = getPropType(propValue);
1032
- if (propType === 'object') {
1033
- if (propValue instanceof Date) {
1034
- return 'date';
1035
- } else if (propValue instanceof RegExp) {
1036
- return 'regexp';
1037
- }
1038
- }
1039
- return propType;
1040
- }
1041
-
1042
- // Returns a string that is postfixed to a warning about an invalid type.
1043
- // For example, "undefined" or "of type array"
1044
- function getPostfixForTypeWarning(value) {
1045
- var type = getPreciseType(value);
1046
- switch (type) {
1047
- case 'array':
1048
- case 'object':
1049
- return 'an ' + type;
1050
- case 'boolean':
1051
- case 'date':
1052
- case 'regexp':
1053
- return 'a ' + type;
1054
- default:
1055
- return type;
1056
- }
1057
- }
1058
-
1059
- // Returns class name of the object, if any.
1060
- function getClassName(propValue) {
1061
- if (!propValue.constructor || !propValue.constructor.name) {
1062
- return ANONYMOUS;
1063
- }
1064
- return propValue.constructor.name;
1065
- }
1066
-
1067
- ReactPropTypes.checkPropTypes = checkPropTypes;
1068
- ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
1069
- ReactPropTypes.PropTypes = ReactPropTypes;
1070
-
1071
- return ReactPropTypes;
1072
- };
1073
-
1074
- /**
1075
- * Copyright (c) 2013-present, Facebook, Inc.
1076
- *
1077
- * This source code is licensed under the MIT license found in the
1078
- * LICENSE file in the root directory of this source tree.
1079
- */
1080
-
1081
- var ReactPropTypesSecret = ReactPropTypesSecret_1;
1082
-
1083
- function emptyFunction() {}
1084
- function emptyFunctionWithReset() {}
1085
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
1086
-
1087
- var factoryWithThrowingShims = function() {
1088
- function shim(props, propName, componentName, location, propFullName, secret) {
1089
- if (secret === ReactPropTypesSecret) {
1090
- // It is still safe when called from React.
1091
- return;
1092
- }
1093
- var err = new Error(
1094
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
1095
- 'Use PropTypes.checkPropTypes() to call them. ' +
1096
- 'Read more at http://fb.me/use-check-prop-types'
1097
- );
1098
- err.name = 'Invariant Violation';
1099
- throw err;
1100
- } shim.isRequired = shim;
1101
- function getShim() {
1102
- return shim;
1103
- } // Important!
1104
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
1105
- var ReactPropTypes = {
1106
- array: shim,
1107
- bigint: shim,
1108
- bool: shim,
1109
- func: shim,
1110
- number: shim,
1111
- object: shim,
1112
- string: shim,
1113
- symbol: shim,
1114
-
1115
- any: shim,
1116
- arrayOf: getShim,
1117
- element: shim,
1118
- elementType: shim,
1119
- instanceOf: getShim,
1120
- node: shim,
1121
- objectOf: getShim,
1122
- oneOf: getShim,
1123
- oneOfType: getShim,
1124
- shape: getShim,
1125
- exact: getShim,
1126
-
1127
- checkPropTypes: emptyFunctionWithReset,
1128
- resetWarningCache: emptyFunction
1129
- };
1130
-
1131
- ReactPropTypes.PropTypes = ReactPropTypes;
1132
-
1133
- return ReactPropTypes;
1134
- };
1135
-
1136
- /**
1137
- * Copyright (c) 2013-present, Facebook, Inc.
1138
- *
1139
- * This source code is licensed under the MIT license found in the
1140
- * LICENSE file in the root directory of this source tree.
1141
- */
1142
-
1143
- if (process.env.NODE_ENV !== 'production') {
1144
- var ReactIs = reactIs.exports;
1145
-
1146
- // By explicitly using `prop-types` you are opting into new development behavior.
1147
- // http://fb.me/prop-types-in-prod
1148
- var throwOnDirectAccess = true;
1149
- propTypes.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess);
1150
- } else {
1151
- // By explicitly using `prop-types` you are opting into new production behavior.
1152
- // http://fb.me/prop-types-in-prod
1153
- propTypes.exports = factoryWithThrowingShims();
1154
- }
1155
-
1156
- var PropTypes = propTypes.exports;
1157
-
1158
14
  var interpolate = function interpolate(y0, y1, x0, x1, x) {
1159
15
  return y0 + (x - x0) * (y1 - y0) / (x1 - x0);
1160
16
  };
@@ -1329,9 +185,9 @@ function useTimelinePerspective(_ref) {
1329
185
  };
1330
186
  }
1331
187
 
1332
- function ownKeys$9(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
188
+ function ownKeys$a(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1333
189
 
1334
- function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$9(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$9(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
190
+ function _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$a(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$a(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1335
191
  var TimelineContext = /*#__PURE__*/createContext();
1336
192
  function TimelineProvider(_ref) {
1337
193
  var start = _ref.start,
@@ -1351,7 +207,7 @@ function TimelineProvider(_ref) {
1351
207
  defaultPerspective: defaultPerspective
1352
208
  });
1353
209
  var contextValue = useMemo(function () {
1354
- return _objectSpread$9(_objectSpread$9({}, timelinePerspective), {}, {
210
+ return _objectSpread$a(_objectSpread$a({}, timelinePerspective), {}, {
1355
211
  start: start,
1356
212
  end: end,
1357
213
  time: time,
@@ -1403,11 +259,11 @@ var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r
1403
259
  var css$7 = ":root {\n --vdt-timeline-palette-primary:#ba67c8;;\n --vdt-timeline-palette-primary-dark: rgb(130, 72, 140);\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}";
1404
260
  n(css$7,{});
1405
261
 
1406
- var _excluded$8 = ["start", "end", "time", "onChangeTime", "children", "className", "perspective", "onChangePerspective", "defaultPerspective", "zoomMultiplier"];
262
+ var _excluded$9 = ["start", "end", "time", "onChangeTime", "children", "className", "perspective", "onChangePerspective", "defaultPerspective", "zoomMultiplier"];
1407
263
 
1408
- function ownKeys$8(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
264
+ function ownKeys$9(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1409
265
 
1410
- function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$8(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$8(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
266
+ function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$9(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$9(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1411
267
  function Timeline(_ref) {
1412
268
  var start = _ref.start,
1413
269
  end = _ref.end,
@@ -1419,7 +275,7 @@ function Timeline(_ref) {
1419
275
  onChangePerspective = _ref.onChangePerspective,
1420
276
  defaultPerspective = _ref.defaultPerspective,
1421
277
  zoomMultiplier = _ref.zoomMultiplier,
1422
- props = _objectWithoutProperties(_ref, _excluded$8);
278
+ props = _objectWithoutProperties(_ref, _excluded$9);
1423
279
 
1424
280
  var timelineRef = useRef();
1425
281
  return /*#__PURE__*/jsx(TimelineProvider, {
@@ -1432,20 +288,15 @@ function Timeline(_ref) {
1432
288
  onChangePerspective: onChangePerspective,
1433
289
  defaultPerspective: defaultPerspective,
1434
290
  zoomMultiplier: zoomMultiplier,
1435
- children: /*#__PURE__*/jsx("div", _objectSpread$8(_objectSpread$8({
291
+ children: /*#__PURE__*/jsx("div", _objectSpread$9(_objectSpread$9({
1436
292
  ref: timelineRef,
1437
- className: clsx('VdtTimeline-root', className) // eslint-disable-next-line react/jsx-props-no-spreading
1438
-
293
+ className: clsx('VdtTimeline-root', className)
1439
294
  }, props), {}, {
1440
295
  children: children
1441
296
  }))
1442
297
  });
1443
298
  }
1444
299
  Timeline.propTypes = {
1445
- /**
1446
- * @ignore
1447
- */
1448
- className: PropTypes.string,
1449
300
  start: PropTypes.number.isRequired,
1450
301
  end: PropTypes.number.isRequired,
1451
302
  time: PropTypes.number,
@@ -1460,17 +311,22 @@ Timeline.propTypes = {
1460
311
  start: PropTypes.number,
1461
312
  end: PropTypes.number
1462
313
  }),
1463
- zoomMultiplier: PropTypes.oneOfType([PropTypes.number, PropTypes.func])
314
+ zoomMultiplier: PropTypes.oneOfType([PropTypes.number, PropTypes.func]),
315
+
316
+ /**
317
+ * Override styles with className
318
+ */
319
+ className: PropTypes.string
1464
320
  };
1465
321
  Timeline.defaultProps = {
1466
- className: undefined,
1467
322
  time: undefined,
1468
323
  children: undefined,
1469
324
  onChangeTime: undefined,
1470
325
  perspective: undefined,
1471
326
  onChangePerspective: undefined,
1472
327
  defaultPerspective: undefined,
1473
- zoomMultiplier: undefined
328
+ zoomMultiplier: undefined,
329
+ className: undefined
1474
330
  };
1475
331
 
1476
332
  var DEFAULT_EVENT_HEIGHT = 15;
@@ -1479,16 +335,18 @@ var DEFAULT_PLAYHEAD_ZINDEX = 100;
1479
335
  var css$6 = ":root {\n --vdt-timeline-palette-primary:#ba67c8;;\n --vdt-timeline-palette-primary-dark: rgb(130, 72, 140);\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}";
1480
336
  n(css$6,{});
1481
337
 
1482
- var _excluded$7 = ["className", "perspective", "time", "lineWidth", "headWidth", "headHeight", "style", "onDrag", "HeadProps"];
338
+ var _excluded$8 = ["className", "perspective", "time", "lineWidth", "headWidth", "headHeight", "style", "onDrag", "HeadProps"];
1483
339
 
1484
- function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
340
+ function ownKeys$8(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1485
341
 
1486
- function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$7(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
342
+ function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$8(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$8(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1487
343
 
1488
- var _getStyleProperties$3 = getStyleProperties('--vdt-timeline-palette-secondary'),
1489
- _getStyleProperties2$3 = _slicedToArray(_getStyleProperties$3, 1),
1490
- paletteSecondary$1 = _getStyleProperties2$3[0];
344
+ var _getStyleProperties$4 = getStyleProperties('--vdt-timeline-palette-secondary'),
345
+ _getStyleProperties2$4 = _slicedToArray(_getStyleProperties$4, 1),
346
+ paletteSecondary$1 = _getStyleProperties2$4[0];
1491
347
 
348
+ var EmptyImage = document.createElement('img');
349
+ EmptyImage.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
1492
350
  function TimelinePlayhead(_ref) {
1493
351
  var _ref$current;
1494
352
 
@@ -1501,7 +359,7 @@ function TimelinePlayhead(_ref) {
1501
359
  style = _ref.style,
1502
360
  onDrag = _ref.onDrag,
1503
361
  HeadProps = _ref.HeadProps,
1504
- props = _objectWithoutProperties(_ref, _excluded$7);
362
+ props = _objectWithoutProperties(_ref, _excluded$8);
1505
363
 
1506
364
  var _ref2 = useTimeline() || {
1507
365
  perspective: propPerspective,
@@ -1550,10 +408,10 @@ function TimelinePlayhead(_ref) {
1550
408
  return onChangeTime.apply(void 0, args);
1551
409
  };
1552
410
 
1553
- return /*#__PURE__*/jsx("div", _objectSpread$7(_objectSpread$7({
411
+ return /*#__PURE__*/jsx("div", _objectSpread$8(_objectSpread$8({
1554
412
  ref: ref,
1555
413
  className: clsx('VdtTimelinePlayhead-root', className),
1556
- style: _objectSpread$7({
414
+ style: _objectSpread$8({
1557
415
  width: lineWidth,
1558
416
  left: markerLeft,
1559
417
  display: hide && 'none',
@@ -1562,7 +420,8 @@ function TimelinePlayhead(_ref) {
1562
420
  draggable: true,
1563
421
  onDragStart: function onDragStart(e) {
1564
422
  setIsDragging(true);
1565
- e.dataTransfer.setDragImage(ref.current, -99999, -99999);
423
+ e.dataTransfer.setDragImage(EmptyImage, 0, 0);
424
+ return false;
1566
425
  },
1567
426
  onDragEnd: function onDragEnd() {
1568
427
  setIsDragging(false);
@@ -1584,10 +443,9 @@ function TimelinePlayhead(_ref) {
1584
443
  setLocalTime(clampedNewTime);
1585
444
  }
1586
445
  }
1587
- } // eslint-disable-next-line react/jsx-props-no-spreading
1588
-
446
+ }
1589
447
  }, props), {}, {
1590
- children: /*#__PURE__*/jsx("div", _objectSpread$7({
448
+ children: /*#__PURE__*/jsx("div", _objectSpread$8({
1591
449
  className: "VdtTimelinePlayhead-head",
1592
450
  style: {
1593
451
  position: 'absolute',
@@ -1597,16 +455,11 @@ function TimelinePlayhead(_ref) {
1597
455
  left: -(headWidth / 2 - lineWidth / 2),
1598
456
  top: -headHeight + 1,
1599
457
  clipPath: 'polygon(0% 0%, 0% 70%, 50% 100%, 100% 70%, 100% 0%)'
1600
- } // eslint-disable-next-line react/jsx-props-no-spreading
1601
-
458
+ }
1602
459
  }, HeadProps))
1603
460
  }));
1604
461
  }
1605
462
  TimelinePlayhead.propTypes = {
1606
- /**
1607
- * @ignore
1608
- */
1609
- className: PropTypes.string,
1610
463
  style: PropTypes.instanceOf(Object),
1611
464
  headHeight: PropTypes.number,
1612
465
  headWidth: PropTypes.number,
@@ -1617,10 +470,14 @@ TimelinePlayhead.propTypes = {
1617
470
  }),
1618
471
  time: PropTypes.number,
1619
472
  onDrag: PropTypes.func,
1620
- HeadProps: PropTypes.instanceOf(Object)
473
+ HeadProps: PropTypes.instanceOf(Object),
474
+
475
+ /**
476
+ * Override styles with className
477
+ */
478
+ className: PropTypes.string
1621
479
  };
1622
480
  TimelinePlayhead.defaultProps = {
1623
- className: undefined,
1624
481
  style: {},
1625
482
  headHeight: 16,
1626
483
  headWidth: 12,
@@ -1628,7 +485,8 @@ TimelinePlayhead.defaultProps = {
1628
485
  perspective: undefined,
1629
486
  time: 0,
1630
487
  onDrag: undefined,
1631
- HeadProps: {}
488
+ HeadProps: {},
489
+ className: undefined
1632
490
  };
1633
491
 
1634
492
  function useResizeObserver(ref) {
@@ -1669,23 +527,23 @@ n(css$5,{});
1669
527
  var css$4 = ".VdtTimelineWaveform-root {\n height: 40px;\n}";
1670
528
  n(css$4,{});
1671
529
 
1672
- var _excluded$6 = ["amplitudeSegments", "pxPerTimeUnit", "start", "height"],
1673
- _excluded2$2 = ["className", "waveform", "start", "end", "perspective", "StageProps", "LayerProps", "RectProps", "WaveRectProps"];
530
+ var _excluded$7 = ["amplitudeSegments", "pxPerTimeUnit", "start", "height"],
531
+ _excluded2$3 = ["className", "waveform", "start", "end", "perspective", "StageProps", "LayerProps", "RectProps", "WaveRectProps"];
1674
532
 
1675
- function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
533
+ function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1676
534
 
1677
- function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$6(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
535
+ function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$7(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1678
536
 
1679
- var _getStyleProperties$2 = getStyleProperties('--vdt-timeline-palette-primary'),
1680
- _getStyleProperties2$2 = _slicedToArray(_getStyleProperties$2, 1),
1681
- palettePrimary = _getStyleProperties2$2[0];
537
+ var _getStyleProperties$3 = getStyleProperties('--vdt-timeline-palette-primary'),
538
+ _getStyleProperties2$3 = _slicedToArray(_getStyleProperties$3, 1),
539
+ palettePrimary$1 = _getStyleProperties2$3[0];
1682
540
 
1683
541
  var TimelineWaveFormRects = /*#__PURE__*/memo(function (_ref) {
1684
542
  var amplitudeSegments = _ref.amplitudeSegments,
1685
543
  pxPerTimeUnit = _ref.pxPerTimeUnit,
1686
544
  start = _ref.start,
1687
545
  height = _ref.height,
1688
- props = _objectWithoutProperties(_ref, _excluded$6);
546
+ props = _objectWithoutProperties(_ref, _excluded$7);
1689
547
 
1690
548
  return amplitudeSegments.map(function (_ref2, i) {
1691
549
  var amplitude = _ref2.amplitude,
@@ -1696,13 +554,12 @@ var TimelineWaveFormRects = /*#__PURE__*/memo(function (_ref) {
1696
554
  var rectHeight = height * amplitude;
1697
555
  var centeredY = (height - rectHeight) / 2;
1698
556
  return /*#__PURE__*/jsx(Rect // eslint-disable-next-line react/no-array-index-key
1699
- , _objectSpread$6({
557
+ , _objectSpread$7({
1700
558
  x: rectX,
1701
559
  y: centeredY,
1702
560
  height: rectHeight,
1703
561
  width: rectWidth,
1704
- fill: palettePrimary // eslint-disable-next-line react/jsx-props-no-spreading
1705
-
562
+ fill: palettePrimary$1
1706
563
  }, props), i);
1707
564
  });
1708
565
  });
@@ -1717,7 +574,7 @@ function TimelineWaveform(_ref3) {
1717
574
  LayerProps = _ref3.LayerProps,
1718
575
  RectProps = _ref3.RectProps,
1719
576
  WaveRectProps = _ref3.WaveRectProps,
1720
- props = _objectWithoutProperties(_ref3, _excluded2$2);
577
+ props = _objectWithoutProperties(_ref3, _excluded2$3);
1721
578
 
1722
579
  var _ref4 = useTimeline() || {
1723
580
  start: propStart,
@@ -1752,44 +609,35 @@ function TimelineWaveform(_ref3) {
1752
609
  var pxPerTimeUnit = width / (end - start);
1753
610
  var scaleX = (end - start) / (perspective.end - perspective.start);
1754
611
  var offsetX = interpolate(0, scaleX * width, start, end, perspective.start);
1755
- return /*#__PURE__*/jsx("div", _objectSpread$6(_objectSpread$6({
612
+ return /*#__PURE__*/jsx("div", _objectSpread$7(_objectSpread$7({
1756
613
  ref: ref,
1757
- className: clsx('VdtTimelineWaveform-root', className) // eslint-disable-next-line react/jsx-props-no-spreading
1758
-
614
+ className: clsx('VdtTimelineWaveform-root', className)
1759
615
  }, props), {}, {
1760
- children: /*#__PURE__*/jsx(Stage, _objectSpread$6(_objectSpread$6({
616
+ children: /*#__PURE__*/jsx(Stage, _objectSpread$7(_objectSpread$7({
1761
617
  height: height,
1762
618
  width: width,
1763
619
  x: -offsetX,
1764
- scaleX: scaleX // eslint-disable-next-line react/jsx-props-no-spreading
1765
-
620
+ scaleX: scaleX
1766
621
  }, StageProps), {}, {
1767
- children: /*#__PURE__*/jsxs(Layer, _objectSpread$6(_objectSpread$6({
1768
- listening: false // eslint-disable-next-line react/jsx-props-no-spreading
1769
-
622
+ children: /*#__PURE__*/jsxs(Layer, _objectSpread$7(_objectSpread$7({
623
+ listening: false
1770
624
  }, LayerProps), {}, {
1771
- children: [/*#__PURE__*/jsx(Rect, _objectSpread$6({
625
+ children: [/*#__PURE__*/jsx(Rect, _objectSpread$7({
1772
626
  x: 0,
1773
627
  y: 0,
1774
628
  width: width,
1775
- height: height // eslint-disable-next-line react/jsx-props-no-spreading
1776
-
1777
- }, RectProps)), /*#__PURE__*/jsx(TimelineWaveFormRects, _objectSpread$6({
629
+ height: height
630
+ }, RectProps)), /*#__PURE__*/jsx(TimelineWaveFormRects, _objectSpread$7({
1778
631
  amplitudeSegments: amplitudeSegments,
1779
632
  pxPerTimeUnit: pxPerTimeUnit,
1780
633
  start: start,
1781
- height: height // eslint-disable-next-line react/jsx-props-no-spreading
1782
-
634
+ height: height
1783
635
  }, WaveRectProps))]
1784
636
  }))
1785
637
  }))
1786
638
  }));
1787
639
  }
1788
640
  TimelineWaveform.propTypes = {
1789
- /**
1790
- * @ignore
1791
- */
1792
- className: PropTypes.string,
1793
641
  waveform: PropTypes.arrayOf(PropTypes.number),
1794
642
  start: PropTypes.number,
1795
643
  end: PropTypes.number,
@@ -1800,10 +648,14 @@ TimelineWaveform.propTypes = {
1800
648
  StageProps: PropTypes.instanceOf(Object),
1801
649
  LayerProps: PropTypes.instanceOf(Object),
1802
650
  RectProps: PropTypes.instanceOf(Object),
1803
- WaveRectProps: PropTypes.instanceOf(Object)
651
+ WaveRectProps: PropTypes.instanceOf(Object),
652
+
653
+ /**
654
+ * Override styles with className
655
+ */
656
+ className: PropTypes.string
1804
657
  };
1805
658
  TimelineWaveform.defaultProps = {
1806
- className: undefined,
1807
659
  waveform: [],
1808
660
  start: undefined,
1809
661
  end: undefined,
@@ -1811,7 +663,8 @@ TimelineWaveform.defaultProps = {
1811
663
  StageProps: {},
1812
664
  LayerProps: {},
1813
665
  RectProps: {},
1814
- WaveRectProps: {}
666
+ WaveRectProps: {},
667
+ className: undefined
1815
668
  };
1816
669
 
1817
670
  function useHover() {
@@ -1843,6 +696,209 @@ function useHover() {
1843
696
  };
1844
697
  }
1845
698
 
699
+ var _excluded$6 = ["onClick", "x", "width", "y", "height", "padding", "start", "end", "onHover", "onMove", "onMoveStart", "onMoveEnd", "onResize", "onResizeStart", "onResizeEnd"],
700
+ _excluded2$2 = ["isHovering"],
701
+ _excluded3 = ["isHovering"];
702
+
703
+ function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
704
+
705
+ function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$6(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
706
+
707
+ var _getStyleProperties$2 = getStyleProperties('--vdt-timeline-palette-primary', '--vdt-timeline-palette-primary-dark'),
708
+ _getStyleProperties2$2 = _slicedToArray(_getStyleProperties$2, 2),
709
+ palettePrimary = _getStyleProperties2$2[0],
710
+ palettePrimaryDark = _getStyleProperties2$2[1];
711
+
712
+ var EVENT_RESIZER_THUMB_WIDTH = 5;
713
+ function TimelineEvent(_ref) {
714
+ var onClick = _ref.onClick,
715
+ x = _ref.x,
716
+ width = _ref.width,
717
+ y = _ref.y,
718
+ height = _ref.height,
719
+ padding = _ref.padding,
720
+ start = _ref.start,
721
+ end = _ref.end,
722
+ onHover = _ref.onHover,
723
+ onMove = _ref.onMove,
724
+ onMoveStart = _ref.onMoveStart,
725
+ onMoveEnd = _ref.onMoveEnd,
726
+ onResize = _ref.onResize,
727
+ onResizeStart = _ref.onResizeStart,
728
+ onResizeEnd = _ref.onResizeEnd,
729
+ props = _objectWithoutProperties(_ref, _excluded$6);
730
+
731
+ if ([x, width, y, height].some(function (v) {
732
+ return v === undefined;
733
+ })) {
734
+ vLog.error('VdtTimelineEvent', "missing 'x', 'width', 'y', or 'height' props. If the component is not used as a direct child of VdtTimelineTrack, 'x', 'width', 'y', or 'height' must be passed explicitly");
735
+ }
736
+
737
+ var eventRef = useRef();
738
+
739
+ var _useHover = useHover({
740
+ hoverEffect: function hoverEffect(e) {
741
+ if (onHover) onHover(e, true);
742
+ return function () {
743
+ if (onHover) onHover(e, false);
744
+ };
745
+ }
746
+ }),
747
+ isHovering = _useHover.isHovering,
748
+ hoverProps = _objectWithoutProperties(_useHover, _excluded2$2);
749
+
750
+ var _useHover2 = useHover({
751
+ hoverEffect: function hoverEffect(e) {
752
+ if (onResize) {
753
+ e.target.getStage().container().style.cursor = 'col-resize';
754
+ }
755
+
756
+ return function () {
757
+ if (onResize) {
758
+ e.target.getStage().container().style.cursor = 'default';
759
+ }
760
+ };
761
+ }
762
+ }),
763
+ isHoveringResize = _useHover2.isHovering,
764
+ resizeHoverProps = _objectWithoutProperties(_useHover2, _excluded3);
765
+
766
+ var _useState = useState(false),
767
+ _useState2 = _slicedToArray(_useState, 2),
768
+ isMoving = _useState2[0],
769
+ setIsMoving = _useState2[1];
770
+
771
+ var hasOnClick = !!onClick;
772
+ useEffect(function () {
773
+ if (eventRef.current) {
774
+ var cursor = function () {
775
+ if (isMoving) return 'grabbing';
776
+ if (isHovering && hasOnClick) return 'pointer';
777
+ return 'default';
778
+ }();
779
+
780
+ eventRef.current.getStage().container().style.cursor = cursor;
781
+ }
782
+ }, [isMoving, isHovering, hasOnClick]);
783
+ var paddedY = y + padding;
784
+ var paddedHeight = height - 2 * padding;
785
+ var posProps = {
786
+ y: paddedY,
787
+ height: paddedHeight,
788
+ x: x,
789
+ width: width
790
+ };
791
+ var defaultHoverProps = isHovering || isHoveringResize ? {
792
+ fill: palettePrimaryDark
793
+ } : {};
794
+
795
+ var resizerProps = function resizerProps(which) {
796
+ var resizerX = which === 'start' ? x : x + width - EVENT_RESIZER_THUMB_WIDTH;
797
+ return {
798
+ onDragStart: function onDragStart() {
799
+ if (!onResizeStart) return;
800
+ onResizeStart(which);
801
+ },
802
+ draggable: !!onResize,
803
+ dragBoundFunc: function dragBoundFunc(pos) {
804
+ return {
805
+ x: pos.x,
806
+ y: paddedY
807
+ };
808
+ },
809
+ onDragEnd: function onDragEnd() {
810
+ if (!onResizeEnd) return;
811
+ onResizeEnd(which);
812
+ },
813
+ width: EVENT_RESIZER_THUMB_WIDTH,
814
+ x: resizerX,
815
+ onDragMove: function onDragMove(e) {
816
+ if (!onResize) return;
817
+
818
+ var _e$target$position = e.target.position(),
819
+ newX = _e$target$position.x;
820
+
821
+ e.target.x(resizerX);
822
+ var newPos = Math.floor(interpolate(start, end, x, x + width, newX + (which === 'start' ? 0 : EVENT_RESIZER_THUMB_WIDTH)));
823
+ onResize(e, which, newPos);
824
+ }
825
+ };
826
+ };
827
+
828
+ return /*#__PURE__*/jsxs(Fragment, {
829
+ children: [/*#__PURE__*/jsx(Rect, _objectSpread$6(_objectSpread$6(_objectSpread$6(_objectSpread$6({
830
+ ref: eventRef,
831
+ draggable: !!onMove,
832
+ dragBoundFunc: function dragBoundFunc(pos) {
833
+ return {
834
+ x: pos.x,
835
+ y: paddedY
836
+ };
837
+ },
838
+ onDragStart: function onDragStart(e) {
839
+ if (!onMove) return;
840
+ setIsMoving(true);
841
+
842
+ if (onMoveStart) {
843
+ onMoveStart(e);
844
+ }
845
+ },
846
+ onDragEnd: function onDragEnd(e) {
847
+ if (!onMove) return;
848
+ setIsMoving(false);
849
+
850
+ if (onMoveEnd) {
851
+ onMoveEnd(e);
852
+ }
853
+ },
854
+ onDragMove: function onDragMove(e) {
855
+ if (!onMove) return;
856
+
857
+ var _e$target$position2 = e.target.position(),
858
+ newX = _e$target$position2.x;
859
+
860
+ e.target.x(x);
861
+ var newStart = Math.floor(interpolate(start, end, x, x + width, newX));
862
+ onMove(e, newStart);
863
+ },
864
+ fill: palettePrimary,
865
+ onClick: onClick
866
+ }, posProps), defaultHoverProps), hoverProps), props)), /*#__PURE__*/jsx(Rect, _objectSpread$6(_objectSpread$6(_objectSpread$6({}, posProps), resizeHoverProps), resizerProps('start'))), /*#__PURE__*/jsx(Rect, _objectSpread$6(_objectSpread$6(_objectSpread$6({}, posProps), resizeHoverProps), resizerProps('end')))]
867
+ });
868
+ }
869
+ TimelineEvent.propTypes = {
870
+ onClick: PropTypes.func,
871
+ onHover: PropTypes.func,
872
+ onMove: PropTypes.func,
873
+ onMoveStart: PropTypes.func,
874
+ onMoveEnd: PropTypes.func,
875
+ onResize: PropTypes.func,
876
+ onResizeStart: PropTypes.func,
877
+ onResizeEnd: PropTypes.func,
878
+ x: PropTypes.number,
879
+ width: PropTypes.number,
880
+ y: PropTypes.number,
881
+ height: PropTypes.number,
882
+ padding: PropTypes.number,
883
+ start: PropTypes.number.isRequired,
884
+ end: PropTypes.number.isRequired
885
+ };
886
+ TimelineEvent.defaultProps = {
887
+ onClick: undefined,
888
+ onHover: undefined,
889
+ onMove: undefined,
890
+ onMoveStart: undefined,
891
+ onMoveEnd: undefined,
892
+ onResize: undefined,
893
+ onResizeStart: undefined,
894
+ onResizeEnd: undefined,
895
+ x: undefined,
896
+ width: undefined,
897
+ y: 0,
898
+ height: DEFAULT_EVENT_HEIGHT,
899
+ padding: 1
900
+ };
901
+
1846
902
  var _excluded$5 = ["className", "children", "perspective", "onClick", "style", "onHover", "StageProps", "LayerProps", "GroupProps", "RectProps"],
1847
903
  _excluded2$1 = ["isHovering"];
1848
904
 
@@ -1943,25 +999,20 @@ function TimelineTrack(_ref) {
1943
999
  className: clsx('VdtTimelineTrack-root', className),
1944
1000
  style: _objectSpread$5({
1945
1001
  height: eventsContainerHeight
1946
- }, style) // eslint-disable-next-line react/jsx-props-no-spreading
1947
-
1002
+ }, style)
1948
1003
  }, props), {}, {
1949
1004
  children: /*#__PURE__*/jsx(Stage, _objectSpread$5(_objectSpread$5({
1950
1005
  height: eventContainerHeight,
1951
- width: eventContainerWidth // eslint-disable-next-line react/jsx-props-no-spreading
1952
-
1006
+ width: eventContainerWidth
1953
1007
  }, StageProps), {}, {
1954
- children: /*#__PURE__*/jsx(Layer // eslint-disable-next-line react/jsx-props-no-spreading
1955
- , _objectSpread$5(_objectSpread$5({}, LayerProps), {}, {
1956
- children: /*#__PURE__*/jsxs(Group // eslint-disable-next-line react/jsx-props-no-spreading
1957
- , _objectSpread$5(_objectSpread$5({}, GroupProps), {}, {
1008
+ children: /*#__PURE__*/jsx(Layer, _objectSpread$5(_objectSpread$5({}, LayerProps), {}, {
1009
+ children: /*#__PURE__*/jsxs(Group, _objectSpread$5(_objectSpread$5({}, GroupProps), {}, {
1958
1010
  children: [/*#__PURE__*/jsx(Rect, _objectSpread$5(_objectSpread$5({
1959
1011
  x: 0,
1960
1012
  y: 0,
1961
1013
  width: eventContainerWidth,
1962
1014
  height: eventContainerHeight,
1963
- onClick: onClick // eslint-disable-next-line react/jsx-props-no-spreading
1964
-
1015
+ onClick: onClick
1965
1016
  }, hoverProps), RectProps)), Children.map(visibleChildren, cloneChild)]
1966
1017
  }))
1967
1018
  }))
@@ -1969,10 +1020,6 @@ function TimelineTrack(_ref) {
1969
1020
  }));
1970
1021
  }
1971
1022
  TimelineTrack.propTypes = {
1972
- /**
1973
- * @ignore
1974
- */
1975
- className: PropTypes.string,
1976
1023
  style: PropTypes.instanceOf(Object),
1977
1024
 
1978
1025
  /**
@@ -2003,10 +1050,14 @@ TimelineTrack.propTypes = {
2003
1050
  StageProps: PropTypes.instanceOf(Object),
2004
1051
  LayerProps: PropTypes.instanceOf(Object),
2005
1052
  GroupProps: PropTypes.instanceOf(Object),
2006
- RectProps: PropTypes.instanceOf(Object)
1053
+ RectProps: PropTypes.instanceOf(Object),
1054
+
1055
+ /**
1056
+ * Override styles with className
1057
+ */
1058
+ className: PropTypes.string
2007
1059
  };
2008
1060
  TimelineTrack.defaultProps = {
2009
- className: undefined,
2010
1061
  style: {},
2011
1062
  children: undefined,
2012
1063
  perspective: undefined,
@@ -2015,7 +1066,8 @@ TimelineTrack.defaultProps = {
2015
1066
  StageProps: {},
2016
1067
  LayerProps: {},
2017
1068
  GroupProps: {},
2018
- RectProps: {}
1069
+ RectProps: {},
1070
+ className: undefined
2019
1071
  };
2020
1072
 
2021
1073
  var css$3 = ":root {\n --vdt-timeline-palette-primary:#ba67c8;;\n --vdt-timeline-palette-primary-dark: rgb(130, 72, 140);\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: 100px;\n padding: 0 8px;\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}\n\n.VdtTimelineRow-labelText {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: center;\n}";
@@ -2037,16 +1089,13 @@ function TimelineRow(_ref) {
2037
1089
  return /*#__PURE__*/jsxs("div", _objectSpread$4(_objectSpread$4({
2038
1090
  className: clsx('VdtTimelineRow-root', className, {
2039
1091
  'VdtTimelineRow-hasLabel': !!label
2040
- }) // eslint-disable-next-line react/jsx-props-no-spreading
2041
-
1092
+ })
2042
1093
  }, props), {}, {
2043
1094
  children: [label && /*#__PURE__*/jsx("div", _objectSpread$4(_objectSpread$4({
2044
- className: "VdtTimelineRow-label" // eslint-disable-next-line react/jsx-props-no-spreading
2045
-
1095
+ className: "VdtTimelineRow-label"
2046
1096
  }, LabelProps), {}, {
2047
1097
  children: /*#__PURE__*/jsx("span", _objectSpread$4(_objectSpread$4({
2048
- className: "VdtTimelineRow-labelText" // eslint-disable-next-line react/jsx-props-no-spreading
2049
-
1098
+ className: "VdtTimelineRow-labelText"
2050
1099
  }, LabelTextProps), {}, {
2051
1100
  children: label
2052
1101
  }))
@@ -2054,21 +1103,22 @@ function TimelineRow(_ref) {
2054
1103
  }));
2055
1104
  }
2056
1105
  TimelineRow.propTypes = {
2057
- /**
2058
- * @ignore
2059
- */
2060
- className: PropTypes.string,
2061
1106
  children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
2062
1107
  label: PropTypes.node,
2063
1108
  LabelProps: PropTypes.instanceOf(Object),
2064
- LabelTextProps: PropTypes.instanceOf(Object)
1109
+ LabelTextProps: PropTypes.instanceOf(Object),
1110
+
1111
+ /**
1112
+ * Override styles with className
1113
+ */
1114
+ className: PropTypes.string
2065
1115
  };
2066
1116
  TimelineRow.defaultProps = {
2067
- className: undefined,
2068
1117
  children: undefined,
2069
1118
  label: undefined,
2070
1119
  LabelProps: {},
2071
- LabelTextProps: {}
1120
+ LabelTextProps: {},
1121
+ className: undefined
2072
1122
  };
2073
1123
 
2074
1124
  var css$2 = "\n.VdtTimelinePlayheadTrack-root {\n height: 40px;\n position: relative;\n}";
@@ -2128,28 +1178,22 @@ function TimelineTick(_ref) {
2128
1178
  return null;
2129
1179
  }
2130
1180
 
2131
- return (
2132
- /*#__PURE__*/
2133
- // eslint-disable-next-line react/jsx-props-no-spreading
2134
- jsxs(Group, _objectSpread$3(_objectSpread$3({}, TickGroupProps), {}, {
2135
- children: [/*#__PURE__*/jsx(Text, _objectSpread$3({
2136
- ref: textRef,
2137
- x: textX,
2138
- y: y - tickSize - 20,
2139
- fontFamily: "Helvetica",
2140
- text: label,
2141
- fontStyle: "bold",
2142
- fontSize: 10,
2143
- fill: color // eslint-disable-next-line react/jsx-props-no-spreading
2144
-
2145
- }, TickTextProps)), /*#__PURE__*/jsx(Line, _objectSpread$3({
2146
- points: [x, y - tickSize, x, y],
2147
- stroke: color,
2148
- strokeWidth: tickWidth // eslint-disable-next-line react/jsx-props-no-spreading
2149
-
2150
- }, TickLineProps))]
2151
- }))
2152
- );
1181
+ return /*#__PURE__*/jsxs(Group, _objectSpread$3(_objectSpread$3({}, TickGroupProps), {}, {
1182
+ children: [/*#__PURE__*/jsx(Text, _objectSpread$3({
1183
+ ref: textRef,
1184
+ x: textX,
1185
+ y: y - tickSize - 20,
1186
+ fontFamily: "Helvetica",
1187
+ text: label,
1188
+ fontStyle: "bold",
1189
+ fontSize: 10,
1190
+ fill: color
1191
+ }, TickTextProps)), /*#__PURE__*/jsx(Line, _objectSpread$3({
1192
+ points: [x, y - tickSize, x, y],
1193
+ stroke: color,
1194
+ strokeWidth: tickWidth
1195
+ }, TickLineProps))]
1196
+ }));
2153
1197
  }
2154
1198
 
2155
1199
  function defaultTicks(_ref3) {
@@ -2300,8 +1344,7 @@ function TimelinePlayheadTrack(_ref4) {
2300
1344
 
2301
1345
  return /*#__PURE__*/jsxs("div", _objectSpread$3(_objectSpread$3({
2302
1346
  ref: trackContainerRef,
2303
- className: clsx('VdtTimelinePlayheadTrack-root', className) // eslint-disable-next-line react/jsx-props-no-spreading
2304
-
1347
+ className: clsx('VdtTimelinePlayheadTrack-root', className)
2305
1348
  }, props), {}, {
2306
1349
  children: [Children.map(children, function (child) {
2307
1350
  return /*#__PURE__*/cloneElement(child, {
@@ -2312,11 +1355,9 @@ function TimelinePlayheadTrack(_ref4) {
2312
1355
  });
2313
1356
  }), /*#__PURE__*/jsx(Stage, _objectSpread$3(_objectSpread$3({
2314
1357
  height: height,
2315
- width: width // eslint-disable-next-line react/jsx-props-no-spreading
2316
-
1358
+ width: width
2317
1359
  }, StageProps), {}, {
2318
- children: /*#__PURE__*/jsx(Layer // eslint-disable-next-line react/jsx-props-no-spreading
2319
- , _objectSpread$3(_objectSpread$3({}, LayerProps), {}, {
1360
+ children: /*#__PURE__*/jsx(Layer, _objectSpread$3(_objectSpread$3({}, LayerProps), {}, {
2320
1361
  children: /*#__PURE__*/jsxs(Group, _objectSpread$3(_objectSpread$3(_objectSpread$3({
2321
1362
  onClick: function onClick(e) {
2322
1363
  if (trackRectRef.current && handleClick) {
@@ -2359,16 +1400,14 @@ function TimelinePlayheadTrack(_ref4) {
2359
1400
  var newEnd = clampedNewStart + perspectiveDuration;
2360
1401
  handleDrag(e, clampedNewStart, newEnd);
2361
1402
  }
2362
- } // eslint-disable-next-line react/jsx-props-no-spreading
2363
-
1403
+ }
2364
1404
  }, hoverProps), GroupProps), {}, {
2365
1405
  children: [/*#__PURE__*/jsx(Rect, _objectSpread$3({
2366
1406
  ref: trackRectRef,
2367
1407
  x: 0,
2368
1408
  y: 0,
2369
1409
  width: width,
2370
- height: height // eslint-disable-next-line react/jsx-props-no-spreading
2371
-
1410
+ height: height
2372
1411
  }, RectProps)), ticks.map(function (_ref7) {
2373
1412
  var x = _ref7.x,
2374
1413
  label = _ref7.label,
@@ -2390,10 +1429,6 @@ function TimelinePlayheadTrack(_ref4) {
2390
1429
  }));
2391
1430
  }
2392
1431
  TimelinePlayheadTrack.propTypes = {
2393
- /**
2394
- * @ignore
2395
- */
2396
- className: PropTypes.string,
2397
1432
  onClick: PropTypes.func,
2398
1433
  onHover: PropTypes.func,
2399
1434
  ticks: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.shape({
@@ -2418,10 +1453,14 @@ TimelinePlayheadTrack.propTypes = {
2418
1453
  RectProps: PropTypes.instanceOf(Object),
2419
1454
  TickGroupProps: PropTypes.instanceOf(Object),
2420
1455
  TickTextProps: PropTypes.instanceOf(Object),
2421
- TickLineProps: PropTypes.instanceOf(Object)
1456
+ TickLineProps: PropTypes.instanceOf(Object),
1457
+
1458
+ /**
1459
+ * Override styles with className
1460
+ */
1461
+ className: PropTypes.string
2422
1462
  };
2423
1463
  TimelinePlayheadTrack.defaultProps = {
2424
- className: undefined,
2425
1464
  onClick: undefined,
2426
1465
  onHover: undefined,
2427
1466
  ticks: defaultTicks,
@@ -2438,7 +1477,8 @@ TimelinePlayheadTrack.defaultProps = {
2438
1477
  RectProps: {},
2439
1478
  TickGroupProps: {},
2440
1479
  TickTextProps: {},
2441
- TickLineProps: {}
1480
+ TickLineProps: {},
1481
+ className: undefined
2442
1482
  };
2443
1483
 
2444
1484
  var _excluded$2 = ["index"];
@@ -2581,8 +1621,7 @@ function TimelineScroll(_ref) {
2581
1621
  display: !isZoomed && 'none',
2582
1622
  zIndex: DEFAULT_PLAYHEAD_ZINDEX + 1
2583
1623
  }, style),
2584
- ref: ref // eslint-disable-next-line react/jsx-props-no-spreading
2585
-
1624
+ ref: ref
2586
1625
  }, props), {}, {
2587
1626
  children: /*#__PURE__*/jsx(Stage, _objectSpread$1(_objectSpread$1({
2588
1627
  height: height,
@@ -2604,11 +1643,9 @@ function TimelineScroll(_ref) {
2604
1643
  if (newStart !== undefined && newStart !== perspective.start) {
2605
1644
  handleClick(e, newStart, newStart + perspectiveDuration);
2606
1645
  }
2607
- } // eslint-disable-next-line react/jsx-props-no-spreading
2608
-
1646
+ }
2609
1647
  }, StageProps), {}, {
2610
- children: /*#__PURE__*/jsx(Layer // eslint-disable-next-line react/jsx-props-no-spreading
2611
- , _objectSpread$1(_objectSpread$1({}, LayerProps), {}, {
1648
+ children: /*#__PURE__*/jsx(Layer, _objectSpread$1(_objectSpread$1({}, LayerProps), {}, {
2612
1649
  children: /*#__PURE__*/jsx(Rect, _objectSpread$1({
2613
1650
  x: scrollLeft,
2614
1651
  y: 0,
@@ -2631,18 +1668,13 @@ function TimelineScroll(_ref) {
2631
1668
  e.target.x(scrollLeft);
2632
1669
  var newStart = Math.floor(interpolate(start, end, 0, scrollTrackWidth, x));
2633
1670
  handleScroll(e, newStart, newStart + perspectiveDuration);
2634
- } // eslint-disable-next-line react/jsx-props-no-spreading
2635
-
1671
+ }
2636
1672
  }, RectProps))
2637
1673
  }))
2638
1674
  }))
2639
1675
  }));
2640
1676
  }
2641
1677
  TimelineScroll.propTypes = {
2642
- /**
2643
- * @ignore
2644
- */
2645
- className: PropTypes.string,
2646
1678
  onScroll: PropTypes.func,
2647
1679
  onClick: PropTypes.func,
2648
1680
  start: PropTypes.number,
@@ -2654,10 +1686,14 @@ TimelineScroll.propTypes = {
2654
1686
  style: PropTypes.instanceOf(Object),
2655
1687
  StageProps: PropTypes.instanceOf(Object),
2656
1688
  LayerProps: PropTypes.instanceOf(Object),
2657
- RectProps: PropTypes.instanceOf(Object)
1689
+ RectProps: PropTypes.instanceOf(Object),
1690
+
1691
+ /**
1692
+ * Override styles with className
1693
+ */
1694
+ className: PropTypes.string
2658
1695
  };
2659
1696
  TimelineScroll.defaultProps = {
2660
- className: undefined,
2661
1697
  onScroll: undefined,
2662
1698
  onClick: undefined,
2663
1699
  start: undefined,
@@ -2666,7 +1702,8 @@ TimelineScroll.defaultProps = {
2666
1702
  style: {},
2667
1703
  StageProps: {},
2668
1704
  LayerProps: {},
2669
- RectProps: {}
1705
+ RectProps: {},
1706
+ className: undefined
2670
1707
  };
2671
1708
 
2672
1709
  var css = "\n\n.VdtTimelineScrollContainer-timelineRow > :not(.VdtTimelineRow-label) {\n /* margin messes with the playhead line alignment */\n margin: 0;\n}";
@@ -2719,34 +1756,32 @@ function TimelineScrollContainer(_ref2) {
2719
1756
  setPerspective(newPerspectiveStart, newPerspectiveEnd);
2720
1757
  }
2721
1758
  }
2722
- } // eslint-disable-next-line react/jsx-props-no-spreading
2723
-
1759
+ }
2724
1760
  }, props), {}, {
2725
1761
  children: [children, /*#__PURE__*/jsx(TimelineRow, _objectSpread(_objectSpread({
2726
- className: clsx('VdtTimelineScrollContainer-timelineRow') // eslint-disable-next-line react/jsx-props-no-spreading
2727
-
1762
+ className: clsx('VdtTimelineScrollContainer-timelineRow')
2728
1763
  }, RowProps), {}, {
2729
- children: /*#__PURE__*/jsx(TimelineScroll // eslint-disable-next-line react/jsx-props-no-spreading
2730
- , _objectSpread({}, ScrollProps))
1764
+ children: /*#__PURE__*/jsx(TimelineScroll, _objectSpread({}, ScrollProps))
2731
1765
  }))]
2732
1766
  }));
2733
1767
  }
2734
1768
  TimelineScrollContainer.propTypes = {
2735
- /**
2736
- * @ignore
2737
- */
2738
1769
  className: PropTypes.string,
2739
1770
  children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
2740
1771
  getScrollDistance: PropTypes.func,
2741
1772
  RowProps: PropTypes.instanceOf(Object),
2742
1773
  ScrollProps: PropTypes.instanceOf(Object)
1774
+ /**
1775
+ * Override styles with className
1776
+ */
1777
+
2743
1778
  };
2744
1779
  TimelineScrollContainer.defaultProps = {
2745
- className: undefined,
2746
1780
  children: undefined,
2747
1781
  getScrollDistance: defaultGetScrollDistance,
2748
1782
  RowProps: {},
2749
- ScrollProps: {}
1783
+ ScrollProps: {},
1784
+ className: undefined
2750
1785
  };
2751
1786
 
2752
- export { Timeline, TimelineContext, TimelinePlayhead, TimelinePlayheadTrack, TimelineProvider, TimelineRow, TimelineScroll, TimelineScrollContainer, TimelineTrack, TimelineWaveform, getStackOverlappingEventProps, useTimeline };
1787
+ export { Timeline, TimelineContext, TimelineEvent, TimelinePlayhead, TimelinePlayheadTrack, TimelineProvider, TimelineRow, TimelineScroll, TimelineScrollContainer, TimelineTrack, TimelineWaveform, getStackOverlappingEventProps, useTimeline };