@vidispine/vdt-react-timeline 22.3.0 → 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 +217 -1426
  2. package/package.json +31 -30
package/dist/index.es.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
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
8
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -9,1190 +11,6 @@ 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 r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
13
-
14
- var propTypes = {exports: {}};
15
-
16
- var reactIs = {exports: {}};
17
-
18
- var reactIs_production_min = {};
19
-
20
- /** @license React v16.13.1
21
- * react-is.production.min.js
22
- *
23
- * Copyright (c) Facebook, Inc. and its affiliates.
24
- *
25
- * This source code is licensed under the MIT license found in the
26
- * LICENSE file in the root directory of this source tree.
27
- */
28
-
29
- var hasRequiredReactIs_production_min;
30
-
31
- function requireReactIs_production_min () {
32
- if (hasRequiredReactIs_production_min) return reactIs_production_min;
33
- hasRequiredReactIs_production_min = 1;
34
- var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=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=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
35
- Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=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;
36
- 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:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t: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;reactIs_production_min.Fragment=e;reactIs_production_min.Lazy=t;reactIs_production_min.Memo=r;reactIs_production_min.Portal=d;
37
- 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};reactIs_production_min.isFragment=function(a){return z(a)===e};reactIs_production_min.isLazy=function(a){return z(a)===t};
38
- 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};
39
- reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min.typeOf=z;
40
- return reactIs_production_min;
41
- }
42
-
43
- var reactIs_development = {};
44
-
45
- /** @license React v16.13.1
46
- * react-is.development.js
47
- *
48
- * Copyright (c) Facebook, Inc. and its affiliates.
49
- *
50
- * This source code is licensed under the MIT license found in the
51
- * LICENSE file in the root directory of this source tree.
52
- */
53
-
54
- var hasRequiredReactIs_development;
55
-
56
- function requireReactIs_development () {
57
- if (hasRequiredReactIs_development) return reactIs_development;
58
- hasRequiredReactIs_development = 1;
59
-
60
-
61
-
62
- if (process.env.NODE_ENV !== "production") {
63
- (function() {
64
-
65
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
66
- // nor polyfill, then a plain number is used for performance.
67
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
68
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
69
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
70
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
71
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
72
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
73
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
74
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
75
- // (unstable) APIs that have been removed. Can we remove the symbols?
76
-
77
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
78
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
79
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
80
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
81
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
82
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
83
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
84
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
85
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
86
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
87
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
88
-
89
- function isValidElementType(type) {
90
- return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
91
- 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);
92
- }
93
-
94
- function typeOf(object) {
95
- if (typeof object === 'object' && object !== null) {
96
- var $$typeof = object.$$typeof;
97
-
98
- switch ($$typeof) {
99
- case REACT_ELEMENT_TYPE:
100
- var type = object.type;
101
-
102
- switch (type) {
103
- case REACT_ASYNC_MODE_TYPE:
104
- case REACT_CONCURRENT_MODE_TYPE:
105
- case REACT_FRAGMENT_TYPE:
106
- case REACT_PROFILER_TYPE:
107
- case REACT_STRICT_MODE_TYPE:
108
- case REACT_SUSPENSE_TYPE:
109
- return type;
110
-
111
- default:
112
- var $$typeofType = type && type.$$typeof;
113
-
114
- switch ($$typeofType) {
115
- case REACT_CONTEXT_TYPE:
116
- case REACT_FORWARD_REF_TYPE:
117
- case REACT_LAZY_TYPE:
118
- case REACT_MEMO_TYPE:
119
- case REACT_PROVIDER_TYPE:
120
- return $$typeofType;
121
-
122
- default:
123
- return $$typeof;
124
- }
125
-
126
- }
127
-
128
- case REACT_PORTAL_TYPE:
129
- return $$typeof;
130
- }
131
- }
132
-
133
- return undefined;
134
- } // AsyncMode is deprecated along with isAsyncMode
135
-
136
- var AsyncMode = REACT_ASYNC_MODE_TYPE;
137
- var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
138
- var ContextConsumer = REACT_CONTEXT_TYPE;
139
- var ContextProvider = REACT_PROVIDER_TYPE;
140
- var Element = REACT_ELEMENT_TYPE;
141
- var ForwardRef = REACT_FORWARD_REF_TYPE;
142
- var Fragment = REACT_FRAGMENT_TYPE;
143
- var Lazy = REACT_LAZY_TYPE;
144
- var Memo = REACT_MEMO_TYPE;
145
- var Portal = REACT_PORTAL_TYPE;
146
- var Profiler = REACT_PROFILER_TYPE;
147
- var StrictMode = REACT_STRICT_MODE_TYPE;
148
- var Suspense = REACT_SUSPENSE_TYPE;
149
- var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
150
-
151
- function isAsyncMode(object) {
152
- {
153
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
154
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
155
-
156
- 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.');
157
- }
158
- }
159
-
160
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
161
- }
162
- function isConcurrentMode(object) {
163
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
164
- }
165
- function isContextConsumer(object) {
166
- return typeOf(object) === REACT_CONTEXT_TYPE;
167
- }
168
- function isContextProvider(object) {
169
- return typeOf(object) === REACT_PROVIDER_TYPE;
170
- }
171
- function isElement(object) {
172
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
173
- }
174
- function isForwardRef(object) {
175
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
176
- }
177
- function isFragment(object) {
178
- return typeOf(object) === REACT_FRAGMENT_TYPE;
179
- }
180
- function isLazy(object) {
181
- return typeOf(object) === REACT_LAZY_TYPE;
182
- }
183
- function isMemo(object) {
184
- return typeOf(object) === REACT_MEMO_TYPE;
185
- }
186
- function isPortal(object) {
187
- return typeOf(object) === REACT_PORTAL_TYPE;
188
- }
189
- function isProfiler(object) {
190
- return typeOf(object) === REACT_PROFILER_TYPE;
191
- }
192
- function isStrictMode(object) {
193
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
194
- }
195
- function isSuspense(object) {
196
- return typeOf(object) === REACT_SUSPENSE_TYPE;
197
- }
198
-
199
- reactIs_development.AsyncMode = AsyncMode;
200
- reactIs_development.ConcurrentMode = ConcurrentMode;
201
- reactIs_development.ContextConsumer = ContextConsumer;
202
- reactIs_development.ContextProvider = ContextProvider;
203
- reactIs_development.Element = Element;
204
- reactIs_development.ForwardRef = ForwardRef;
205
- reactIs_development.Fragment = Fragment;
206
- reactIs_development.Lazy = Lazy;
207
- reactIs_development.Memo = Memo;
208
- reactIs_development.Portal = Portal;
209
- reactIs_development.Profiler = Profiler;
210
- reactIs_development.StrictMode = StrictMode;
211
- reactIs_development.Suspense = Suspense;
212
- reactIs_development.isAsyncMode = isAsyncMode;
213
- reactIs_development.isConcurrentMode = isConcurrentMode;
214
- reactIs_development.isContextConsumer = isContextConsumer;
215
- reactIs_development.isContextProvider = isContextProvider;
216
- reactIs_development.isElement = isElement;
217
- reactIs_development.isForwardRef = isForwardRef;
218
- reactIs_development.isFragment = isFragment;
219
- reactIs_development.isLazy = isLazy;
220
- reactIs_development.isMemo = isMemo;
221
- reactIs_development.isPortal = isPortal;
222
- reactIs_development.isProfiler = isProfiler;
223
- reactIs_development.isStrictMode = isStrictMode;
224
- reactIs_development.isSuspense = isSuspense;
225
- reactIs_development.isValidElementType = isValidElementType;
226
- reactIs_development.typeOf = typeOf;
227
- })();
228
- }
229
- return reactIs_development;
230
- }
231
-
232
- var hasRequiredReactIs;
233
-
234
- function requireReactIs () {
235
- if (hasRequiredReactIs) return reactIs.exports;
236
- hasRequiredReactIs = 1;
237
- (function (module) {
238
-
239
- if (process.env.NODE_ENV === 'production') {
240
- module.exports = requireReactIs_production_min();
241
- } else {
242
- module.exports = requireReactIs_development();
243
- }
244
- } (reactIs));
245
- return reactIs.exports;
246
- }
247
-
248
- /*
249
- object-assign
250
- (c) Sindre Sorhus
251
- @license MIT
252
- */
253
-
254
- var objectAssign;
255
- var hasRequiredObjectAssign;
256
-
257
- function requireObjectAssign () {
258
- if (hasRequiredObjectAssign) return objectAssign;
259
- hasRequiredObjectAssign = 1;
260
- /* eslint-disable no-unused-vars */
261
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
262
- var hasOwnProperty = Object.prototype.hasOwnProperty;
263
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
264
-
265
- function toObject(val) {
266
- if (val === null || val === undefined) {
267
- throw new TypeError('Object.assign cannot be called with null or undefined');
268
- }
269
-
270
- return Object(val);
271
- }
272
-
273
- function shouldUseNative() {
274
- try {
275
- if (!Object.assign) {
276
- return false;
277
- }
278
-
279
- // Detect buggy property enumeration order in older V8 versions.
280
-
281
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
282
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
283
- test1[5] = 'de';
284
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
285
- return false;
286
- }
287
-
288
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
289
- var test2 = {};
290
- for (var i = 0; i < 10; i++) {
291
- test2['_' + String.fromCharCode(i)] = i;
292
- }
293
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
294
- return test2[n];
295
- });
296
- if (order2.join('') !== '0123456789') {
297
- return false;
298
- }
299
-
300
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
301
- var test3 = {};
302
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
303
- test3[letter] = letter;
304
- });
305
- if (Object.keys(Object.assign({}, test3)).join('') !==
306
- 'abcdefghijklmnopqrst') {
307
- return false;
308
- }
309
-
310
- return true;
311
- } catch (err) {
312
- // We don't expect any of the above to throw, but better to be safe.
313
- return false;
314
- }
315
- }
316
-
317
- objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
318
- var from;
319
- var to = toObject(target);
320
- var symbols;
321
-
322
- for (var s = 1; s < arguments.length; s++) {
323
- from = Object(arguments[s]);
324
-
325
- for (var key in from) {
326
- if (hasOwnProperty.call(from, key)) {
327
- to[key] = from[key];
328
- }
329
- }
330
-
331
- if (getOwnPropertySymbols) {
332
- symbols = getOwnPropertySymbols(from);
333
- for (var i = 0; i < symbols.length; i++) {
334
- if (propIsEnumerable.call(from, symbols[i])) {
335
- to[symbols[i]] = from[symbols[i]];
336
- }
337
- }
338
- }
339
- }
340
-
341
- return to;
342
- };
343
- return objectAssign;
344
- }
345
-
346
- /**
347
- * Copyright (c) 2013-present, Facebook, Inc.
348
- *
349
- * This source code is licensed under the MIT license found in the
350
- * LICENSE file in the root directory of this source tree.
351
- */
352
-
353
- var ReactPropTypesSecret_1;
354
- var hasRequiredReactPropTypesSecret;
355
-
356
- function requireReactPropTypesSecret () {
357
- if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
358
- hasRequiredReactPropTypesSecret = 1;
359
-
360
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
361
-
362
- ReactPropTypesSecret_1 = ReactPropTypesSecret;
363
- return ReactPropTypesSecret_1;
364
- }
365
-
366
- var has;
367
- var hasRequiredHas;
368
-
369
- function requireHas () {
370
- if (hasRequiredHas) return has;
371
- hasRequiredHas = 1;
372
- has = Function.call.bind(Object.prototype.hasOwnProperty);
373
- return has;
374
- }
375
-
376
- /**
377
- * Copyright (c) 2013-present, Facebook, Inc.
378
- *
379
- * This source code is licensed under the MIT license found in the
380
- * LICENSE file in the root directory of this source tree.
381
- */
382
-
383
- var checkPropTypes_1;
384
- var hasRequiredCheckPropTypes;
385
-
386
- function requireCheckPropTypes () {
387
- if (hasRequiredCheckPropTypes) return checkPropTypes_1;
388
- hasRequiredCheckPropTypes = 1;
389
-
390
- var printWarning = function() {};
391
-
392
- if (process.env.NODE_ENV !== 'production') {
393
- var ReactPropTypesSecret = requireReactPropTypesSecret();
394
- var loggedTypeFailures = {};
395
- var has = requireHas();
396
-
397
- printWarning = function(text) {
398
- var message = 'Warning: ' + text;
399
- if (typeof console !== 'undefined') {
400
- console.error(message);
401
- }
402
- try {
403
- // --- Welcome to debugging React ---
404
- // This error was thrown as a convenience so that you can use this stack
405
- // to find the callsite that caused this warning to fire.
406
- throw new Error(message);
407
- } catch (x) { /**/ }
408
- };
409
- }
410
-
411
- /**
412
- * Assert that the values match with the type specs.
413
- * Error messages are memorized and will only be shown once.
414
- *
415
- * @param {object} typeSpecs Map of name to a ReactPropType
416
- * @param {object} values Runtime values that need to be type-checked
417
- * @param {string} location e.g. "prop", "context", "child context"
418
- * @param {string} componentName Name of the component for error messages.
419
- * @param {?Function} getStack Returns the component stack.
420
- * @private
421
- */
422
- function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
423
- if (process.env.NODE_ENV !== 'production') {
424
- for (var typeSpecName in typeSpecs) {
425
- if (has(typeSpecs, typeSpecName)) {
426
- var error;
427
- // Prop type validation may throw. In case they do, we don't want to
428
- // fail the render phase where it didn't fail before. So we log it.
429
- // After these have been cleaned up, we'll let them throw.
430
- try {
431
- // This is intentionally an invariant that gets caught. It's the same
432
- // behavior as without this statement except with a better message.
433
- if (typeof typeSpecs[typeSpecName] !== 'function') {
434
- var err = Error(
435
- (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
436
- 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
437
- 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
438
- );
439
- err.name = 'Invariant Violation';
440
- throw err;
441
- }
442
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
443
- } catch (ex) {
444
- error = ex;
445
- }
446
- if (error && !(error instanceof Error)) {
447
- printWarning(
448
- (componentName || 'React class') + ': type specification of ' +
449
- location + ' `' + typeSpecName + '` is invalid; the type checker ' +
450
- 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
451
- 'You may have forgotten to pass an argument to the type checker ' +
452
- 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
453
- 'shape all require an argument).'
454
- );
455
- }
456
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
457
- // Only monitor this failure once because there tends to be a lot of the
458
- // same error.
459
- loggedTypeFailures[error.message] = true;
460
-
461
- var stack = getStack ? getStack() : '';
462
-
463
- printWarning(
464
- 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
465
- );
466
- }
467
- }
468
- }
469
- }
470
- }
471
-
472
- /**
473
- * Resets warning cache when testing.
474
- *
475
- * @private
476
- */
477
- checkPropTypes.resetWarningCache = function() {
478
- if (process.env.NODE_ENV !== 'production') {
479
- loggedTypeFailures = {};
480
- }
481
- };
482
-
483
- checkPropTypes_1 = checkPropTypes;
484
- return checkPropTypes_1;
485
- }
486
-
487
- /**
488
- * Copyright (c) 2013-present, Facebook, Inc.
489
- *
490
- * This source code is licensed under the MIT license found in the
491
- * LICENSE file in the root directory of this source tree.
492
- */
493
-
494
- var factoryWithTypeCheckers;
495
- var hasRequiredFactoryWithTypeCheckers;
496
-
497
- function requireFactoryWithTypeCheckers () {
498
- if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
499
- hasRequiredFactoryWithTypeCheckers = 1;
500
-
501
- var ReactIs = requireReactIs();
502
- var assign = requireObjectAssign();
503
-
504
- var ReactPropTypesSecret = requireReactPropTypesSecret();
505
- var has = requireHas();
506
- var checkPropTypes = requireCheckPropTypes();
507
-
508
- var printWarning = function() {};
509
-
510
- if (process.env.NODE_ENV !== 'production') {
511
- printWarning = function(text) {
512
- var message = 'Warning: ' + text;
513
- if (typeof console !== 'undefined') {
514
- console.error(message);
515
- }
516
- try {
517
- // --- Welcome to debugging React ---
518
- // This error was thrown as a convenience so that you can use this stack
519
- // to find the callsite that caused this warning to fire.
520
- throw new Error(message);
521
- } catch (x) {}
522
- };
523
- }
524
-
525
- function emptyFunctionThatReturnsNull() {
526
- return null;
527
- }
528
-
529
- factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
530
- /* global Symbol */
531
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
532
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
533
-
534
- /**
535
- * Returns the iterator method function contained on the iterable object.
536
- *
537
- * Be sure to invoke the function with the iterable as context:
538
- *
539
- * var iteratorFn = getIteratorFn(myIterable);
540
- * if (iteratorFn) {
541
- * var iterator = iteratorFn.call(myIterable);
542
- * ...
543
- * }
544
- *
545
- * @param {?object} maybeIterable
546
- * @return {?function}
547
- */
548
- function getIteratorFn(maybeIterable) {
549
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
550
- if (typeof iteratorFn === 'function') {
551
- return iteratorFn;
552
- }
553
- }
554
-
555
- /**
556
- * Collection of methods that allow declaration and validation of props that are
557
- * supplied to React components. Example usage:
558
- *
559
- * var Props = require('ReactPropTypes');
560
- * var MyArticle = React.createClass({
561
- * propTypes: {
562
- * // An optional string prop named "description".
563
- * description: Props.string,
564
- *
565
- * // A required enum prop named "category".
566
- * category: Props.oneOf(['News','Photos']).isRequired,
567
- *
568
- * // A prop named "dialog" that requires an instance of Dialog.
569
- * dialog: Props.instanceOf(Dialog).isRequired
570
- * },
571
- * render: function() { ... }
572
- * });
573
- *
574
- * A more formal specification of how these methods are used:
575
- *
576
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
577
- * decl := ReactPropTypes.{type}(.isRequired)?
578
- *
579
- * Each and every declaration produces a function with the same signature. This
580
- * allows the creation of custom validation functions. For example:
581
- *
582
- * var MyLink = React.createClass({
583
- * propTypes: {
584
- * // An optional string or URI prop named "href".
585
- * href: function(props, propName, componentName) {
586
- * var propValue = props[propName];
587
- * if (propValue != null && typeof propValue !== 'string' &&
588
- * !(propValue instanceof URI)) {
589
- * return new Error(
590
- * 'Expected a string or an URI for ' + propName + ' in ' +
591
- * componentName
592
- * );
593
- * }
594
- * }
595
- * },
596
- * render: function() {...}
597
- * });
598
- *
599
- * @internal
600
- */
601
-
602
- var ANONYMOUS = '<<anonymous>>';
603
-
604
- // Important!
605
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
606
- var ReactPropTypes = {
607
- array: createPrimitiveTypeChecker('array'),
608
- bigint: createPrimitiveTypeChecker('bigint'),
609
- bool: createPrimitiveTypeChecker('boolean'),
610
- func: createPrimitiveTypeChecker('function'),
611
- number: createPrimitiveTypeChecker('number'),
612
- object: createPrimitiveTypeChecker('object'),
613
- string: createPrimitiveTypeChecker('string'),
614
- symbol: createPrimitiveTypeChecker('symbol'),
615
-
616
- any: createAnyTypeChecker(),
617
- arrayOf: createArrayOfTypeChecker,
618
- element: createElementTypeChecker(),
619
- elementType: createElementTypeTypeChecker(),
620
- instanceOf: createInstanceTypeChecker,
621
- node: createNodeChecker(),
622
- objectOf: createObjectOfTypeChecker,
623
- oneOf: createEnumTypeChecker,
624
- oneOfType: createUnionTypeChecker,
625
- shape: createShapeTypeChecker,
626
- exact: createStrictShapeTypeChecker,
627
- };
628
-
629
- /**
630
- * inlined Object.is polyfill to avoid requiring consumers ship their own
631
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
632
- */
633
- /*eslint-disable no-self-compare*/
634
- function is(x, y) {
635
- // SameValue algorithm
636
- if (x === y) {
637
- // Steps 1-5, 7-10
638
- // Steps 6.b-6.e: +0 != -0
639
- return x !== 0 || 1 / x === 1 / y;
640
- } else {
641
- // Step 6.a: NaN == NaN
642
- return x !== x && y !== y;
643
- }
644
- }
645
- /*eslint-enable no-self-compare*/
646
-
647
- /**
648
- * We use an Error-like object for backward compatibility as people may call
649
- * PropTypes directly and inspect their output. However, we don't use real
650
- * Errors anymore. We don't inspect their stack anyway, and creating them
651
- * is prohibitively expensive if they are created too often, such as what
652
- * happens in oneOfType() for any type before the one that matched.
653
- */
654
- function PropTypeError(message, data) {
655
- this.message = message;
656
- this.data = data && typeof data === 'object' ? data: {};
657
- this.stack = '';
658
- }
659
- // Make `instanceof Error` still work for returned errors.
660
- PropTypeError.prototype = Error.prototype;
661
-
662
- function createChainableTypeChecker(validate) {
663
- if (process.env.NODE_ENV !== 'production') {
664
- var manualPropTypeCallCache = {};
665
- var manualPropTypeWarningCount = 0;
666
- }
667
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
668
- componentName = componentName || ANONYMOUS;
669
- propFullName = propFullName || propName;
670
-
671
- if (secret !== ReactPropTypesSecret) {
672
- if (throwOnDirectAccess) {
673
- // New behavior only for users of `prop-types` package
674
- var err = new Error(
675
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
676
- 'Use `PropTypes.checkPropTypes()` to call them. ' +
677
- 'Read more at http://fb.me/use-check-prop-types'
678
- );
679
- err.name = 'Invariant Violation';
680
- throw err;
681
- } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
682
- // Old behavior for people using React.PropTypes
683
- var cacheKey = componentName + ':' + propName;
684
- if (
685
- !manualPropTypeCallCache[cacheKey] &&
686
- // Avoid spamming the console because they are often not actionable except for lib authors
687
- manualPropTypeWarningCount < 3
688
- ) {
689
- printWarning(
690
- 'You are manually calling a React.PropTypes validation ' +
691
- 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
692
- 'and will throw in the standalone `prop-types` package. ' +
693
- 'You may be seeing this warning due to a third-party PropTypes ' +
694
- 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
695
- );
696
- manualPropTypeCallCache[cacheKey] = true;
697
- manualPropTypeWarningCount++;
698
- }
699
- }
700
- }
701
- if (props[propName] == null) {
702
- if (isRequired) {
703
- if (props[propName] === null) {
704
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
705
- }
706
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
707
- }
708
- return null;
709
- } else {
710
- return validate(props, propName, componentName, location, propFullName);
711
- }
712
- }
713
-
714
- var chainedCheckType = checkType.bind(null, false);
715
- chainedCheckType.isRequired = checkType.bind(null, true);
716
-
717
- return chainedCheckType;
718
- }
719
-
720
- function createPrimitiveTypeChecker(expectedType) {
721
- function validate(props, propName, componentName, location, propFullName, secret) {
722
- var propValue = props[propName];
723
- var propType = getPropType(propValue);
724
- if (propType !== expectedType) {
725
- // `propValue` being instance of, say, date/regexp, pass the 'object'
726
- // check, but we can offer a more precise error message here rather than
727
- // 'of type `object`'.
728
- var preciseType = getPreciseType(propValue);
729
-
730
- return new PropTypeError(
731
- 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
732
- {expectedType: expectedType}
733
- );
734
- }
735
- return null;
736
- }
737
- return createChainableTypeChecker(validate);
738
- }
739
-
740
- function createAnyTypeChecker() {
741
- return createChainableTypeChecker(emptyFunctionThatReturnsNull);
742
- }
743
-
744
- function createArrayOfTypeChecker(typeChecker) {
745
- function validate(props, propName, componentName, location, propFullName) {
746
- if (typeof typeChecker !== 'function') {
747
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
748
- }
749
- var propValue = props[propName];
750
- if (!Array.isArray(propValue)) {
751
- var propType = getPropType(propValue);
752
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
753
- }
754
- for (var i = 0; i < propValue.length; i++) {
755
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
756
- if (error instanceof Error) {
757
- return error;
758
- }
759
- }
760
- return null;
761
- }
762
- return createChainableTypeChecker(validate);
763
- }
764
-
765
- function createElementTypeChecker() {
766
- function validate(props, propName, componentName, location, propFullName) {
767
- var propValue = props[propName];
768
- if (!isValidElement(propValue)) {
769
- var propType = getPropType(propValue);
770
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
771
- }
772
- return null;
773
- }
774
- return createChainableTypeChecker(validate);
775
- }
776
-
777
- function createElementTypeTypeChecker() {
778
- function validate(props, propName, componentName, location, propFullName) {
779
- var propValue = props[propName];
780
- if (!ReactIs.isValidElementType(propValue)) {
781
- var propType = getPropType(propValue);
782
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
783
- }
784
- return null;
785
- }
786
- return createChainableTypeChecker(validate);
787
- }
788
-
789
- function createInstanceTypeChecker(expectedClass) {
790
- function validate(props, propName, componentName, location, propFullName) {
791
- if (!(props[propName] instanceof expectedClass)) {
792
- var expectedClassName = expectedClass.name || ANONYMOUS;
793
- var actualClassName = getClassName(props[propName]);
794
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
795
- }
796
- return null;
797
- }
798
- return createChainableTypeChecker(validate);
799
- }
800
-
801
- function createEnumTypeChecker(expectedValues) {
802
- if (!Array.isArray(expectedValues)) {
803
- if (process.env.NODE_ENV !== 'production') {
804
- if (arguments.length > 1) {
805
- printWarning(
806
- 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
807
- 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
808
- );
809
- } else {
810
- printWarning('Invalid argument supplied to oneOf, expected an array.');
811
- }
812
- }
813
- return emptyFunctionThatReturnsNull;
814
- }
815
-
816
- function validate(props, propName, componentName, location, propFullName) {
817
- var propValue = props[propName];
818
- for (var i = 0; i < expectedValues.length; i++) {
819
- if (is(propValue, expectedValues[i])) {
820
- return null;
821
- }
822
- }
823
-
824
- var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
825
- var type = getPreciseType(value);
826
- if (type === 'symbol') {
827
- return String(value);
828
- }
829
- return value;
830
- });
831
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
832
- }
833
- return createChainableTypeChecker(validate);
834
- }
835
-
836
- function createObjectOfTypeChecker(typeChecker) {
837
- function validate(props, propName, componentName, location, propFullName) {
838
- if (typeof typeChecker !== 'function') {
839
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
840
- }
841
- var propValue = props[propName];
842
- var propType = getPropType(propValue);
843
- if (propType !== 'object') {
844
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
845
- }
846
- for (var key in propValue) {
847
- if (has(propValue, key)) {
848
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
849
- if (error instanceof Error) {
850
- return error;
851
- }
852
- }
853
- }
854
- return null;
855
- }
856
- return createChainableTypeChecker(validate);
857
- }
858
-
859
- function createUnionTypeChecker(arrayOfTypeCheckers) {
860
- if (!Array.isArray(arrayOfTypeCheckers)) {
861
- process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
862
- return emptyFunctionThatReturnsNull;
863
- }
864
-
865
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
866
- var checker = arrayOfTypeCheckers[i];
867
- if (typeof checker !== 'function') {
868
- printWarning(
869
- 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
870
- 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
871
- );
872
- return emptyFunctionThatReturnsNull;
873
- }
874
- }
875
-
876
- function validate(props, propName, componentName, location, propFullName) {
877
- var expectedTypes = [];
878
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
879
- var checker = arrayOfTypeCheckers[i];
880
- var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
881
- if (checkerResult == null) {
882
- return null;
883
- }
884
- if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
885
- expectedTypes.push(checkerResult.data.expectedType);
886
- }
887
- }
888
- var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
889
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
890
- }
891
- return createChainableTypeChecker(validate);
892
- }
893
-
894
- function createNodeChecker() {
895
- function validate(props, propName, componentName, location, propFullName) {
896
- if (!isNode(props[propName])) {
897
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
898
- }
899
- return null;
900
- }
901
- return createChainableTypeChecker(validate);
902
- }
903
-
904
- function invalidValidatorError(componentName, location, propFullName, key, type) {
905
- return new PropTypeError(
906
- (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
907
- 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
908
- );
909
- }
910
-
911
- function createShapeTypeChecker(shapeTypes) {
912
- function validate(props, propName, componentName, location, propFullName) {
913
- var propValue = props[propName];
914
- var propType = getPropType(propValue);
915
- if (propType !== 'object') {
916
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
917
- }
918
- for (var key in shapeTypes) {
919
- var checker = shapeTypes[key];
920
- if (typeof checker !== 'function') {
921
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
922
- }
923
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
924
- if (error) {
925
- return error;
926
- }
927
- }
928
- return null;
929
- }
930
- return createChainableTypeChecker(validate);
931
- }
932
-
933
- function createStrictShapeTypeChecker(shapeTypes) {
934
- function validate(props, propName, componentName, location, propFullName) {
935
- var propValue = props[propName];
936
- var propType = getPropType(propValue);
937
- if (propType !== 'object') {
938
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
939
- }
940
- // We need to check all keys in case some are required but missing from props.
941
- var allKeys = assign({}, props[propName], shapeTypes);
942
- for (var key in allKeys) {
943
- var checker = shapeTypes[key];
944
- if (has(shapeTypes, key) && typeof checker !== 'function') {
945
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
946
- }
947
- if (!checker) {
948
- return new PropTypeError(
949
- 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
950
- '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
951
- '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
952
- );
953
- }
954
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
955
- if (error) {
956
- return error;
957
- }
958
- }
959
- return null;
960
- }
961
-
962
- return createChainableTypeChecker(validate);
963
- }
964
-
965
- function isNode(propValue) {
966
- switch (typeof propValue) {
967
- case 'number':
968
- case 'string':
969
- case 'undefined':
970
- return true;
971
- case 'boolean':
972
- return !propValue;
973
- case 'object':
974
- if (Array.isArray(propValue)) {
975
- return propValue.every(isNode);
976
- }
977
- if (propValue === null || isValidElement(propValue)) {
978
- return true;
979
- }
980
-
981
- var iteratorFn = getIteratorFn(propValue);
982
- if (iteratorFn) {
983
- var iterator = iteratorFn.call(propValue);
984
- var step;
985
- if (iteratorFn !== propValue.entries) {
986
- while (!(step = iterator.next()).done) {
987
- if (!isNode(step.value)) {
988
- return false;
989
- }
990
- }
991
- } else {
992
- // Iterator will provide entry [k,v] tuples rather than values.
993
- while (!(step = iterator.next()).done) {
994
- var entry = step.value;
995
- if (entry) {
996
- if (!isNode(entry[1])) {
997
- return false;
998
- }
999
- }
1000
- }
1001
- }
1002
- } else {
1003
- return false;
1004
- }
1005
-
1006
- return true;
1007
- default:
1008
- return false;
1009
- }
1010
- }
1011
-
1012
- function isSymbol(propType, propValue) {
1013
- // Native Symbol.
1014
- if (propType === 'symbol') {
1015
- return true;
1016
- }
1017
-
1018
- // falsy value can't be a Symbol
1019
- if (!propValue) {
1020
- return false;
1021
- }
1022
-
1023
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
1024
- if (propValue['@@toStringTag'] === 'Symbol') {
1025
- return true;
1026
- }
1027
-
1028
- // Fallback for non-spec compliant Symbols which are polyfilled.
1029
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
1030
- return true;
1031
- }
1032
-
1033
- return false;
1034
- }
1035
-
1036
- // Equivalent of `typeof` but with special handling for array and regexp.
1037
- function getPropType(propValue) {
1038
- var propType = typeof propValue;
1039
- if (Array.isArray(propValue)) {
1040
- return 'array';
1041
- }
1042
- if (propValue instanceof RegExp) {
1043
- // Old webkits (at least until Android 4.0) return 'function' rather than
1044
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1045
- // passes PropTypes.object.
1046
- return 'object';
1047
- }
1048
- if (isSymbol(propType, propValue)) {
1049
- return 'symbol';
1050
- }
1051
- return propType;
1052
- }
1053
-
1054
- // This handles more types than `getPropType`. Only used for error messages.
1055
- // See `createPrimitiveTypeChecker`.
1056
- function getPreciseType(propValue) {
1057
- if (typeof propValue === 'undefined' || propValue === null) {
1058
- return '' + propValue;
1059
- }
1060
- var propType = getPropType(propValue);
1061
- if (propType === 'object') {
1062
- if (propValue instanceof Date) {
1063
- return 'date';
1064
- } else if (propValue instanceof RegExp) {
1065
- return 'regexp';
1066
- }
1067
- }
1068
- return propType;
1069
- }
1070
-
1071
- // Returns a string that is postfixed to a warning about an invalid type.
1072
- // For example, "undefined" or "of type array"
1073
- function getPostfixForTypeWarning(value) {
1074
- var type = getPreciseType(value);
1075
- switch (type) {
1076
- case 'array':
1077
- case 'object':
1078
- return 'an ' + type;
1079
- case 'boolean':
1080
- case 'date':
1081
- case 'regexp':
1082
- return 'a ' + type;
1083
- default:
1084
- return type;
1085
- }
1086
- }
1087
-
1088
- // Returns class name of the object, if any.
1089
- function getClassName(propValue) {
1090
- if (!propValue.constructor || !propValue.constructor.name) {
1091
- return ANONYMOUS;
1092
- }
1093
- return propValue.constructor.name;
1094
- }
1095
-
1096
- ReactPropTypes.checkPropTypes = checkPropTypes;
1097
- ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
1098
- ReactPropTypes.PropTypes = ReactPropTypes;
1099
-
1100
- return ReactPropTypes;
1101
- };
1102
- return factoryWithTypeCheckers;
1103
- }
1104
-
1105
- /**
1106
- * Copyright (c) 2013-present, Facebook, Inc.
1107
- *
1108
- * This source code is licensed under the MIT license found in the
1109
- * LICENSE file in the root directory of this source tree.
1110
- */
1111
-
1112
- var factoryWithThrowingShims;
1113
- var hasRequiredFactoryWithThrowingShims;
1114
-
1115
- function requireFactoryWithThrowingShims () {
1116
- if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
1117
- hasRequiredFactoryWithThrowingShims = 1;
1118
-
1119
- var ReactPropTypesSecret = requireReactPropTypesSecret();
1120
-
1121
- function emptyFunction() {}
1122
- function emptyFunctionWithReset() {}
1123
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
1124
-
1125
- factoryWithThrowingShims = function() {
1126
- function shim(props, propName, componentName, location, propFullName, secret) {
1127
- if (secret === ReactPropTypesSecret) {
1128
- // It is still safe when called from React.
1129
- return;
1130
- }
1131
- var err = new Error(
1132
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
1133
- 'Use PropTypes.checkPropTypes() to call them. ' +
1134
- 'Read more at http://fb.me/use-check-prop-types'
1135
- );
1136
- err.name = 'Invariant Violation';
1137
- throw err;
1138
- } shim.isRequired = shim;
1139
- function getShim() {
1140
- return shim;
1141
- } // Important!
1142
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
1143
- var ReactPropTypes = {
1144
- array: shim,
1145
- bigint: shim,
1146
- bool: shim,
1147
- func: shim,
1148
- number: shim,
1149
- object: shim,
1150
- string: shim,
1151
- symbol: shim,
1152
-
1153
- any: shim,
1154
- arrayOf: getShim,
1155
- element: shim,
1156
- elementType: shim,
1157
- instanceOf: getShim,
1158
- node: shim,
1159
- objectOf: getShim,
1160
- oneOf: getShim,
1161
- oneOfType: getShim,
1162
- shape: getShim,
1163
- exact: getShim,
1164
-
1165
- checkPropTypes: emptyFunctionWithReset,
1166
- resetWarningCache: emptyFunction
1167
- };
1168
-
1169
- ReactPropTypes.PropTypes = ReactPropTypes;
1170
-
1171
- return ReactPropTypes;
1172
- };
1173
- return factoryWithThrowingShims;
1174
- }
1175
-
1176
- /**
1177
- * Copyright (c) 2013-present, Facebook, Inc.
1178
- *
1179
- * This source code is licensed under the MIT license found in the
1180
- * LICENSE file in the root directory of this source tree.
1181
- */
1182
-
1183
- if (process.env.NODE_ENV !== 'production') {
1184
- var ReactIs = requireReactIs();
1185
-
1186
- // By explicitly using `prop-types` you are opting into new development behavior.
1187
- // http://fb.me/prop-types-in-prod
1188
- var throwOnDirectAccess = true;
1189
- propTypes.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
1190
- } else {
1191
- // By explicitly using `prop-types` you are opting into new production behavior.
1192
- // http://fb.me/prop-types-in-prod
1193
- propTypes.exports = requireFactoryWithThrowingShims()();
1194
- }
1195
-
1196
14
  var interpolate = function interpolate(y0, y1, x0, x1, x) {
1197
15
  return y0 + (x - x0) * (y1 - y0) / (x1 - x0);
1198
16
  };
@@ -1406,24 +224,24 @@ function useTimeline() {
1406
224
  return useContext(TimelineContext);
1407
225
  }
1408
226
  TimelineContext.propTypes = {
1409
- start: propTypes.exports.number.isRequired,
1410
- end: propTypes.exports.number.isRequired,
1411
- time: propTypes.exports.number,
1412
- children: propTypes.exports.oneOfType([propTypes.exports.arrayOf(propTypes.exports.element), propTypes.exports.element]),
1413
- onChangeTime: propTypes.exports.func,
1414
- timelineRef: propTypes.exports.shape({
1415
- current: propTypes.exports.instanceOf(Element)
227
+ start: PropTypes.number.isRequired,
228
+ end: PropTypes.number.isRequired,
229
+ time: PropTypes.number,
230
+ children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element), PropTypes.element]),
231
+ onChangeTime: PropTypes.func,
232
+ timelineRef: PropTypes.shape({
233
+ current: PropTypes.instanceOf(Element)
1416
234
  }),
1417
- perspective: propTypes.exports.shape({
1418
- start: propTypes.exports.number,
1419
- end: propTypes.exports.number
235
+ perspective: PropTypes.shape({
236
+ start: PropTypes.number,
237
+ end: PropTypes.number
1420
238
  }),
1421
- onChangePerspective: propTypes.exports.func,
1422
- defaultPerspective: propTypes.exports.shape({
1423
- start: propTypes.exports.number,
1424
- end: propTypes.exports.number
239
+ onChangePerspective: PropTypes.func,
240
+ defaultPerspective: PropTypes.shape({
241
+ start: PropTypes.number,
242
+ end: PropTypes.number
1425
243
  }),
1426
- zoomMultiplier: propTypes.exports.oneOfType([propTypes.exports.number, propTypes.exports.func])
244
+ zoomMultiplier: PropTypes.oneOfType([PropTypes.number, PropTypes.func])
1427
245
  };
1428
246
  TimelineContext.defaultProps = {
1429
247
  children: undefined,
@@ -1472,43 +290,43 @@ function Timeline(_ref) {
1472
290
  zoomMultiplier: zoomMultiplier,
1473
291
  children: /*#__PURE__*/jsx("div", _objectSpread$9(_objectSpread$9({
1474
292
  ref: timelineRef,
1475
- className: clsx('VdtTimeline-root', className) // eslint-disable-next-line react/jsx-props-no-spreading
1476
-
293
+ className: clsx('VdtTimeline-root', className)
1477
294
  }, props), {}, {
1478
295
  children: children
1479
296
  }))
1480
297
  });
1481
298
  }
1482
299
  Timeline.propTypes = {
1483
- /**
1484
- * @ignore
1485
- */
1486
- className: propTypes.exports.string,
1487
- start: propTypes.exports.number.isRequired,
1488
- end: propTypes.exports.number.isRequired,
1489
- time: propTypes.exports.number,
1490
- children: propTypes.exports.oneOfType([propTypes.exports.arrayOf(propTypes.exports.node), propTypes.exports.node]),
1491
- onChangeTime: propTypes.exports.func,
1492
- perspective: propTypes.exports.shape({
1493
- start: propTypes.exports.number,
1494
- end: propTypes.exports.number
300
+ start: PropTypes.number.isRequired,
301
+ end: PropTypes.number.isRequired,
302
+ time: PropTypes.number,
303
+ children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
304
+ onChangeTime: PropTypes.func,
305
+ perspective: PropTypes.shape({
306
+ start: PropTypes.number,
307
+ end: PropTypes.number
1495
308
  }),
1496
- onChangePerspective: propTypes.exports.func,
1497
- defaultPerspective: propTypes.exports.shape({
1498
- start: propTypes.exports.number,
1499
- end: propTypes.exports.number
309
+ onChangePerspective: PropTypes.func,
310
+ defaultPerspective: PropTypes.shape({
311
+ start: PropTypes.number,
312
+ end: PropTypes.number
1500
313
  }),
1501
- zoomMultiplier: propTypes.exports.oneOfType([propTypes.exports.number, propTypes.exports.func])
314
+ zoomMultiplier: PropTypes.oneOfType([PropTypes.number, PropTypes.func]),
315
+
316
+ /**
317
+ * Override styles with className
318
+ */
319
+ className: PropTypes.string
1502
320
  };
1503
321
  Timeline.defaultProps = {
1504
- className: undefined,
1505
322
  time: undefined,
1506
323
  children: undefined,
1507
324
  onChangeTime: undefined,
1508
325
  perspective: undefined,
1509
326
  onChangePerspective: undefined,
1510
327
  defaultPerspective: undefined,
1511
- zoomMultiplier: undefined
328
+ zoomMultiplier: undefined,
329
+ className: undefined
1512
330
  };
1513
331
 
1514
332
  var DEFAULT_EVENT_HEIGHT = 15;
@@ -1527,6 +345,8 @@ var _getStyleProperties$4 = getStyleProperties('--vdt-timeline-palette-secondary
1527
345
  _getStyleProperties2$4 = _slicedToArray(_getStyleProperties$4, 1),
1528
346
  paletteSecondary$1 = _getStyleProperties2$4[0];
1529
347
 
348
+ var EmptyImage = document.createElement('img');
349
+ EmptyImage.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
1530
350
  function TimelinePlayhead(_ref) {
1531
351
  var _ref$current;
1532
352
 
@@ -1600,7 +420,8 @@ function TimelinePlayhead(_ref) {
1600
420
  draggable: true,
1601
421
  onDragStart: function onDragStart(e) {
1602
422
  setIsDragging(true);
1603
- e.dataTransfer.setDragImage(ref.current, -99999, -99999);
423
+ e.dataTransfer.setDragImage(EmptyImage, 0, 0);
424
+ return false;
1604
425
  },
1605
426
  onDragEnd: function onDragEnd() {
1606
427
  setIsDragging(false);
@@ -1622,8 +443,7 @@ function TimelinePlayhead(_ref) {
1622
443
  setLocalTime(clampedNewTime);
1623
444
  }
1624
445
  }
1625
- } // eslint-disable-next-line react/jsx-props-no-spreading
1626
-
446
+ }
1627
447
  }, props), {}, {
1628
448
  children: /*#__PURE__*/jsx("div", _objectSpread$8({
1629
449
  className: "VdtTimelinePlayhead-head",
@@ -1635,30 +455,29 @@ function TimelinePlayhead(_ref) {
1635
455
  left: -(headWidth / 2 - lineWidth / 2),
1636
456
  top: -headHeight + 1,
1637
457
  clipPath: 'polygon(0% 0%, 0% 70%, 50% 100%, 100% 70%, 100% 0%)'
1638
- } // eslint-disable-next-line react/jsx-props-no-spreading
1639
-
458
+ }
1640
459
  }, HeadProps))
1641
460
  }));
1642
461
  }
1643
462
  TimelinePlayhead.propTypes = {
463
+ style: PropTypes.instanceOf(Object),
464
+ headHeight: PropTypes.number,
465
+ headWidth: PropTypes.number,
466
+ lineWidth: PropTypes.number,
467
+ perspective: PropTypes.shape({
468
+ start: PropTypes.number,
469
+ end: PropTypes.number
470
+ }),
471
+ time: PropTypes.number,
472
+ onDrag: PropTypes.func,
473
+ HeadProps: PropTypes.instanceOf(Object),
474
+
1644
475
  /**
1645
- * @ignore
476
+ * Override styles with className
1646
477
  */
1647
- className: propTypes.exports.string,
1648
- style: propTypes.exports.instanceOf(Object),
1649
- headHeight: propTypes.exports.number,
1650
- headWidth: propTypes.exports.number,
1651
- lineWidth: propTypes.exports.number,
1652
- perspective: propTypes.exports.shape({
1653
- start: propTypes.exports.number,
1654
- end: propTypes.exports.number
1655
- }),
1656
- time: propTypes.exports.number,
1657
- onDrag: propTypes.exports.func,
1658
- HeadProps: propTypes.exports.instanceOf(Object)
478
+ className: PropTypes.string
1659
479
  };
1660
480
  TimelinePlayhead.defaultProps = {
1661
- className: undefined,
1662
481
  style: {},
1663
482
  headHeight: 16,
1664
483
  headWidth: 12,
@@ -1666,7 +485,8 @@ TimelinePlayhead.defaultProps = {
1666
485
  perspective: undefined,
1667
486
  time: 0,
1668
487
  onDrag: undefined,
1669
- HeadProps: {}
488
+ HeadProps: {},
489
+ className: undefined
1670
490
  };
1671
491
 
1672
492
  function useResizeObserver(ref) {
@@ -1739,8 +559,7 @@ var TimelineWaveFormRects = /*#__PURE__*/memo(function (_ref) {
1739
559
  y: centeredY,
1740
560
  height: rectHeight,
1741
561
  width: rectWidth,
1742
- fill: palettePrimary$1 // eslint-disable-next-line react/jsx-props-no-spreading
1743
-
562
+ fill: palettePrimary$1
1744
563
  }, props), i);
1745
564
  });
1746
565
  });
@@ -1792,56 +611,51 @@ function TimelineWaveform(_ref3) {
1792
611
  var offsetX = interpolate(0, scaleX * width, start, end, perspective.start);
1793
612
  return /*#__PURE__*/jsx("div", _objectSpread$7(_objectSpread$7({
1794
613
  ref: ref,
1795
- className: clsx('VdtTimelineWaveform-root', className) // eslint-disable-next-line react/jsx-props-no-spreading
1796
-
614
+ className: clsx('VdtTimelineWaveform-root', className)
1797
615
  }, props), {}, {
1798
616
  children: /*#__PURE__*/jsx(Stage, _objectSpread$7(_objectSpread$7({
1799
617
  height: height,
1800
618
  width: width,
1801
619
  x: -offsetX,
1802
- scaleX: scaleX // eslint-disable-next-line react/jsx-props-no-spreading
1803
-
620
+ scaleX: scaleX
1804
621
  }, StageProps), {}, {
1805
622
  children: /*#__PURE__*/jsxs(Layer, _objectSpread$7(_objectSpread$7({
1806
- listening: false // eslint-disable-next-line react/jsx-props-no-spreading
1807
-
623
+ listening: false
1808
624
  }, LayerProps), {}, {
1809
625
  children: [/*#__PURE__*/jsx(Rect, _objectSpread$7({
1810
626
  x: 0,
1811
627
  y: 0,
1812
628
  width: width,
1813
- height: height // eslint-disable-next-line react/jsx-props-no-spreading
1814
-
629
+ height: height
1815
630
  }, RectProps)), /*#__PURE__*/jsx(TimelineWaveFormRects, _objectSpread$7({
1816
631
  amplitudeSegments: amplitudeSegments,
1817
632
  pxPerTimeUnit: pxPerTimeUnit,
1818
633
  start: start,
1819
- height: height // eslint-disable-next-line react/jsx-props-no-spreading
1820
-
634
+ height: height
1821
635
  }, WaveRectProps))]
1822
636
  }))
1823
637
  }))
1824
638
  }));
1825
639
  }
1826
640
  TimelineWaveform.propTypes = {
641
+ waveform: PropTypes.arrayOf(PropTypes.number),
642
+ start: PropTypes.number,
643
+ end: PropTypes.number,
644
+ perspective: PropTypes.shape({
645
+ start: PropTypes.number,
646
+ end: PropTypes.number
647
+ }),
648
+ StageProps: PropTypes.instanceOf(Object),
649
+ LayerProps: PropTypes.instanceOf(Object),
650
+ RectProps: PropTypes.instanceOf(Object),
651
+ WaveRectProps: PropTypes.instanceOf(Object),
652
+
1827
653
  /**
1828
- * @ignore
654
+ * Override styles with className
1829
655
  */
1830
- className: propTypes.exports.string,
1831
- waveform: propTypes.exports.arrayOf(propTypes.exports.number),
1832
- start: propTypes.exports.number,
1833
- end: propTypes.exports.number,
1834
- perspective: propTypes.exports.shape({
1835
- start: propTypes.exports.number,
1836
- end: propTypes.exports.number
1837
- }),
1838
- StageProps: propTypes.exports.instanceOf(Object),
1839
- LayerProps: propTypes.exports.instanceOf(Object),
1840
- RectProps: propTypes.exports.instanceOf(Object),
1841
- WaveRectProps: propTypes.exports.instanceOf(Object)
656
+ className: PropTypes.string
1842
657
  };
1843
658
  TimelineWaveform.defaultProps = {
1844
- className: undefined,
1845
659
  waveform: [],
1846
660
  start: undefined,
1847
661
  end: undefined,
@@ -1849,7 +663,8 @@ TimelineWaveform.defaultProps = {
1849
663
  StageProps: {},
1850
664
  LayerProps: {},
1851
665
  RectProps: {},
1852
- WaveRectProps: {}
666
+ WaveRectProps: {},
667
+ className: undefined
1853
668
  };
1854
669
 
1855
670
  function useHover() {
@@ -2047,29 +862,26 @@ function TimelineEvent(_ref) {
2047
862
  onMove(e, newStart);
2048
863
  },
2049
864
  fill: palettePrimary,
2050
- onClick: onClick // eslint-disable-next-line react/jsx-props-no-spreading
2051
-
2052
- }, posProps), defaultHoverProps), hoverProps), props)), /*#__PURE__*/jsx(Rect // eslint-disable-next-line react/jsx-props-no-spreading
2053
- , _objectSpread$6(_objectSpread$6(_objectSpread$6({}, posProps), resizeHoverProps), resizerProps('start'))), /*#__PURE__*/jsx(Rect // eslint-disable-next-line react/jsx-props-no-spreading
2054
- , _objectSpread$6(_objectSpread$6(_objectSpread$6({}, posProps), resizeHoverProps), resizerProps('end')))]
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')))]
2055
867
  });
2056
868
  }
2057
869
  TimelineEvent.propTypes = {
2058
- onClick: propTypes.exports.func,
2059
- onHover: propTypes.exports.func,
2060
- onMove: propTypes.exports.func,
2061
- onMoveStart: propTypes.exports.func,
2062
- onMoveEnd: propTypes.exports.func,
2063
- onResize: propTypes.exports.func,
2064
- onResizeStart: propTypes.exports.func,
2065
- onResizeEnd: propTypes.exports.func,
2066
- x: propTypes.exports.number,
2067
- width: propTypes.exports.number,
2068
- y: propTypes.exports.number,
2069
- height: propTypes.exports.number,
2070
- padding: propTypes.exports.number,
2071
- start: propTypes.exports.number.isRequired,
2072
- end: propTypes.exports.number.isRequired
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
2073
885
  };
2074
886
  TimelineEvent.defaultProps = {
2075
887
  onClick: undefined,
@@ -2187,25 +999,20 @@ function TimelineTrack(_ref) {
2187
999
  className: clsx('VdtTimelineTrack-root', className),
2188
1000
  style: _objectSpread$5({
2189
1001
  height: eventsContainerHeight
2190
- }, style) // eslint-disable-next-line react/jsx-props-no-spreading
2191
-
1002
+ }, style)
2192
1003
  }, props), {}, {
2193
1004
  children: /*#__PURE__*/jsx(Stage, _objectSpread$5(_objectSpread$5({
2194
1005
  height: eventContainerHeight,
2195
- width: eventContainerWidth // eslint-disable-next-line react/jsx-props-no-spreading
2196
-
1006
+ width: eventContainerWidth
2197
1007
  }, StageProps), {}, {
2198
- children: /*#__PURE__*/jsx(Layer // eslint-disable-next-line react/jsx-props-no-spreading
2199
- , _objectSpread$5(_objectSpread$5({}, LayerProps), {}, {
2200
- children: /*#__PURE__*/jsxs(Group // eslint-disable-next-line react/jsx-props-no-spreading
2201
- , _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), {}, {
2202
1010
  children: [/*#__PURE__*/jsx(Rect, _objectSpread$5(_objectSpread$5({
2203
1011
  x: 0,
2204
1012
  y: 0,
2205
1013
  width: eventContainerWidth,
2206
1014
  height: eventContainerHeight,
2207
- onClick: onClick // eslint-disable-next-line react/jsx-props-no-spreading
2208
-
1015
+ onClick: onClick
2209
1016
  }, hoverProps), RectProps)), Children.map(visibleChildren, cloneChild)]
2210
1017
  }))
2211
1018
  }))
@@ -2213,11 +1020,7 @@ function TimelineTrack(_ref) {
2213
1020
  }));
2214
1021
  }
2215
1022
  TimelineTrack.propTypes = {
2216
- /**
2217
- * @ignore
2218
- */
2219
- className: propTypes.exports.string,
2220
- style: propTypes.exports.instanceOf(Object),
1023
+ style: PropTypes.instanceOf(Object),
2221
1024
 
2222
1025
  /**
2223
1026
  * children are positioned within the track according to 'start' and 'end' props passed to them
@@ -2238,19 +1041,23 @@ TimelineTrack.propTypes = {
2238
1041
  });
2239
1042
  return err;
2240
1043
  },
2241
- perspective: propTypes.exports.shape({
2242
- start: propTypes.exports.number,
2243
- end: propTypes.exports.number
1044
+ perspective: PropTypes.shape({
1045
+ start: PropTypes.number,
1046
+ end: PropTypes.number
2244
1047
  }),
2245
- onClick: propTypes.exports.func,
2246
- onHover: propTypes.exports.func,
2247
- StageProps: propTypes.exports.instanceOf(Object),
2248
- LayerProps: propTypes.exports.instanceOf(Object),
2249
- GroupProps: propTypes.exports.instanceOf(Object),
2250
- RectProps: propTypes.exports.instanceOf(Object)
1048
+ onClick: PropTypes.func,
1049
+ onHover: PropTypes.func,
1050
+ StageProps: PropTypes.instanceOf(Object),
1051
+ LayerProps: PropTypes.instanceOf(Object),
1052
+ GroupProps: PropTypes.instanceOf(Object),
1053
+ RectProps: PropTypes.instanceOf(Object),
1054
+
1055
+ /**
1056
+ * Override styles with className
1057
+ */
1058
+ className: PropTypes.string
2251
1059
  };
2252
1060
  TimelineTrack.defaultProps = {
2253
- className: undefined,
2254
1061
  style: {},
2255
1062
  children: undefined,
2256
1063
  perspective: undefined,
@@ -2259,7 +1066,8 @@ TimelineTrack.defaultProps = {
2259
1066
  StageProps: {},
2260
1067
  LayerProps: {},
2261
1068
  GroupProps: {},
2262
- RectProps: {}
1069
+ RectProps: {},
1070
+ className: undefined
2263
1071
  };
2264
1072
 
2265
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}";
@@ -2281,16 +1089,13 @@ function TimelineRow(_ref) {
2281
1089
  return /*#__PURE__*/jsxs("div", _objectSpread$4(_objectSpread$4({
2282
1090
  className: clsx('VdtTimelineRow-root', className, {
2283
1091
  'VdtTimelineRow-hasLabel': !!label
2284
- }) // eslint-disable-next-line react/jsx-props-no-spreading
2285
-
1092
+ })
2286
1093
  }, props), {}, {
2287
1094
  children: [label && /*#__PURE__*/jsx("div", _objectSpread$4(_objectSpread$4({
2288
- className: "VdtTimelineRow-label" // eslint-disable-next-line react/jsx-props-no-spreading
2289
-
1095
+ className: "VdtTimelineRow-label"
2290
1096
  }, LabelProps), {}, {
2291
1097
  children: /*#__PURE__*/jsx("span", _objectSpread$4(_objectSpread$4({
2292
- className: "VdtTimelineRow-labelText" // eslint-disable-next-line react/jsx-props-no-spreading
2293
-
1098
+ className: "VdtTimelineRow-labelText"
2294
1099
  }, LabelTextProps), {}, {
2295
1100
  children: label
2296
1101
  }))
@@ -2298,21 +1103,22 @@ function TimelineRow(_ref) {
2298
1103
  }));
2299
1104
  }
2300
1105
  TimelineRow.propTypes = {
1106
+ children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
1107
+ label: PropTypes.node,
1108
+ LabelProps: PropTypes.instanceOf(Object),
1109
+ LabelTextProps: PropTypes.instanceOf(Object),
1110
+
2301
1111
  /**
2302
- * @ignore
1112
+ * Override styles with className
2303
1113
  */
2304
- className: propTypes.exports.string,
2305
- children: propTypes.exports.oneOfType([propTypes.exports.arrayOf(propTypes.exports.node), propTypes.exports.node]),
2306
- label: propTypes.exports.node,
2307
- LabelProps: propTypes.exports.instanceOf(Object),
2308
- LabelTextProps: propTypes.exports.instanceOf(Object)
1114
+ className: PropTypes.string
2309
1115
  };
2310
1116
  TimelineRow.defaultProps = {
2311
- className: undefined,
2312
1117
  children: undefined,
2313
1118
  label: undefined,
2314
1119
  LabelProps: {},
2315
- LabelTextProps: {}
1120
+ LabelTextProps: {},
1121
+ className: undefined
2316
1122
  };
2317
1123
 
2318
1124
  var css$2 = "\n.VdtTimelinePlayheadTrack-root {\n height: 40px;\n position: relative;\n}";
@@ -2372,28 +1178,22 @@ function TimelineTick(_ref) {
2372
1178
  return null;
2373
1179
  }
2374
1180
 
2375
- return (
2376
- /*#__PURE__*/
2377
- // eslint-disable-next-line react/jsx-props-no-spreading
2378
- jsxs(Group, _objectSpread$3(_objectSpread$3({}, TickGroupProps), {}, {
2379
- children: [/*#__PURE__*/jsx(Text, _objectSpread$3({
2380
- ref: textRef,
2381
- x: textX,
2382
- y: y - tickSize - 20,
2383
- fontFamily: "Helvetica",
2384
- text: label,
2385
- fontStyle: "bold",
2386
- fontSize: 10,
2387
- fill: color // eslint-disable-next-line react/jsx-props-no-spreading
2388
-
2389
- }, TickTextProps)), /*#__PURE__*/jsx(Line, _objectSpread$3({
2390
- points: [x, y - tickSize, x, y],
2391
- stroke: color,
2392
- strokeWidth: tickWidth // eslint-disable-next-line react/jsx-props-no-spreading
2393
-
2394
- }, TickLineProps))]
2395
- }))
2396
- );
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
+ }));
2397
1197
  }
2398
1198
 
2399
1199
  function defaultTicks(_ref3) {
@@ -2544,8 +1344,7 @@ function TimelinePlayheadTrack(_ref4) {
2544
1344
 
2545
1345
  return /*#__PURE__*/jsxs("div", _objectSpread$3(_objectSpread$3({
2546
1346
  ref: trackContainerRef,
2547
- className: clsx('VdtTimelinePlayheadTrack-root', className) // eslint-disable-next-line react/jsx-props-no-spreading
2548
-
1347
+ className: clsx('VdtTimelinePlayheadTrack-root', className)
2549
1348
  }, props), {}, {
2550
1349
  children: [Children.map(children, function (child) {
2551
1350
  return /*#__PURE__*/cloneElement(child, {
@@ -2556,11 +1355,9 @@ function TimelinePlayheadTrack(_ref4) {
2556
1355
  });
2557
1356
  }), /*#__PURE__*/jsx(Stage, _objectSpread$3(_objectSpread$3({
2558
1357
  height: height,
2559
- width: width // eslint-disable-next-line react/jsx-props-no-spreading
2560
-
1358
+ width: width
2561
1359
  }, StageProps), {}, {
2562
- children: /*#__PURE__*/jsx(Layer // eslint-disable-next-line react/jsx-props-no-spreading
2563
- , _objectSpread$3(_objectSpread$3({}, LayerProps), {}, {
1360
+ children: /*#__PURE__*/jsx(Layer, _objectSpread$3(_objectSpread$3({}, LayerProps), {}, {
2564
1361
  children: /*#__PURE__*/jsxs(Group, _objectSpread$3(_objectSpread$3(_objectSpread$3({
2565
1362
  onClick: function onClick(e) {
2566
1363
  if (trackRectRef.current && handleClick) {
@@ -2603,16 +1400,14 @@ function TimelinePlayheadTrack(_ref4) {
2603
1400
  var newEnd = clampedNewStart + perspectiveDuration;
2604
1401
  handleDrag(e, clampedNewStart, newEnd);
2605
1402
  }
2606
- } // eslint-disable-next-line react/jsx-props-no-spreading
2607
-
1403
+ }
2608
1404
  }, hoverProps), GroupProps), {}, {
2609
1405
  children: [/*#__PURE__*/jsx(Rect, _objectSpread$3({
2610
1406
  ref: trackRectRef,
2611
1407
  x: 0,
2612
1408
  y: 0,
2613
1409
  width: width,
2614
- height: height // eslint-disable-next-line react/jsx-props-no-spreading
2615
-
1410
+ height: height
2616
1411
  }, RectProps)), ticks.map(function (_ref7) {
2617
1412
  var x = _ref7.x,
2618
1413
  label = _ref7.label,
@@ -2634,38 +1429,38 @@ function TimelinePlayheadTrack(_ref4) {
2634
1429
  }));
2635
1430
  }
2636
1431
  TimelinePlayheadTrack.propTypes = {
2637
- /**
2638
- * @ignore
2639
- */
2640
- className: propTypes.exports.string,
2641
- onClick: propTypes.exports.func,
2642
- onHover: propTypes.exports.func,
2643
- ticks: propTypes.exports.oneOfType([propTypes.exports.arrayOf(propTypes.exports.shape({
2644
- time: propTypes.exports.number,
2645
- label: propTypes.exports.string
2646
- })), propTypes.exports.func]),
2647
- onWheel: propTypes.exports.func,
2648
- onDrag: propTypes.exports.func,
2649
- children: propTypes.exports.oneOfType([propTypes.exports.arrayOf(propTypes.exports.node), propTypes.exports.node]),
2650
- start: propTypes.exports.number,
2651
- end: propTypes.exports.number,
2652
- perspective: propTypes.exports.shape({
2653
- start: propTypes.exports.number,
2654
- end: propTypes.exports.number
1432
+ onClick: PropTypes.func,
1433
+ onHover: PropTypes.func,
1434
+ ticks: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.shape({
1435
+ time: PropTypes.number,
1436
+ label: PropTypes.string
1437
+ })), PropTypes.func]),
1438
+ onWheel: PropTypes.func,
1439
+ onDrag: PropTypes.func,
1440
+ children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
1441
+ start: PropTypes.number,
1442
+ end: PropTypes.number,
1443
+ perspective: PropTypes.shape({
1444
+ start: PropTypes.number,
1445
+ end: PropTypes.number
2655
1446
  }),
2656
- timelineRef: propTypes.exports.shape({
2657
- current: propTypes.exports.instanceOf(Element)
1447
+ timelineRef: PropTypes.shape({
1448
+ current: PropTypes.instanceOf(Element)
2658
1449
  }),
2659
- StageProps: propTypes.exports.instanceOf(Object),
2660
- LayerProps: propTypes.exports.instanceOf(Object),
2661
- GroupProps: propTypes.exports.instanceOf(Object),
2662
- RectProps: propTypes.exports.instanceOf(Object),
2663
- TickGroupProps: propTypes.exports.instanceOf(Object),
2664
- TickTextProps: propTypes.exports.instanceOf(Object),
2665
- TickLineProps: propTypes.exports.instanceOf(Object)
1450
+ StageProps: PropTypes.instanceOf(Object),
1451
+ LayerProps: PropTypes.instanceOf(Object),
1452
+ GroupProps: PropTypes.instanceOf(Object),
1453
+ RectProps: PropTypes.instanceOf(Object),
1454
+ TickGroupProps: PropTypes.instanceOf(Object),
1455
+ TickTextProps: PropTypes.instanceOf(Object),
1456
+ TickLineProps: PropTypes.instanceOf(Object),
1457
+
1458
+ /**
1459
+ * Override styles with className
1460
+ */
1461
+ className: PropTypes.string
2666
1462
  };
2667
1463
  TimelinePlayheadTrack.defaultProps = {
2668
- className: undefined,
2669
1464
  onClick: undefined,
2670
1465
  onHover: undefined,
2671
1466
  ticks: defaultTicks,
@@ -2682,7 +1477,8 @@ TimelinePlayheadTrack.defaultProps = {
2682
1477
  RectProps: {},
2683
1478
  TickGroupProps: {},
2684
1479
  TickTextProps: {},
2685
- TickLineProps: {}
1480
+ TickLineProps: {},
1481
+ className: undefined
2686
1482
  };
2687
1483
 
2688
1484
  var _excluded$2 = ["index"];
@@ -2825,8 +1621,7 @@ function TimelineScroll(_ref) {
2825
1621
  display: !isZoomed && 'none',
2826
1622
  zIndex: DEFAULT_PLAYHEAD_ZINDEX + 1
2827
1623
  }, style),
2828
- ref: ref // eslint-disable-next-line react/jsx-props-no-spreading
2829
-
1624
+ ref: ref
2830
1625
  }, props), {}, {
2831
1626
  children: /*#__PURE__*/jsx(Stage, _objectSpread$1(_objectSpread$1({
2832
1627
  height: height,
@@ -2848,11 +1643,9 @@ function TimelineScroll(_ref) {
2848
1643
  if (newStart !== undefined && newStart !== perspective.start) {
2849
1644
  handleClick(e, newStart, newStart + perspectiveDuration);
2850
1645
  }
2851
- } // eslint-disable-next-line react/jsx-props-no-spreading
2852
-
1646
+ }
2853
1647
  }, StageProps), {}, {
2854
- children: /*#__PURE__*/jsx(Layer // eslint-disable-next-line react/jsx-props-no-spreading
2855
- , _objectSpread$1(_objectSpread$1({}, LayerProps), {}, {
1648
+ children: /*#__PURE__*/jsx(Layer, _objectSpread$1(_objectSpread$1({}, LayerProps), {}, {
2856
1649
  children: /*#__PURE__*/jsx(Rect, _objectSpread$1({
2857
1650
  x: scrollLeft,
2858
1651
  y: 0,
@@ -2875,33 +1668,32 @@ function TimelineScroll(_ref) {
2875
1668
  e.target.x(scrollLeft);
2876
1669
  var newStart = Math.floor(interpolate(start, end, 0, scrollTrackWidth, x));
2877
1670
  handleScroll(e, newStart, newStart + perspectiveDuration);
2878
- } // eslint-disable-next-line react/jsx-props-no-spreading
2879
-
1671
+ }
2880
1672
  }, RectProps))
2881
1673
  }))
2882
1674
  }))
2883
1675
  }));
2884
1676
  }
2885
1677
  TimelineScroll.propTypes = {
1678
+ onScroll: PropTypes.func,
1679
+ onClick: PropTypes.func,
1680
+ start: PropTypes.number,
1681
+ end: PropTypes.number,
1682
+ perspective: PropTypes.shape({
1683
+ start: PropTypes.number,
1684
+ end: PropTypes.number
1685
+ }),
1686
+ style: PropTypes.instanceOf(Object),
1687
+ StageProps: PropTypes.instanceOf(Object),
1688
+ LayerProps: PropTypes.instanceOf(Object),
1689
+ RectProps: PropTypes.instanceOf(Object),
1690
+
2886
1691
  /**
2887
- * @ignore
1692
+ * Override styles with className
2888
1693
  */
2889
- className: propTypes.exports.string,
2890
- onScroll: propTypes.exports.func,
2891
- onClick: propTypes.exports.func,
2892
- start: propTypes.exports.number,
2893
- end: propTypes.exports.number,
2894
- perspective: propTypes.exports.shape({
2895
- start: propTypes.exports.number,
2896
- end: propTypes.exports.number
2897
- }),
2898
- style: propTypes.exports.instanceOf(Object),
2899
- StageProps: propTypes.exports.instanceOf(Object),
2900
- LayerProps: propTypes.exports.instanceOf(Object),
2901
- RectProps: propTypes.exports.instanceOf(Object)
1694
+ className: PropTypes.string
2902
1695
  };
2903
1696
  TimelineScroll.defaultProps = {
2904
- className: undefined,
2905
1697
  onScroll: undefined,
2906
1698
  onClick: undefined,
2907
1699
  start: undefined,
@@ -2910,7 +1702,8 @@ TimelineScroll.defaultProps = {
2910
1702
  style: {},
2911
1703
  StageProps: {},
2912
1704
  LayerProps: {},
2913
- RectProps: {}
1705
+ RectProps: {},
1706
+ className: undefined
2914
1707
  };
2915
1708
 
2916
1709
  var css = "\n\n.VdtTimelineScrollContainer-timelineRow > :not(.VdtTimelineRow-label) {\n /* margin messes with the playhead line alignment */\n margin: 0;\n}";
@@ -2963,34 +1756,32 @@ function TimelineScrollContainer(_ref2) {
2963
1756
  setPerspective(newPerspectiveStart, newPerspectiveEnd);
2964
1757
  }
2965
1758
  }
2966
- } // eslint-disable-next-line react/jsx-props-no-spreading
2967
-
1759
+ }
2968
1760
  }, props), {}, {
2969
1761
  children: [children, /*#__PURE__*/jsx(TimelineRow, _objectSpread(_objectSpread({
2970
- className: clsx('VdtTimelineScrollContainer-timelineRow') // eslint-disable-next-line react/jsx-props-no-spreading
2971
-
1762
+ className: clsx('VdtTimelineScrollContainer-timelineRow')
2972
1763
  }, RowProps), {}, {
2973
- children: /*#__PURE__*/jsx(TimelineScroll // eslint-disable-next-line react/jsx-props-no-spreading
2974
- , _objectSpread({}, ScrollProps))
1764
+ children: /*#__PURE__*/jsx(TimelineScroll, _objectSpread({}, ScrollProps))
2975
1765
  }))]
2976
1766
  }));
2977
1767
  }
2978
1768
  TimelineScrollContainer.propTypes = {
1769
+ className: PropTypes.string,
1770
+ children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
1771
+ getScrollDistance: PropTypes.func,
1772
+ RowProps: PropTypes.instanceOf(Object),
1773
+ ScrollProps: PropTypes.instanceOf(Object)
2979
1774
  /**
2980
- * @ignore
1775
+ * Override styles with className
2981
1776
  */
2982
- className: propTypes.exports.string,
2983
- children: propTypes.exports.oneOfType([propTypes.exports.arrayOf(propTypes.exports.node), propTypes.exports.node]),
2984
- getScrollDistance: propTypes.exports.func,
2985
- RowProps: propTypes.exports.instanceOf(Object),
2986
- ScrollProps: propTypes.exports.instanceOf(Object)
1777
+
2987
1778
  };
2988
1779
  TimelineScrollContainer.defaultProps = {
2989
- className: undefined,
2990
1780
  children: undefined,
2991
1781
  getScrollDistance: defaultGetScrollDistance,
2992
1782
  RowProps: {},
2993
- ScrollProps: {}
1783
+ ScrollProps: {},
1784
+ className: undefined
2994
1785
  };
2995
1786
 
2996
1787
  export { Timeline, TimelineContext, TimelineEvent, TimelinePlayhead, TimelinePlayheadTrack, TimelineProvider, TimelineRow, TimelineScroll, TimelineScrollContainer, TimelineTrack, TimelineWaveform, getStackOverlappingEventProps, useTimeline };