@thecb/components 10.12.5-beta.1 → 10.12.6-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +378 -119
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +378 -119
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/card/CardText.js +1 -6
- package/src/constants/regex_constants.js +1 -1
- package/src/components/atoms/.DS_Store +0 -0
package/dist/index.cjs.js
CHANGED
|
@@ -236,6 +236,58 @@ function __rest(s, e) {
|
|
|
236
236
|
t[p[i]] = s[p[i]];
|
|
237
237
|
}
|
|
238
238
|
return t;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/*! *****************************************************************************
|
|
242
|
+
Copyright (c) Microsoft Corporation.
|
|
243
|
+
|
|
244
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
245
|
+
purpose with or without fee is hereby granted.
|
|
246
|
+
|
|
247
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
248
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
249
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
250
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
251
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
252
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
253
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
254
|
+
***************************************************************************** */
|
|
255
|
+
/* global Reflect, Promise */
|
|
256
|
+
|
|
257
|
+
var extendStatics$1 = function(d, b) {
|
|
258
|
+
extendStatics$1 = Object.setPrototypeOf ||
|
|
259
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
260
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
261
|
+
return extendStatics$1(d, b);
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
function __extends$1(d, b) {
|
|
265
|
+
extendStatics$1(d, b);
|
|
266
|
+
function __() { this.constructor = d; }
|
|
267
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
var __assign$1 = function() {
|
|
271
|
+
__assign$1 = Object.assign || function __assign(t) {
|
|
272
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
273
|
+
s = arguments[i];
|
|
274
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
275
|
+
}
|
|
276
|
+
return t;
|
|
277
|
+
};
|
|
278
|
+
return __assign$1.apply(this, arguments);
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
function __rest$1(s, e) {
|
|
282
|
+
var t = {};
|
|
283
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
284
|
+
t[p] = s[p];
|
|
285
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
286
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
287
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
288
|
+
t[p[i]] = s[p[i]];
|
|
289
|
+
}
|
|
290
|
+
return t;
|
|
239
291
|
}
|
|
240
292
|
|
|
241
293
|
function __spreadArrays() {
|
|
@@ -246,6 +298,32 @@ function __spreadArrays() {
|
|
|
246
298
|
return r;
|
|
247
299
|
}
|
|
248
300
|
|
|
301
|
+
/*! *****************************************************************************
|
|
302
|
+
Copyright (c) Microsoft Corporation.
|
|
303
|
+
|
|
304
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
305
|
+
purpose with or without fee is hereby granted.
|
|
306
|
+
|
|
307
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
308
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
309
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
310
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
311
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
312
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
313
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
314
|
+
***************************************************************************** */
|
|
315
|
+
|
|
316
|
+
var __assign$2 = function() {
|
|
317
|
+
__assign$2 = Object.assign || function __assign(t) {
|
|
318
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
319
|
+
s = arguments[i];
|
|
320
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
321
|
+
}
|
|
322
|
+
return t;
|
|
323
|
+
};
|
|
324
|
+
return __assign$2.apply(this, arguments);
|
|
325
|
+
};
|
|
326
|
+
|
|
249
327
|
var clamp = function (min, max) { return function (v) {
|
|
250
328
|
return Math.max(Math.min(v, max), min);
|
|
251
329
|
}; };
|
|
@@ -259,8 +337,8 @@ var number = {
|
|
|
259
337
|
parse: parseFloat,
|
|
260
338
|
transform: function (v) { return v; }
|
|
261
339
|
};
|
|
262
|
-
var alpha = __assign(__assign({}, number), { transform: clamp(0, 1) });
|
|
263
|
-
var scale = __assign(__assign({}, number), { default: 1 });
|
|
340
|
+
var alpha = __assign$2(__assign$2({}, number), { transform: clamp(0, 1) });
|
|
341
|
+
var scale = __assign$2(__assign$2({}, number), { default: 1 });
|
|
264
342
|
|
|
265
343
|
var createUnitType = function (unit) { return ({
|
|
266
344
|
test: function (v) {
|
|
@@ -274,7 +352,7 @@ var percent = createUnitType('%');
|
|
|
274
352
|
var px = createUnitType('px');
|
|
275
353
|
var vh = createUnitType('vh');
|
|
276
354
|
var vw = createUnitType('vw');
|
|
277
|
-
var progressPercentage = __assign(__assign({}, percent), { parse: function (v) { return percent.parse(v) / 100; }, transform: function (v) { return percent.transform(v * 100); } });
|
|
355
|
+
var progressPercentage = __assign$2(__assign$2({}, percent), { parse: function (v) { return percent.parse(v) / 100; }, transform: function (v) { return percent.transform(v * 100); } });
|
|
278
356
|
|
|
279
357
|
var getValueFromFunctionString = function (value) {
|
|
280
358
|
return value.substring(value.indexOf('(') + 1, value.lastIndexOf(')'));
|
|
@@ -308,7 +386,7 @@ var hslaTemplate = function (_a) {
|
|
|
308
386
|
var hue = _a.hue, saturation = _a.saturation, lightness = _a.lightness, _b = _a.alpha, alpha = _b === void 0 ? 1 : _b;
|
|
309
387
|
return "hsla(" + hue + ", " + saturation + ", " + lightness + ", " + alpha + ")";
|
|
310
388
|
};
|
|
311
|
-
var rgbUnit = __assign(__assign({}, number), { transform: function (v) { return Math.round(clampRgbUnit(v)); } });
|
|
389
|
+
var rgbUnit = __assign$2(__assign$2({}, number), { transform: function (v) { return Math.round(clampRgbUnit(v)); } });
|
|
312
390
|
function isColorString(color, colorType) {
|
|
313
391
|
return color.startsWith(colorType) && singleColorRegex.test(color);
|
|
314
392
|
}
|
|
@@ -338,7 +416,7 @@ var hsla = {
|
|
|
338
416
|
});
|
|
339
417
|
}
|
|
340
418
|
};
|
|
341
|
-
var hex = __assign(__assign({}, rgba), { test: function (v) { return typeof v === 'string' && isColorString(v, '#'); }, parse: function (v) {
|
|
419
|
+
var hex = __assign$2(__assign$2({}, rgba), { test: function (v) { return typeof v === 'string' && isColorString(v, '#'); }, parse: function (v) {
|
|
342
420
|
var r = '';
|
|
343
421
|
var g = '';
|
|
344
422
|
var b = '';
|
|
@@ -874,15 +952,15 @@ See the Apache Version 2.0 License for specific language governing permissions
|
|
|
874
952
|
and limitations under the License.
|
|
875
953
|
***************************************************************************** */
|
|
876
954
|
|
|
877
|
-
var __assign$
|
|
878
|
-
__assign$
|
|
955
|
+
var __assign$3 = function() {
|
|
956
|
+
__assign$3 = Object.assign || function __assign(t) {
|
|
879
957
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
880
958
|
s = arguments[i];
|
|
881
959
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
882
960
|
}
|
|
883
961
|
return t;
|
|
884
962
|
};
|
|
885
|
-
return __assign$
|
|
963
|
+
return __assign$3.apply(this, arguments);
|
|
886
964
|
};
|
|
887
965
|
|
|
888
966
|
var mixLinearColor = function (from, to, v) {
|
|
@@ -905,7 +983,7 @@ var mixColor = (function (from, to) {
|
|
|
905
983
|
invariant(fromColorType.transform === toColorType.transform, 'Both colors must be hex/RGBA, OR both must be HSLA.');
|
|
906
984
|
var fromColor = fromColorType.parse(from);
|
|
907
985
|
var toColor = toColorType.parse(to);
|
|
908
|
-
var blended = __assign$
|
|
986
|
+
var blended = __assign$3({}, fromColor);
|
|
909
987
|
var mixFunc = fromColorType === hsla ? mix : mixLinearColor;
|
|
910
988
|
return function (v) {
|
|
911
989
|
for (var key in blended) {
|
|
@@ -950,7 +1028,7 @@ var mixArray = function (from, to) {
|
|
|
950
1028
|
};
|
|
951
1029
|
};
|
|
952
1030
|
var mixObject = function (origin, target) {
|
|
953
|
-
var output = __assign$
|
|
1031
|
+
var output = __assign$3({}, origin, target);
|
|
954
1032
|
var blendValue = {};
|
|
955
1033
|
for (var key in output) {
|
|
956
1034
|
if (origin[key] !== undefined && target[key] !== undefined) {
|
|
@@ -1162,6 +1240,44 @@ var wrap$1 = curryRange(wrap);
|
|
|
1162
1240
|
|
|
1163
1241
|
var clampProgress = clamp$1$1(0, 1);
|
|
1164
1242
|
|
|
1243
|
+
/*! *****************************************************************************
|
|
1244
|
+
Copyright (c) Microsoft Corporation.
|
|
1245
|
+
|
|
1246
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
1247
|
+
purpose with or without fee is hereby granted.
|
|
1248
|
+
|
|
1249
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1250
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1251
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1252
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1253
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1254
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1255
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
1256
|
+
***************************************************************************** */
|
|
1257
|
+
|
|
1258
|
+
var __assign$4 = function() {
|
|
1259
|
+
__assign$4 = Object.assign || function __assign(t) {
|
|
1260
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
1261
|
+
s = arguments[i];
|
|
1262
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
1263
|
+
}
|
|
1264
|
+
return t;
|
|
1265
|
+
};
|
|
1266
|
+
return __assign$4.apply(this, arguments);
|
|
1267
|
+
};
|
|
1268
|
+
|
|
1269
|
+
function __rest$2(s, e) {
|
|
1270
|
+
var t = {};
|
|
1271
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1272
|
+
t[p] = s[p];
|
|
1273
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1274
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1275
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1276
|
+
t[p[i]] = s[p[i]];
|
|
1277
|
+
}
|
|
1278
|
+
return t;
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1165
1281
|
var createStyler = function (_a) {
|
|
1166
1282
|
var onRead = _a.onRead,
|
|
1167
1283
|
onRender = _a.onRender,
|
|
@@ -1173,7 +1289,7 @@ var createStyler = function (_a) {
|
|
|
1173
1289
|
if (_a === void 0) {
|
|
1174
1290
|
_a = {};
|
|
1175
1291
|
}
|
|
1176
|
-
var props = __rest(_a, []);
|
|
1292
|
+
var props = __rest$2(_a, []);
|
|
1177
1293
|
var state = {};
|
|
1178
1294
|
var changedValues = [];
|
|
1179
1295
|
var hasChanged = false;
|
|
@@ -1293,7 +1409,7 @@ function isTransformOriginProp(key) {
|
|
|
1293
1409
|
return transformOriginProps.has(key);
|
|
1294
1410
|
}
|
|
1295
1411
|
|
|
1296
|
-
var int = /*#__PURE__*/__assign( /*#__PURE__*/__assign({}, number), { transform: Math.round });
|
|
1412
|
+
var int = /*#__PURE__*/__assign$4( /*#__PURE__*/__assign$4({}, number), { transform: Math.round });
|
|
1297
1413
|
var valueTypes = {
|
|
1298
1414
|
color: color,
|
|
1299
1415
|
backgroundColor: color,
|
|
@@ -1525,8 +1641,8 @@ function createCssStyler(element, _a) {
|
|
|
1525
1641
|
}
|
|
1526
1642
|
var enableHardwareAcceleration = _a.enableHardwareAcceleration,
|
|
1527
1643
|
allowTransformNone = _a.allowTransformNone,
|
|
1528
|
-
props = __rest(_a, ["enableHardwareAcceleration", "allowTransformNone"]);
|
|
1529
|
-
return cssStyler(__assign({ element: element, buildStyles: createStyleBuilder({
|
|
1644
|
+
props = __rest$2(_a, ["enableHardwareAcceleration", "allowTransformNone"]);
|
|
1645
|
+
return cssStyler(__assign$4({ element: element, buildStyles: createStyleBuilder({
|
|
1530
1646
|
enableHardwareAcceleration: enableHardwareAcceleration,
|
|
1531
1647
|
allowTransformNone: allowTransformNone
|
|
1532
1648
|
}), preparseOutput: true }, props));
|
|
@@ -1576,7 +1692,7 @@ function buildSVGAttrs(_a, dimensions, totalPathLength, cssBuilder, attrs, isDas
|
|
|
1576
1692
|
pathSpacing = _b === void 0 ? 1 : _b,
|
|
1577
1693
|
_c = _a.pathOffset,
|
|
1578
1694
|
pathOffset = _c === void 0 ? 0 : _c,
|
|
1579
|
-
state = __rest(_a, ["attrX", "attrY", "originX", "originY", "pathLength", "pathSpacing", "pathOffset"]);
|
|
1695
|
+
state = __rest$2(_a, ["attrX", "attrY", "originX", "originY", "pathLength", "pathSpacing", "pathOffset"]);
|
|
1580
1696
|
var style = cssBuilder(state);
|
|
1581
1697
|
for (var key in style) {
|
|
1582
1698
|
if (key === 'transform') {
|
|
@@ -1705,7 +1821,7 @@ var Chainable = /*#__PURE__*/function () {
|
|
|
1705
1821
|
this.props = props;
|
|
1706
1822
|
}
|
|
1707
1823
|
Chainable.prototype.applyMiddleware = function (middleware) {
|
|
1708
|
-
return this.create(__assign(__assign({}, this.props), { middleware: this.props.middleware ? __spreadArrays([middleware], this.props.middleware) : [middleware] }));
|
|
1824
|
+
return this.create(__assign$1(__assign$1({}, this.props), { middleware: this.props.middleware ? __spreadArrays([middleware], this.props.middleware) : [middleware] }));
|
|
1709
1825
|
};
|
|
1710
1826
|
Chainable.prototype.pipe = function () {
|
|
1711
1827
|
var funcs = [];
|
|
@@ -1777,7 +1893,7 @@ var createObserver = function (observerCandidate, _a, onComplete) {
|
|
|
1777
1893
|
};
|
|
1778
1894
|
|
|
1779
1895
|
var Action = /*#__PURE__*/function (_super) {
|
|
1780
|
-
__extends(Action, _super);
|
|
1896
|
+
__extends$1(Action, _super);
|
|
1781
1897
|
function Action() {
|
|
1782
1898
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
1783
1899
|
}
|
|
@@ -1796,13 +1912,13 @@ var Action = /*#__PURE__*/function (_super) {
|
|
|
1796
1912
|
};
|
|
1797
1913
|
var _a = this.props,
|
|
1798
1914
|
init = _a.init,
|
|
1799
|
-
observerProps = __rest(_a, ["init"]);
|
|
1915
|
+
observerProps = __rest$1(_a, ["init"]);
|
|
1800
1916
|
var observer = createObserver(observerCandidate, observerProps, function () {
|
|
1801
1917
|
isComplete = true;
|
|
1802
1918
|
subscription.stop();
|
|
1803
1919
|
});
|
|
1804
1920
|
var api = init(observer);
|
|
1805
|
-
subscription = api ? __assign(__assign({}, subscription), api) : subscription;
|
|
1921
|
+
subscription = api ? __assign$1(__assign$1({}, subscription), api) : subscription;
|
|
1806
1922
|
if (observerCandidate.registerParent) {
|
|
1807
1923
|
observerCandidate.registerParent(subscription);
|
|
1808
1924
|
}
|
|
@@ -1816,7 +1932,7 @@ var action = function (init) {
|
|
|
1816
1932
|
};
|
|
1817
1933
|
|
|
1818
1934
|
var BaseMulticast = /*#__PURE__*/function (_super) {
|
|
1819
|
-
__extends(BaseMulticast, _super);
|
|
1935
|
+
__extends$1(BaseMulticast, _super);
|
|
1820
1936
|
function BaseMulticast() {
|
|
1821
1937
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1822
1938
|
_this.subscribers = [];
|
|
@@ -1876,7 +1992,7 @@ var isSingleValue = function (v) {
|
|
|
1876
1992
|
return typeOfV === 'string' || typeOfV === 'number';
|
|
1877
1993
|
};
|
|
1878
1994
|
var ValueReaction = /*#__PURE__*/function (_super) {
|
|
1879
|
-
__extends(ValueReaction, _super);
|
|
1995
|
+
__extends$1(ValueReaction, _super);
|
|
1880
1996
|
function ValueReaction(props) {
|
|
1881
1997
|
var _this = _super.call(this, props) || this;
|
|
1882
1998
|
_this.scheduleVelocityCheck = function () {
|
|
@@ -2126,7 +2242,7 @@ var reduceArrayValue = function (i) {
|
|
|
2126
2242
|
var createArrayAction = function (action, props, vectorKeys) {
|
|
2127
2243
|
var firstVectorKey = vectorKeys[0];
|
|
2128
2244
|
var actionList = props[firstVectorKey].map(function (v, i) {
|
|
2129
|
-
var childActionProps = vectorKeys.reduce(reduceArrayValue(i), __assign({}, props));
|
|
2245
|
+
var childActionProps = vectorKeys.reduce(reduceArrayValue(i), __assign$1({}, props));
|
|
2130
2246
|
return getActionCreator(v)(action, childActionProps);
|
|
2131
2247
|
});
|
|
2132
2248
|
return parallel$1.apply(void 0, actionList);
|
|
@@ -2140,7 +2256,7 @@ var reduceObjectValue = function (key) {
|
|
|
2140
2256
|
var createObjectAction = function (action, props, vectorKeys) {
|
|
2141
2257
|
var firstVectorKey = vectorKeys[0];
|
|
2142
2258
|
var actionMap = Object.keys(props[firstVectorKey]).reduce(function (map, key) {
|
|
2143
|
-
var childActionProps = vectorKeys.reduce(reduceObjectValue(key), __assign({}, props));
|
|
2259
|
+
var childActionProps = vectorKeys.reduce(reduceObjectValue(key), __assign$1({}, props));
|
|
2144
2260
|
map[key] = getActionCreator(props[firstVectorKey][key])(action, childActionProps);
|
|
2145
2261
|
return map;
|
|
2146
2262
|
}, {});
|
|
@@ -2149,18 +2265,18 @@ var createObjectAction = function (action, props, vectorKeys) {
|
|
|
2149
2265
|
var createUnitAction = function (action, _a) {
|
|
2150
2266
|
var from = _a.from,
|
|
2151
2267
|
to = _a.to,
|
|
2152
|
-
props = __rest(_a, ["from", "to"]);
|
|
2268
|
+
props = __rest$1(_a, ["from", "to"]);
|
|
2153
2269
|
var unitType = findUnitType(from) || findUnitType(to);
|
|
2154
2270
|
var transform = unitType.transform,
|
|
2155
2271
|
parse = unitType.parse;
|
|
2156
|
-
return action(__assign(__assign({}, props), { from: typeof from === 'string' ? parse(from) : from, to: typeof to === 'string' ? parse(to) : to })).pipe(transform);
|
|
2272
|
+
return action(__assign$1(__assign$1({}, props), { from: typeof from === 'string' ? parse(from) : from, to: typeof to === 'string' ? parse(to) : to })).pipe(transform);
|
|
2157
2273
|
};
|
|
2158
2274
|
var createMixerAction = function (mixer) {
|
|
2159
2275
|
return function (action, _a) {
|
|
2160
2276
|
var from = _a.from,
|
|
2161
2277
|
to = _a.to,
|
|
2162
|
-
props = __rest(_a, ["from", "to"]);
|
|
2163
|
-
return action(__assign(__assign({}, props), { from: 0, to: 1 })).pipe(mixer(from, to));
|
|
2278
|
+
props = __rest$1(_a, ["from", "to"]);
|
|
2279
|
+
return action(__assign$1(__assign$1({}, props), { from: 0, to: 1 })).pipe(mixer(from, to));
|
|
2164
2280
|
};
|
|
2165
2281
|
};
|
|
2166
2282
|
var createColorAction = /*#__PURE__*/createMixerAction(mixColor);
|
|
@@ -2506,7 +2622,7 @@ var keyframes = function (_a) {
|
|
|
2506
2622
|
ease = _b === void 0 ? linear : _b,
|
|
2507
2623
|
times = _a.times,
|
|
2508
2624
|
values = _a.values,
|
|
2509
|
-
tweenProps = __rest(_a, ["easings", "ease", "times", "values"]);
|
|
2625
|
+
tweenProps = __rest$1(_a, ["easings", "ease", "times", "values"]);
|
|
2510
2626
|
easings = Array.isArray(easings) ? easings : defaultEasings(values, easings);
|
|
2511
2627
|
times = times || defaultTimings(values);
|
|
2512
2628
|
var scrubbers = easings.map(function (easing, i) {
|
|
@@ -2516,7 +2632,7 @@ var keyframes = function (_a) {
|
|
|
2516
2632
|
ease: easing
|
|
2517
2633
|
});
|
|
2518
2634
|
});
|
|
2519
|
-
return tween(__assign(__assign({}, tweenProps), { ease: ease })).applyMiddleware(function (update) {
|
|
2635
|
+
return tween(__assign$1(__assign$1({}, tweenProps), { ease: ease })).applyMiddleware(function (update) {
|
|
2520
2636
|
return interpolateScrubbers(times, scrubbers, update);
|
|
2521
2637
|
});
|
|
2522
2638
|
};
|
|
@@ -2760,7 +2876,7 @@ var index$1 = function (_a) {
|
|
|
2760
2876
|
}
|
|
2761
2877
|
var x = _a.x,
|
|
2762
2878
|
y = _a.y,
|
|
2763
|
-
props = __rest(_a, ["x", "y"]);
|
|
2879
|
+
props = __rest$1(_a, ["x", "y"]);
|
|
2764
2880
|
if (x !== undefined || y !== undefined) {
|
|
2765
2881
|
var applyXOffset_1 = applyOffset(x || 0);
|
|
2766
2882
|
var applyYOffset_1 = applyOffset(y || 0);
|
|
@@ -2834,7 +2950,7 @@ var steps$1 = function (st, min, max) {
|
|
|
2834
2950
|
};
|
|
2835
2951
|
var transformMap = function (childTransformers) {
|
|
2836
2952
|
return function (v) {
|
|
2837
|
-
var output = __assign({}, v);
|
|
2953
|
+
var output = __assign$1({}, v);
|
|
2838
2954
|
for (var key in childTransformers) {
|
|
2839
2955
|
if (childTransformers.hasOwnProperty(key)) {
|
|
2840
2956
|
var childTransformer = childTransformers[key];
|
|
@@ -2865,6 +2981,52 @@ var transformers = /*#__PURE__*/Object.freeze({
|
|
|
2865
2981
|
transformMap: transformMap
|
|
2866
2982
|
});
|
|
2867
2983
|
|
|
2984
|
+
/*! *****************************************************************************
|
|
2985
|
+
Copyright (c) Microsoft Corporation.
|
|
2986
|
+
|
|
2987
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
2988
|
+
purpose with or without fee is hereby granted.
|
|
2989
|
+
|
|
2990
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
2991
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
2992
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
2993
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
2994
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2995
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2996
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
2997
|
+
***************************************************************************** */
|
|
2998
|
+
|
|
2999
|
+
var __assign$5 = function() {
|
|
3000
|
+
__assign$5 = Object.assign || function __assign(t) {
|
|
3001
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3002
|
+
s = arguments[i];
|
|
3003
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
3004
|
+
}
|
|
3005
|
+
return t;
|
|
3006
|
+
};
|
|
3007
|
+
return __assign$5.apply(this, arguments);
|
|
3008
|
+
};
|
|
3009
|
+
|
|
3010
|
+
function __rest$3(s, e) {
|
|
3011
|
+
var t = {};
|
|
3012
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3013
|
+
t[p] = s[p];
|
|
3014
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
3015
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
3016
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
3017
|
+
t[p[i]] = s[p[i]];
|
|
3018
|
+
}
|
|
3019
|
+
return t;
|
|
3020
|
+
}
|
|
3021
|
+
|
|
3022
|
+
function __spreadArrays$1() {
|
|
3023
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
3024
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
3025
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
3026
|
+
r[k] = a[j];
|
|
3027
|
+
return r;
|
|
3028
|
+
}
|
|
3029
|
+
|
|
2868
3030
|
var getPoseValues = function (_a) {
|
|
2869
3031
|
var transition = _a.transition,
|
|
2870
3032
|
flip = _a.flip,
|
|
@@ -2877,7 +3039,7 @@ var getPoseValues = function (_a) {
|
|
|
2877
3039
|
preTransition = _a.preTransition,
|
|
2878
3040
|
applyAtStart = _a.applyAtStart,
|
|
2879
3041
|
applyAtEnd = _a.applyAtEnd,
|
|
2880
|
-
props = __rest(_a, ["transition", "flip", "delay", "delayChildren", "staggerChildren", "staggerDirection", "afterChildren", "beforeChildren", "preTransition", "applyAtStart", "applyAtEnd"]);
|
|
3042
|
+
props = __rest$3(_a, ["transition", "flip", "delay", "delayChildren", "staggerChildren", "staggerDirection", "afterChildren", "beforeChildren", "preTransition", "applyAtStart", "applyAtEnd"]);
|
|
2881
3043
|
return props;
|
|
2882
3044
|
};
|
|
2883
3045
|
var selectPoses = function (_a) {
|
|
@@ -2889,7 +3051,7 @@ var selectPoses = function (_a) {
|
|
|
2889
3051
|
onChange = _a.onChange,
|
|
2890
3052
|
passive = _a.passive,
|
|
2891
3053
|
initialPose = _a.initialPose,
|
|
2892
|
-
poses = __rest(_a, ["label", "props", "values", "parentValues", "ancestorValues", "onChange", "passive", "initialPose"]);
|
|
3054
|
+
poses = __rest$3(_a, ["label", "props", "values", "parentValues", "ancestorValues", "onChange", "passive", "initialPose"]);
|
|
2893
3055
|
return poses;
|
|
2894
3056
|
};
|
|
2895
3057
|
var selectAllValues = function (values, selectValue) {
|
|
@@ -2989,7 +3151,7 @@ var createPoseSetter = function (setterProps) {
|
|
|
2989
3151
|
var _a = nextProps.delay,
|
|
2990
3152
|
delay = _a === void 0 ? 0 : _a;
|
|
2991
3153
|
var hasChildren = children.size;
|
|
2992
|
-
var baseTransitionProps = __assign(__assign({}, props), nextProps);
|
|
3154
|
+
var baseTransitionProps = __assign$5(__assign$5({}, props), nextProps);
|
|
2993
3155
|
var nextPose = poses[next];
|
|
2994
3156
|
var getChildAnimations = function () {
|
|
2995
3157
|
return hasChildren && propagate ? startChildAnimations(children, next, nextPose, baseTransitionProps) : [];
|
|
@@ -3015,11 +3177,11 @@ var createPoseSetter = function (setterProps) {
|
|
|
3015
3177
|
valuePoses.splice(insertionIndex, 0, next);
|
|
3016
3178
|
return insertionIndex === 0 ? new Promise(function (complete) {
|
|
3017
3179
|
var value = values.get(key);
|
|
3018
|
-
var transitionProps = __assign(__assign({}, baseTransitionProps), { key: key,
|
|
3180
|
+
var transitionProps = __assign$5(__assign$5({}, baseTransitionProps), { key: key,
|
|
3019
3181
|
value: value });
|
|
3020
3182
|
var target = resolveTarget(value, resolveProp(nextPose[key], transitionProps));
|
|
3021
3183
|
if (activeActions.has(key)) stopAction(activeActions.get(key));
|
|
3022
|
-
var resolveTransitionProps = __assign(__assign({ to: target }, transitionProps), getTransitionProps(value, target, transitionProps));
|
|
3184
|
+
var resolveTransitionProps = __assign$5(__assign$5({ to: target }, transitionProps), getTransitionProps(value, target, transitionProps));
|
|
3023
3185
|
var transition = resolveTransition(getTransition, key, value, resolveTransitionProps, convertTransitionDefinition, getInstantTransition);
|
|
3024
3186
|
var poseDelay = delay || resolveProp(nextPose.delay, transitionProps);
|
|
3025
3187
|
if (poseDelay) {
|
|
@@ -3043,7 +3205,7 @@ var createPoseSetter = function (setterProps) {
|
|
|
3043
3205
|
});
|
|
3044
3206
|
}
|
|
3045
3207
|
}
|
|
3046
|
-
return Promise.all(__spreadArrays(getParentAnimations(), getChildAnimations()));
|
|
3208
|
+
return Promise.all(__spreadArrays$1(getParentAnimations(), getChildAnimations()));
|
|
3047
3209
|
};
|
|
3048
3210
|
};
|
|
3049
3211
|
|
|
@@ -3169,7 +3331,7 @@ var createValueMap = function (props) {
|
|
|
3169
3331
|
};
|
|
3170
3332
|
|
|
3171
3333
|
var applyDefaultTransition = function (pose, key, defaultTransitions) {
|
|
3172
|
-
return __assign(__assign({}, pose), { transition: defaultTransitions.has(key) ? defaultTransitions.get(key) : defaultTransitions.get('default') });
|
|
3334
|
+
return __assign$5(__assign$5({}, pose), { transition: defaultTransitions.has(key) ? defaultTransitions.get(key) : defaultTransitions.get('default') });
|
|
3173
3335
|
};
|
|
3174
3336
|
var generateTransitions = function (poses, defaultTransitions) {
|
|
3175
3337
|
Object.keys(poses).forEach(function (key) {
|
|
@@ -3223,7 +3385,7 @@ var poseFactory = function (_a) {
|
|
|
3223
3385
|
var poses = generateTransitions(selectPoses(config), defaultTransitions);
|
|
3224
3386
|
var _b = config.props,
|
|
3225
3387
|
props = _b === void 0 ? {} : _b;
|
|
3226
|
-
if (getDefaultProps) props = __assign(__assign({}, getDefaultProps(config)), props);
|
|
3388
|
+
if (getDefaultProps) props = __assign$5(__assign$5({}, getDefaultProps(config)), props);
|
|
3227
3389
|
var passive = config.passive,
|
|
3228
3390
|
userSetValues = config.values,
|
|
3229
3391
|
_c = config.initialPose,
|
|
@@ -3298,10 +3460,10 @@ var poseFactory = function (_a) {
|
|
|
3298
3460
|
},
|
|
3299
3461
|
has: has,
|
|
3300
3462
|
setProps: function (newProps) {
|
|
3301
|
-
return state.props = __assign(__assign({}, state.props), newProps);
|
|
3463
|
+
return state.props = __assign$5(__assign$5({}, state.props), newProps);
|
|
3302
3464
|
},
|
|
3303
3465
|
_addChild: function (childConfig, factory) {
|
|
3304
|
-
var child = factory(__assign(__assign({ initialPose: initialPose }, childConfig), { ancestorValues: __spreadArrays([{ label: config.label, values: values }], ancestorValues) }));
|
|
3466
|
+
var child = factory(__assign$5(__assign$5({ initialPose: initialPose }, childConfig), { ancestorValues: __spreadArrays$1([{ label: config.label, values: values }], ancestorValues) }));
|
|
3305
3467
|
children.add(child);
|
|
3306
3468
|
return child;
|
|
3307
3469
|
},
|
|
@@ -3340,18 +3502,18 @@ See the Apache Version 2.0 License for specific language governing permissions
|
|
|
3340
3502
|
and limitations under the License.
|
|
3341
3503
|
***************************************************************************** */
|
|
3342
3504
|
|
|
3343
|
-
var __assign$
|
|
3344
|
-
__assign$
|
|
3505
|
+
var __assign$6 = function () {
|
|
3506
|
+
__assign$6 = Object.assign || function __assign(t) {
|
|
3345
3507
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3346
3508
|
s = arguments[i];
|
|
3347
3509
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
3348
3510
|
}
|
|
3349
3511
|
return t;
|
|
3350
3512
|
};
|
|
3351
|
-
return __assign$
|
|
3513
|
+
return __assign$6.apply(this, arguments);
|
|
3352
3514
|
};
|
|
3353
3515
|
|
|
3354
|
-
function __rest$
|
|
3516
|
+
function __rest$4(s, e) {
|
|
3355
3517
|
var t = {};
|
|
3356
3518
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
3357
3519
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
@@ -3468,12 +3630,12 @@ var intelligentTransition = {
|
|
|
3468
3630
|
opacity: linearTween,
|
|
3469
3631
|
default: tween
|
|
3470
3632
|
};
|
|
3471
|
-
var dragAction = /*#__PURE__*/__assign$
|
|
3633
|
+
var dragAction = /*#__PURE__*/__assign$6( /*#__PURE__*/__assign$6({}, intelligentTransition), { x: /*#__PURE__*/createPointer(pointerX, 'left', 'right', BoundingBoxDimension.width), y: /*#__PURE__*/createPointer(pointerY, 'top', 'bottom', BoundingBoxDimension.height) });
|
|
3472
3634
|
var justAxis = function (_a) {
|
|
3473
3635
|
var from = _a.from;
|
|
3474
3636
|
return just(from);
|
|
3475
3637
|
};
|
|
3476
|
-
var intelligentDragEnd = /*#__PURE__*/__assign$
|
|
3638
|
+
var intelligentDragEnd = /*#__PURE__*/__assign$6( /*#__PURE__*/__assign$6({}, intelligentTransition), { x: justAxis, y: justAxis });
|
|
3477
3639
|
var defaultTransitions = /*#__PURE__*/new Map([['default', intelligentTransition], ['drag', dragAction], ['dragEnd', intelligentDragEnd]]);
|
|
3478
3640
|
|
|
3479
3641
|
var animationLookup = {
|
|
@@ -3543,7 +3705,7 @@ var getAction = function (v, _a, _b) {
|
|
|
3543
3705
|
var _c = _a.type,
|
|
3544
3706
|
type = _c === void 0 ? 'tween' : _c,
|
|
3545
3707
|
definedEase = _a.ease,
|
|
3546
|
-
def = __rest$
|
|
3708
|
+
def = __rest$4(_a, ["type", "ease"]);
|
|
3547
3709
|
invariant(animationLookup[type] !== undefined, "Invalid transition type '" + type + "'. Valid transition types are: tween, spring, decay, physics and keyframes.");
|
|
3548
3710
|
var ease;
|
|
3549
3711
|
if (type === 'tween') {
|
|
@@ -3568,7 +3730,7 @@ var getAction = function (v, _a, _b) {
|
|
|
3568
3730
|
velocity: velocity,
|
|
3569
3731
|
ease: ease
|
|
3570
3732
|
} : { ease: ease };
|
|
3571
|
-
return animationLookup[type](__assign$
|
|
3733
|
+
return animationLookup[type](__assign$6(__assign$6({}, baseProps), def));
|
|
3572
3734
|
};
|
|
3573
3735
|
var isAction = function (action$$1) {
|
|
3574
3736
|
return typeof action$$1.start !== 'undefined';
|
|
@@ -3653,7 +3815,7 @@ var pose = function (_a) {
|
|
|
3653
3815
|
min = def.min,
|
|
3654
3816
|
max = def.max,
|
|
3655
3817
|
round = def.round,
|
|
3656
|
-
remainingDef = __rest$
|
|
3818
|
+
remainingDef = __rest$4(def, ["delay", "min", "max", "round"]);
|
|
3657
3819
|
var action$$1 = getAction(val, remainingDef, props);
|
|
3658
3820
|
var outputPipe = [];
|
|
3659
3821
|
if (delay$$1) action$$1 = addActionDelay(delay$$1, action$$1);
|
|
@@ -3835,7 +3997,7 @@ var explicitlyFlipPose = function (state, nextPose) {
|
|
|
3835
3997
|
bottom = nextPose.bottom,
|
|
3836
3998
|
right = nextPose.right,
|
|
3837
3999
|
position = nextPose.position,
|
|
3838
|
-
remainingPose = __rest$
|
|
4000
|
+
remainingPose = __rest$4(nextPose, ["width", "height", "top", "left", "bottom", "right", "position"]);
|
|
3839
4001
|
var propsToSet = positionalProps.concat('position').reduce(function (acc, key) {
|
|
3840
4002
|
if (nextPose[key] !== undefined) {
|
|
3841
4003
|
acc[key] = resolveProp$1(nextPose[key], state.props);
|
|
@@ -3947,7 +4109,7 @@ var convertPositionalUnits = function (state, nextPose) {
|
|
|
3947
4109
|
changedPositionalKeys.push(key);
|
|
3948
4110
|
if (!applyAtEndHasBeenCopied) {
|
|
3949
4111
|
applyAtEndHasBeenCopied = true;
|
|
3950
|
-
nextPose.applyAtEnd = nextPose.applyAtEnd ? __assign$
|
|
4112
|
+
nextPose.applyAtEnd = nextPose.applyAtEnd ? __assign$6({}, nextPose.applyAtEnd) : {};
|
|
3951
4113
|
}
|
|
3952
4114
|
nextPose.applyAtEnd[key] = nextPose.applyAtEnd[key] || nextPose[key];
|
|
3953
4115
|
setValue(state, key, to);
|
|
@@ -4003,8 +4165,8 @@ var createPoseConfig = function (element, _a) {
|
|
|
4003
4165
|
focusable = _a.focusable,
|
|
4004
4166
|
pressable = _a.pressable,
|
|
4005
4167
|
dragBounds = _a.dragBounds,
|
|
4006
|
-
config = __rest$
|
|
4007
|
-
var poseConfig = __assign$
|
|
4168
|
+
config = __rest$4(_a, ["onDragStart", "onDragEnd", "onPressStart", "onPressEnd", "draggable", "hoverable", "focusable", "pressable", "dragBounds"]);
|
|
4169
|
+
var poseConfig = __assign$6(__assign$6({ flip: {} }, config), { props: __assign$6(__assign$6({}, config.props), { onDragStart: onDragStart,
|
|
4008
4170
|
onDragEnd: onDragEnd,
|
|
4009
4171
|
onPressStart: onPressStart,
|
|
4010
4172
|
onPressEnd: onPressEnd,
|
|
@@ -4018,8 +4180,8 @@ var createPoseConfig = function (element, _a) {
|
|
|
4018
4180
|
var _b = dragPoses(draggable),
|
|
4019
4181
|
drag = _b.drag,
|
|
4020
4182
|
dragEnd = _b.dragEnd;
|
|
4021
|
-
poseConfig.drag = __assign$
|
|
4022
|
-
poseConfig.dragEnd = __assign$
|
|
4183
|
+
poseConfig.drag = __assign$6(__assign$6({}, drag), poseConfig.drag);
|
|
4184
|
+
poseConfig.dragEnd = __assign$6(__assign$6({}, dragEnd), poseConfig.dragEnd);
|
|
4023
4185
|
}
|
|
4024
4186
|
return poseConfig;
|
|
4025
4187
|
};
|
|
@@ -4027,7 +4189,7 @@ var domPose = /*#__PURE__*/pose({
|
|
|
4027
4189
|
posePriority: ['drag', 'press', 'focus', 'hover'],
|
|
4028
4190
|
transformPose: function (_a, name, state) {
|
|
4029
4191
|
var flip = _a.flip,
|
|
4030
|
-
pose$$1 = __rest$
|
|
4192
|
+
pose$$1 = __rest$4(_a, ["flip"]);
|
|
4031
4193
|
if (isFlipPose(flip, name, state)) {
|
|
4032
4194
|
return flipPose(state, pose$$1);
|
|
4033
4195
|
} else if (isPositional(pose$$1)) {
|
|
@@ -4065,7 +4227,7 @@ var domPose = /*#__PURE__*/pose({
|
|
|
4065
4227
|
var props = _a.props,
|
|
4066
4228
|
activeActions = _a.activeActions;
|
|
4067
4229
|
var measure = props.dimensions.measure;
|
|
4068
|
-
var poserApi = __assign$
|
|
4230
|
+
var poserApi = __assign$6(__assign$6({}, api), { addChild: function (element, childConfig) {
|
|
4069
4231
|
return api._addChild(createPoseConfig(element, childConfig), domPose);
|
|
4070
4232
|
}, measure: measure, flip: function (op) {
|
|
4071
4233
|
if (op) {
|
|
@@ -7093,6 +7255,104 @@ var Imposter = function Imposter(_ref) {
|
|
|
7093
7255
|
}, rest), safeChildren(children, /*#__PURE__*/React__default.createElement(React.Fragment, null)));
|
|
7094
7256
|
};
|
|
7095
7257
|
|
|
7258
|
+
/*! *****************************************************************************
|
|
7259
|
+
Copyright (c) Microsoft Corporation.
|
|
7260
|
+
|
|
7261
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
7262
|
+
purpose with or without fee is hereby granted.
|
|
7263
|
+
|
|
7264
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
7265
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
7266
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
7267
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
7268
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
7269
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
7270
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
7271
|
+
***************************************************************************** */
|
|
7272
|
+
/* global Reflect, Promise */
|
|
7273
|
+
|
|
7274
|
+
var extendStatics$2 = function(d, b) {
|
|
7275
|
+
extendStatics$2 = Object.setPrototypeOf ||
|
|
7276
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
7277
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7278
|
+
return extendStatics$2(d, b);
|
|
7279
|
+
};
|
|
7280
|
+
|
|
7281
|
+
function __extends$2(d, b) {
|
|
7282
|
+
extendStatics$2(d, b);
|
|
7283
|
+
function __() { this.constructor = d; }
|
|
7284
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
7285
|
+
}
|
|
7286
|
+
|
|
7287
|
+
var __assign$7 = function() {
|
|
7288
|
+
__assign$7 = Object.assign || function __assign(t) {
|
|
7289
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
7290
|
+
s = arguments[i];
|
|
7291
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
7292
|
+
}
|
|
7293
|
+
return t;
|
|
7294
|
+
};
|
|
7295
|
+
return __assign$7.apply(this, arguments);
|
|
7296
|
+
};
|
|
7297
|
+
|
|
7298
|
+
function __rest$5(s, e) {
|
|
7299
|
+
var t = {};
|
|
7300
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
7301
|
+
t[p] = s[p];
|
|
7302
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7303
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7304
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
7305
|
+
t[p[i]] = s[p[i]];
|
|
7306
|
+
}
|
|
7307
|
+
return t;
|
|
7308
|
+
}
|
|
7309
|
+
|
|
7310
|
+
function __spreadArrays$2() {
|
|
7311
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
7312
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
7313
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
7314
|
+
r[k] = a[j];
|
|
7315
|
+
return r;
|
|
7316
|
+
}
|
|
7317
|
+
|
|
7318
|
+
/*! *****************************************************************************
|
|
7319
|
+
Copyright (c) Microsoft Corporation.
|
|
7320
|
+
|
|
7321
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
7322
|
+
purpose with or without fee is hereby granted.
|
|
7323
|
+
|
|
7324
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
7325
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
7326
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
7327
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
7328
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
7329
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
7330
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
7331
|
+
***************************************************************************** */
|
|
7332
|
+
|
|
7333
|
+
var __assign$8 = function() {
|
|
7334
|
+
__assign$8 = Object.assign || function __assign(t) {
|
|
7335
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
7336
|
+
s = arguments[i];
|
|
7337
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
7338
|
+
}
|
|
7339
|
+
return t;
|
|
7340
|
+
};
|
|
7341
|
+
return __assign$8.apply(this, arguments);
|
|
7342
|
+
};
|
|
7343
|
+
|
|
7344
|
+
function __rest$6(s, e) {
|
|
7345
|
+
var t = {};
|
|
7346
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
7347
|
+
t[p] = s[p];
|
|
7348
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7349
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7350
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
7351
|
+
t[p[i]] = s[p[i]];
|
|
7352
|
+
}
|
|
7353
|
+
return t;
|
|
7354
|
+
}
|
|
7355
|
+
|
|
7096
7356
|
var Observer$1 = /*#__PURE__*/function () {
|
|
7097
7357
|
function Observer(_a, observer) {
|
|
7098
7358
|
var _this = this;
|
|
@@ -7155,18 +7415,18 @@ var Action$1 = /*#__PURE__*/function () {
|
|
|
7155
7415
|
};
|
|
7156
7416
|
var _a = this.props,
|
|
7157
7417
|
init = _a.init,
|
|
7158
|
-
observerProps = __rest(_a, ["init"]);
|
|
7418
|
+
observerProps = __rest$6(_a, ["init"]);
|
|
7159
7419
|
var observer = createObserver$1(observerCandidate, observerProps, function () {
|
|
7160
7420
|
isComplete = true;
|
|
7161
7421
|
subscription.stop();
|
|
7162
7422
|
});
|
|
7163
7423
|
var api = init(observer);
|
|
7164
|
-
subscription = api ? __assign({}, subscription, api) : subscription;
|
|
7424
|
+
subscription = api ? __assign$8({}, subscription, api) : subscription;
|
|
7165
7425
|
if (isComplete) subscription.stop();
|
|
7166
7426
|
return subscription;
|
|
7167
7427
|
};
|
|
7168
7428
|
Action.prototype.applyMiddleware = function (middleware) {
|
|
7169
|
-
return this.create(__assign({}, this.props, { middleware: this.props.middleware ? [middleware].concat(this.props.middleware) : [middleware] }));
|
|
7429
|
+
return this.create(__assign$8({}, this.props, { middleware: this.props.middleware ? [middleware].concat(this.props.middleware) : [middleware] }));
|
|
7170
7430
|
};
|
|
7171
7431
|
Action.prototype.pipe = function () {
|
|
7172
7432
|
var funcs = [];
|
|
@@ -7219,18 +7479,18 @@ var createAction$1 = function (action, props) {
|
|
|
7219
7479
|
var createUnitAction$1 = function (action, _a) {
|
|
7220
7480
|
var from = _a.from,
|
|
7221
7481
|
to = _a.to,
|
|
7222
|
-
props = __rest(_a, ["from", "to"]);
|
|
7482
|
+
props = __rest$6(_a, ["from", "to"]);
|
|
7223
7483
|
var unitType = findUnitType$1(from) || findUnitType$1(to);
|
|
7224
7484
|
var transform = unitType.transform,
|
|
7225
7485
|
parse = unitType.parse;
|
|
7226
|
-
return action(__assign({}, props, { from: typeof from === 'string' ? parse(from) : from, to: typeof to === 'string' ? parse(to) : to })).pipe(transform);
|
|
7486
|
+
return action(__assign$8({}, props, { from: typeof from === 'string' ? parse(from) : from, to: typeof to === 'string' ? parse(to) : to })).pipe(transform);
|
|
7227
7487
|
};
|
|
7228
7488
|
var createMixerAction$1 = function (mixer) {
|
|
7229
7489
|
return function (action, _a) {
|
|
7230
7490
|
var from = _a.from,
|
|
7231
7491
|
to = _a.to,
|
|
7232
|
-
props = __rest(_a, ["from", "to"]);
|
|
7233
|
-
return action(__assign({}, props, { from: 0, to: 1 })).pipe(mixer(from, to));
|
|
7492
|
+
props = __rest$6(_a, ["from", "to"]);
|
|
7493
|
+
return action(__assign$8({}, props, { from: 0, to: 1 })).pipe(mixer(from, to));
|
|
7234
7494
|
};
|
|
7235
7495
|
};
|
|
7236
7496
|
var createColorAction$1 = /*#__PURE__*/createMixerAction$1(mixColor);
|
|
@@ -7443,7 +7703,7 @@ var inertia = function (_a) {
|
|
|
7443
7703
|
};
|
|
7444
7704
|
var startSpring = function (props) {
|
|
7445
7705
|
isSpring = true;
|
|
7446
|
-
startAnimation(vectorSpring$1(__assign({}, props, { to: isLessThanMin(props.from) ? min : max, stiffness: bounceStiffness, damping: bounceDamping, restDelta: restDelta })));
|
|
7706
|
+
startAnimation(vectorSpring$1(__assign$8({}, props, { to: isLessThanMin(props.from) ? min : max, stiffness: bounceStiffness, damping: bounceDamping, restDelta: restDelta })));
|
|
7447
7707
|
};
|
|
7448
7708
|
if (isOutOfBounds(from)) {
|
|
7449
7709
|
startSpring({ from: from, velocity: velocity });
|
|
@@ -7675,7 +7935,7 @@ var keyframes$1 = function (_a) {
|
|
|
7675
7935
|
ease = _b === void 0 ? linear : _b,
|
|
7676
7936
|
times = _a.times,
|
|
7677
7937
|
values = _a.values,
|
|
7678
|
-
tweenProps = __rest(_a, ["easings", "ease", "times", "values"]);
|
|
7938
|
+
tweenProps = __rest$6(_a, ["easings", "ease", "times", "values"]);
|
|
7679
7939
|
easings = Array.isArray(easings) ? easings : defaultEasings$1(values, easings);
|
|
7680
7940
|
times = times || defaultTimings$1(values);
|
|
7681
7941
|
var scrubbers = easings.map(function (easing, i) {
|
|
@@ -7685,7 +7945,7 @@ var keyframes$1 = function (_a) {
|
|
|
7685
7945
|
ease: easing
|
|
7686
7946
|
});
|
|
7687
7947
|
});
|
|
7688
|
-
return tween$1(__assign({}, tweenProps, { ease: ease })).applyMiddleware(function (update) {
|
|
7948
|
+
return tween$1(__assign$8({}, tweenProps, { ease: ease })).applyMiddleware(function (update) {
|
|
7689
7949
|
return interpolateScrubbers$1(times, scrubbers, update);
|
|
7690
7950
|
});
|
|
7691
7951
|
};
|
|
@@ -7887,7 +8147,7 @@ var MotionValue = /** @class */ (function () {
|
|
|
7887
8147
|
*/
|
|
7888
8148
|
MotionValue.prototype.addChild = function (config) {
|
|
7889
8149
|
if (config === void 0) { config = {}; }
|
|
7890
|
-
var child = new MotionValue(this.current, __assign({ parent: this }, config));
|
|
8150
|
+
var child = new MotionValue(this.current, __assign$7({ parent: this }, config));
|
|
7891
8151
|
if (!this.children)
|
|
7892
8152
|
this.children = new Set();
|
|
7893
8153
|
this.children.add(child);
|
|
@@ -8329,7 +8589,7 @@ var buildStyleAttr = function (values, styleProp, isStatic) {
|
|
|
8329
8589
|
? transformTemplate({}, styleProp.transform)
|
|
8330
8590
|
: transformTemplate;
|
|
8331
8591
|
}
|
|
8332
|
-
return buildStyleProperty(__assign(__assign({}, styleProp), motionValueStyles), !isStatic);
|
|
8592
|
+
return buildStyleProperty(__assign$7(__assign$7({}, styleProp), motionValueStyles), !isStatic);
|
|
8333
8593
|
};
|
|
8334
8594
|
var useMotionStyles = function (values, styleProp, isStatic, transformValues) {
|
|
8335
8595
|
if (styleProp === void 0) { styleProp = {}; }
|
|
@@ -8383,7 +8643,7 @@ var auto$1 = {
|
|
|
8383
8643
|
parse: function (v) { return v; },
|
|
8384
8644
|
};
|
|
8385
8645
|
var dimensionTypes = [number, px, percent, degrees, vw, vh, auto$1];
|
|
8386
|
-
var valueTypes$1 = __spreadArrays(dimensionTypes, [color, complex]);
|
|
8646
|
+
var valueTypes$1 = __spreadArrays$2(dimensionTypes, [color, complex]);
|
|
8387
8647
|
var testValueType$1 = function (v) { return function (type) { return type.test(v); }; };
|
|
8388
8648
|
var getDimensionValueType = function (v) {
|
|
8389
8649
|
return dimensionTypes.find(testValueType$1(v));
|
|
@@ -8436,7 +8696,7 @@ var getDefaultTransition = function (valueKey, to) {
|
|
|
8436
8696
|
transitionFactory =
|
|
8437
8697
|
defaultTransitions$1[valueKey] || defaultTransitions$1.default;
|
|
8438
8698
|
}
|
|
8439
|
-
return __assign({ to: to }, transitionFactory(to));
|
|
8699
|
+
return __assign$7({ to: to }, transitionFactory(to));
|
|
8440
8700
|
};
|
|
8441
8701
|
|
|
8442
8702
|
/**
|
|
@@ -8532,9 +8792,9 @@ var transitionOptionParser = {
|
|
|
8532
8792
|
return opts;
|
|
8533
8793
|
},
|
|
8534
8794
|
keyframes: function (_a) {
|
|
8535
|
-
var from = _a.from, to = _a.to, velocity = _a.velocity, opts = __rest(_a, ["from", "to", "velocity"]);
|
|
8795
|
+
var from = _a.from, to = _a.to, velocity = _a.velocity, opts = __rest$5(_a, ["from", "to", "velocity"]);
|
|
8536
8796
|
if (opts.values && opts.values[0] === null) {
|
|
8537
|
-
var values = __spreadArrays(opts.values);
|
|
8797
|
+
var values = __spreadArrays$2(opts.values);
|
|
8538
8798
|
values[0] = from;
|
|
8539
8799
|
opts.values = values;
|
|
8540
8800
|
}
|
|
@@ -8548,7 +8808,7 @@ var transitionOptionParser = {
|
|
|
8548
8808
|
},
|
|
8549
8809
|
};
|
|
8550
8810
|
var isTransitionDefined = function (_a) {
|
|
8551
|
-
var when = _a.when, delay = _a.delay, delayChildren = _a.delayChildren, staggerChildren = _a.staggerChildren, staggerDirection = _a.staggerDirection, transition = __rest(_a, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection"]);
|
|
8811
|
+
var when = _a.when, delay = _a.delay, delayChildren = _a.delayChildren, staggerChildren = _a.staggerChildren, staggerDirection = _a.staggerDirection, transition = __rest$5(_a, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection"]);
|
|
8552
8812
|
return Object.keys(transition).length;
|
|
8553
8813
|
};
|
|
8554
8814
|
var getTransitionDefinition = function (key, to, transitionDefinition) {
|
|
@@ -8558,7 +8818,7 @@ var getTransitionDefinition = function (key, to, transitionDefinition) {
|
|
|
8558
8818
|
// and see if there's any props remaining
|
|
8559
8819
|
if (transitionDefinition === undefined ||
|
|
8560
8820
|
!isTransitionDefined(transitionDefinition)) {
|
|
8561
|
-
return __assign({ delay: delay }, getDefaultTransition(key, to));
|
|
8821
|
+
return __assign$7({ delay: delay }, getDefaultTransition(key, to));
|
|
8562
8822
|
}
|
|
8563
8823
|
var valueTransitionDefinition = transitionDefinition[key] ||
|
|
8564
8824
|
transitionDefinition.default ||
|
|
@@ -8575,12 +8835,12 @@ var getTransitionDefinition = function (key, to, transitionDefinition) {
|
|
|
8575
8835
|
};
|
|
8576
8836
|
}
|
|
8577
8837
|
else if (isKeyframesTarget(to)) {
|
|
8578
|
-
return __assign(__assign({ values: to, duration: 0.8, delay: delay, ease: "linear" }, valueTransitionDefinition), {
|
|
8838
|
+
return __assign$7(__assign$7({ values: to, duration: 0.8, delay: delay, ease: "linear" }, valueTransitionDefinition), {
|
|
8579
8839
|
// This animation must be keyframes if we're animating through an array
|
|
8580
8840
|
type: "keyframes" });
|
|
8581
8841
|
}
|
|
8582
8842
|
else {
|
|
8583
|
-
return __assign({ type: "tween", to: to,
|
|
8843
|
+
return __assign$7({ type: "tween", to: to,
|
|
8584
8844
|
delay: delay }, valueTransitionDefinition);
|
|
8585
8845
|
}
|
|
8586
8846
|
};
|
|
@@ -8597,12 +8857,12 @@ var getAnimation = function (key, value, target, transition) {
|
|
|
8597
8857
|
// for instance 100 to #fff. This might live better in Popmotion.
|
|
8598
8858
|
warning(isOriginAnimatable === isTargetAnimatable, "You are trying to animate " + key + " from \"" + origin + "\" to " + target + ". \"" + origin + "\" is not an animatable value - to enable this animation set " + origin + " to a value animatable to " + target + " via the `style` property.");
|
|
8599
8859
|
// Parse the `transition` prop and return options for the Popmotion animation
|
|
8600
|
-
var _a = getTransitionDefinition(key, target, transition), _b = _a.type, type = _b === void 0 ? "tween" : _b, transitionDefinition = __rest(_a, ["type"]);
|
|
8860
|
+
var _a = getTransitionDefinition(key, target, transition), _b = _a.type, type = _b === void 0 ? "tween" : _b, transitionDefinition = __rest$5(_a, ["type"]);
|
|
8601
8861
|
// If this is an animatable pair of values, return an animation, otherwise use `just`
|
|
8602
8862
|
var actionFactory = isOriginAnimatable && isTargetAnimatable
|
|
8603
8863
|
? transitions[type]
|
|
8604
8864
|
: just$1;
|
|
8605
|
-
var opts = preprocessOptions(type, __assign({ from: origin, velocity: value.getVelocity() }, transitionDefinition));
|
|
8865
|
+
var opts = preprocessOptions(type, __assign$7({ from: origin, velocity: value.getVelocity() }, transitionDefinition));
|
|
8606
8866
|
// Convert duration from Framer Motion's seconds into Popmotion's milliseconds
|
|
8607
8867
|
if (isDurationAnimation(opts)) {
|
|
8608
8868
|
if (opts.duration) {
|
|
@@ -8620,10 +8880,10 @@ var getAnimation = function (key, value, target, transition) {
|
|
|
8620
8880
|
* @internal
|
|
8621
8881
|
*/
|
|
8622
8882
|
function startAnimation(key, value, target, _a) {
|
|
8623
|
-
var _b = _a.delay, delay$1$1 = _b === void 0 ? 0 : _b, transition = __rest(_a, ["delay"]);
|
|
8883
|
+
var _b = _a.delay, delay$1$1 = _b === void 0 ? 0 : _b, transition = __rest$5(_a, ["delay"]);
|
|
8624
8884
|
return value.start(function (complete) {
|
|
8625
8885
|
var activeAnimation;
|
|
8626
|
-
var _a = getAnimation(key, value, target, transition), animationFactory = _a[0], _b = _a[1], valueDelay = _b.delay, options = __rest(_b, ["delay"]);
|
|
8886
|
+
var _a = getAnimation(key, value, target, transition), animationFactory = _a[0], _b = _a[1], valueDelay = _b.delay, options = __rest$5(_b, ["delay"]);
|
|
8627
8887
|
if (valueDelay !== undefined) {
|
|
8628
8888
|
delay$1$1 = valueDelay;
|
|
8629
8889
|
}
|
|
@@ -8769,7 +9029,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
8769
9029
|
var _this = this;
|
|
8770
9030
|
var _b = _a === void 0 ? {} : _a, _c = _b.isActive, isActive = _c === void 0 ? new Set() : _c, priority = _b.priority;
|
|
8771
9031
|
var _d = this.resolveVariant(definition), target = _d.target, transitionEnd = _d.transitionEnd;
|
|
8772
|
-
target = this.transformValues(__assign(__assign({}, target), transitionEnd));
|
|
9032
|
+
target = this.transformValues(__assign$7(__assign$7({}, target), transitionEnd));
|
|
8773
9033
|
return Object.keys(target).forEach(function (key) {
|
|
8774
9034
|
if (isActive.has(key))
|
|
8775
9035
|
return;
|
|
@@ -8859,7 +9119,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
8859
9119
|
// resolve current and velocity
|
|
8860
9120
|
variant = variant(this.props.custom, getCurrent$1(this.values), getVelocity(this.values));
|
|
8861
9121
|
}
|
|
8862
|
-
var _a = variant.transition, transition = _a === void 0 ? this.defaultTransition : _a, transitionEnd = variant.transitionEnd, target = __rest(variant, ["transition", "transitionEnd"]);
|
|
9122
|
+
var _a = variant.transition, transition = _a === void 0 ? this.defaultTransition : _a, transitionEnd = variant.transitionEnd, target = __rest$5(variant, ["transition", "transitionEnd"]);
|
|
8863
9123
|
return { transition: transition, transitionEnd: transitionEnd, target: target };
|
|
8864
9124
|
};
|
|
8865
9125
|
/**
|
|
@@ -8950,7 +9210,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
8950
9210
|
ValueAnimationControls.prototype.applyVariantLabels = function (variantLabelList) {
|
|
8951
9211
|
var _this = this;
|
|
8952
9212
|
var isActive = new Set();
|
|
8953
|
-
var reversedList = __spreadArrays(variantLabelList).reverse();
|
|
9213
|
+
var reversedList = __spreadArrays$2(variantLabelList).reverse();
|
|
8954
9214
|
reversedList.forEach(function (key) {
|
|
8955
9215
|
var _a = _this.resolveVariant(_this.variants[key]), target = _a.target, transitionEnd = _a.transitionEnd;
|
|
8956
9216
|
if (transitionEnd) {
|
|
@@ -9021,7 +9281,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
9021
9281
|
if (this.isAnimating.has(key))
|
|
9022
9282
|
continue;
|
|
9023
9283
|
this.isAnimating.add(key);
|
|
9024
|
-
animations.push(startAnimation(key, value, valueTarget, __assign({ delay: delay }, transition)));
|
|
9284
|
+
animations.push(startAnimation(key, value, valueTarget, __assign$7({ delay: delay }, transition)));
|
|
9025
9285
|
}
|
|
9026
9286
|
var allAnimations = Promise.all(animations);
|
|
9027
9287
|
return transitionEnd
|
|
@@ -9032,7 +9292,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
9032
9292
|
};
|
|
9033
9293
|
ValueAnimationControls.prototype.animateVariantLabels = function (variantLabels, opts) {
|
|
9034
9294
|
var _this = this;
|
|
9035
|
-
var animations = __spreadArrays(variantLabels).reverse()
|
|
9295
|
+
var animations = __spreadArrays$2(variantLabels).reverse()
|
|
9036
9296
|
.map(function (label) { return _this.animateVariant(label, opts); });
|
|
9037
9297
|
return Promise.all(animations);
|
|
9038
9298
|
};
|
|
@@ -9476,7 +9736,7 @@ function useValueAnimationControls(config, props, subscribeToParentControls) {
|
|
|
9476
9736
|
// Remove reference to onAnimationComplete from controls. All the MotionValues
|
|
9477
9737
|
// are unsubscribed from this component separately. We let animations run out
|
|
9478
9738
|
// as they might be animating other components.
|
|
9479
|
-
var onAnimationComplete = props.onAnimationComplete, unmountProps = __rest(props, ["onAnimationComplete"]);
|
|
9739
|
+
var onAnimationComplete = props.onAnimationComplete, unmountProps = __rest$5(props, ["onAnimationComplete"]);
|
|
9480
9740
|
controls.setProps(unmountProps);
|
|
9481
9741
|
parentControls && parentControls.removeChild(controls);
|
|
9482
9742
|
};
|
|
@@ -9961,7 +10221,7 @@ var PanSession = /** @class */ (function () {
|
|
|
9961
10221
|
return;
|
|
9962
10222
|
var point = info.point;
|
|
9963
10223
|
var timestamp = getFrameData().timestamp;
|
|
9964
|
-
_this.history.push(__assign(__assign({}, point), { timestamp: timestamp }));
|
|
10224
|
+
_this.history.push(__assign$7(__assign$7({}, point), { timestamp: timestamp }));
|
|
9965
10225
|
var _a = _this.handlers, onStart = _a.onStart, onMove = _a.onMove;
|
|
9966
10226
|
if (!isPanStarted) {
|
|
9967
10227
|
onStart && onStart(_this.lastMoveEvent, info);
|
|
@@ -9978,7 +10238,7 @@ var PanSession = /** @class */ (function () {
|
|
|
9978
10238
|
var initialInfo = transformPoint(info, this.transformPagePoint);
|
|
9979
10239
|
var point = initialInfo.point;
|
|
9980
10240
|
var timestamp = getFrameData().timestamp;
|
|
9981
|
-
this.history = [__assign(__assign({}, point), { timestamp: timestamp })];
|
|
10241
|
+
this.history = [__assign$7(__assign$7({}, point), { timestamp: timestamp })];
|
|
9982
10242
|
var onSessionStart = handlers.onSessionStart;
|
|
9983
10243
|
onSessionStart &&
|
|
9984
10244
|
onSessionStart(event, getPanInfo(initialInfo, this.history));
|
|
@@ -10306,7 +10566,7 @@ var Gestures = {
|
|
|
10306
10566
|
return gestureProps.some(function (key) { return props.hasOwnProperty(key); });
|
|
10307
10567
|
},
|
|
10308
10568
|
Component: makeRenderlessComponent(function (_a) {
|
|
10309
|
-
var innerRef = _a.innerRef, props = __rest(_a, ["innerRef"]);
|
|
10569
|
+
var innerRef = _a.innerRef, props = __rest$5(_a, ["innerRef"]);
|
|
10310
10570
|
useGestures(props, innerRef);
|
|
10311
10571
|
}),
|
|
10312
10572
|
};
|
|
@@ -10546,8 +10806,8 @@ var ComponentDragControls = /** @class */ (function () {
|
|
|
10546
10806
|
};
|
|
10547
10807
|
ComponentDragControls.prototype.updateProps = function (_a) {
|
|
10548
10808
|
var _this = this;
|
|
10549
|
-
var _b = _a.drag, drag = _b === void 0 ? false : _b, _c = _a.dragDirectionLock, dragDirectionLock = _c === void 0 ? false : _c, _d = _a.dragPropagation, dragPropagation = _d === void 0 ? false : _d, _e = _a.dragConstraints, dragConstraints = _e === void 0 ? false : _e, _f = _a.dragElastic, dragElastic = _f === void 0 ? true : _f, _g = _a.dragMomentum, dragMomentum = _g === void 0 ? true : _g, remainingProps = __rest(_a, ["drag", "dragDirectionLock", "dragPropagation", "dragConstraints", "dragElastic", "dragMomentum"]);
|
|
10550
|
-
this.props = __assign({ drag: drag,
|
|
10809
|
+
var _b = _a.drag, drag = _b === void 0 ? false : _b, _c = _a.dragDirectionLock, dragDirectionLock = _c === void 0 ? false : _c, _d = _a.dragPropagation, dragPropagation = _d === void 0 ? false : _d, _e = _a.dragConstraints, dragConstraints = _e === void 0 ? false : _e, _f = _a.dragElastic, dragElastic = _f === void 0 ? true : _f, _g = _a.dragMomentum, dragMomentum = _g === void 0 ? true : _g, remainingProps = __rest$5(_a, ["drag", "dragDirectionLock", "dragPropagation", "dragConstraints", "dragElastic", "dragMomentum"]);
|
|
10810
|
+
this.props = __assign$7({ drag: drag,
|
|
10551
10811
|
dragDirectionLock: dragDirectionLock,
|
|
10552
10812
|
dragPropagation: dragPropagation,
|
|
10553
10813
|
dragConstraints: dragConstraints,
|
|
@@ -10603,7 +10863,7 @@ var ComponentDragControls = /** @class */ (function () {
|
|
|
10603
10863
|
var bounceStiffness = dragElastic ? 200 : 1000000;
|
|
10604
10864
|
var bounceDamping = dragElastic ? 40 : 10000000;
|
|
10605
10865
|
var animationControls = _dragTransitionControls || _this.controls;
|
|
10606
|
-
var inertia = __assign(__assign({ type: "inertia", velocity: dragMomentum ? velocity[axis] : 0, bounceStiffness: bounceStiffness,
|
|
10866
|
+
var inertia = __assign$7(__assign$7({ type: "inertia", velocity: dragMomentum ? velocity[axis] : 0, bounceStiffness: bounceStiffness,
|
|
10607
10867
|
bounceDamping: bounceDamping, timeConstant: 750, restDelta: 1 }, dragTransition), transition);
|
|
10608
10868
|
var externalAxisMotionValue = axis === "x" ? _dragValueX : _dragValueY;
|
|
10609
10869
|
// If we're not animating on an externally-provided `MotionValue` we can use the
|
|
@@ -10684,7 +10944,7 @@ function bothAxis(handler) {
|
|
|
10684
10944
|
return [handler("x"), handler("y")];
|
|
10685
10945
|
}
|
|
10686
10946
|
function convertPanToDrag(info, point) {
|
|
10687
|
-
return __assign(__assign({}, info), { point: {
|
|
10947
|
+
return __assign$7(__assign$7({}, info), { point: {
|
|
10688
10948
|
x: point.x ? point.x.get() : 0,
|
|
10689
10949
|
y: point.y ? point.y.get() : 0,
|
|
10690
10950
|
} });
|
|
@@ -10795,7 +11055,7 @@ function useDrag(props, ref, values, controls) {
|
|
|
10795
11055
|
var groupDragControls = props.dragControls;
|
|
10796
11056
|
var transformPagePoint = React.useContext(MotionPluginContext).transformPagePoint;
|
|
10797
11057
|
var dragControls = useConstant(function () { return new ComponentDragControls({ ref: ref, values: values, controls: controls }); });
|
|
10798
|
-
dragControls.updateProps(__assign(__assign({}, props), { transformPagePoint: transformPagePoint }));
|
|
11058
|
+
dragControls.updateProps(__assign$7(__assign$7({}, props), { transformPagePoint: transformPagePoint }));
|
|
10799
11059
|
React.useEffect(function () { return groupDragControls && groupDragControls.subscribe(dragControls); }, [dragControls]);
|
|
10800
11060
|
React.useEffect(function () { return dragControls.mount(ref.current); }, []);
|
|
10801
11061
|
}
|
|
@@ -10804,7 +11064,7 @@ var Drag = {
|
|
|
10804
11064
|
key: "drag",
|
|
10805
11065
|
shouldRender: function (props) { return !!props.drag; },
|
|
10806
11066
|
Component: makeRenderlessComponent(function (_a) {
|
|
10807
|
-
var innerRef = _a.innerRef, values = _a.values, controls = _a.controls, props = __rest(_a, ["innerRef", "values", "controls"]);
|
|
11067
|
+
var innerRef = _a.innerRef, values = _a.values, controls = _a.controls, props = __rest$5(_a, ["innerRef", "values", "controls"]);
|
|
10808
11068
|
return useDrag(props, innerRef, values, controls);
|
|
10809
11069
|
}),
|
|
10810
11070
|
};
|
|
@@ -10856,14 +11116,14 @@ function getVariableValue(current, element, depth) {
|
|
|
10856
11116
|
* @internal
|
|
10857
11117
|
*/
|
|
10858
11118
|
function resolveCSSVariables(values, ref, _a, transitionEnd) {
|
|
10859
|
-
var target = __rest(_a, []);
|
|
11119
|
+
var target = __rest$5(_a, []);
|
|
10860
11120
|
var element = ref.current;
|
|
10861
11121
|
if (!(element instanceof HTMLElement))
|
|
10862
11122
|
return { target: target, transitionEnd: transitionEnd };
|
|
10863
11123
|
// If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd`
|
|
10864
11124
|
// only if they change but I think this reads clearer and this isn't a performance-critical path.
|
|
10865
11125
|
if (transitionEnd) {
|
|
10866
|
-
transitionEnd = __assign({}, transitionEnd);
|
|
11126
|
+
transitionEnd = __assign$7({}, transitionEnd);
|
|
10867
11127
|
}
|
|
10868
11128
|
// Go through existing `MotionValue`s and ensure any existing CSS variables are resolved
|
|
10869
11129
|
values.forEach(function (value) {
|
|
@@ -11020,8 +11280,8 @@ var convertChangedValueTypes = function (target, values, element, elementStyler,
|
|
|
11020
11280
|
};
|
|
11021
11281
|
var checkAndConvertChangedValueTypes = function (values, ref, target, transitionEnd) {
|
|
11022
11282
|
if (transitionEnd === void 0) { transitionEnd = {}; }
|
|
11023
|
-
target = __assign({}, target);
|
|
11024
|
-
transitionEnd = __assign({}, transitionEnd);
|
|
11283
|
+
target = __assign$7({}, target);
|
|
11284
|
+
transitionEnd = __assign$7({}, transitionEnd);
|
|
11025
11285
|
var element = ref.current;
|
|
11026
11286
|
var elementStyler = index(element);
|
|
11027
11287
|
var targetPositionalKeys = Object.keys(target).filter(isPositionalKey$1);
|
|
@@ -11249,7 +11509,7 @@ function calcAxisDelta(prev, next, names) {
|
|
|
11249
11509
|
return delta;
|
|
11250
11510
|
}
|
|
11251
11511
|
function calcDelta(prev, next) {
|
|
11252
|
-
var delta = __assign(__assign({}, calcAxisDelta(prev, next, axisLabels.x)), calcAxisDelta(prev, next, axisLabels.y));
|
|
11512
|
+
var delta = __assign$7(__assign$7({}, calcAxisDelta(prev, next, axisLabels.x)), calcAxisDelta(prev, next, axisLabels.y));
|
|
11253
11513
|
return delta;
|
|
11254
11514
|
}
|
|
11255
11515
|
var offset = {
|
|
@@ -11293,7 +11553,7 @@ function getTransition(_a) {
|
|
|
11293
11553
|
return layoutTransition || positionTransition;
|
|
11294
11554
|
}
|
|
11295
11555
|
var LayoutAnimation = /** @class */ (function (_super) {
|
|
11296
|
-
__extends(LayoutAnimation, _super);
|
|
11556
|
+
__extends$2(LayoutAnimation, _super);
|
|
11297
11557
|
function LayoutAnimation() {
|
|
11298
11558
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
11299
11559
|
}
|
|
@@ -11360,11 +11620,11 @@ var LayoutAnimation = /** @class */ (function (_super) {
|
|
|
11360
11620
|
if (!delta[deltaKey])
|
|
11361
11621
|
return;
|
|
11362
11622
|
var baseTransition = typeof transitionDefinition === "boolean"
|
|
11363
|
-
? __assign({}, getDefaultLayoutTransition(isPositionOnly)) : transitionDefinition;
|
|
11623
|
+
? __assign$7({}, getDefaultLayoutTransition(isPositionOnly)) : transitionDefinition;
|
|
11364
11624
|
var value = values.get(transformKey, targetValue);
|
|
11365
11625
|
var velocity = value.getVelocity();
|
|
11366
11626
|
transition[transformKey] = baseTransition[transformKey]
|
|
11367
|
-
? __assign({}, baseTransition[transformKey]) : __assign({}, baseTransition);
|
|
11627
|
+
? __assign$7({}, baseTransition[transformKey]) : __assign$7({}, baseTransition);
|
|
11368
11628
|
if (transition[transformKey].velocity === undefined) {
|
|
11369
11629
|
transition[transformKey].velocity = velocity || 0;
|
|
11370
11630
|
}
|
|
@@ -11505,9 +11765,9 @@ var hasUpdated = function (prev, next) {
|
|
|
11505
11765
|
};
|
|
11506
11766
|
function targetWithoutTransition(_a, mergeTransitionEnd) {
|
|
11507
11767
|
if (mergeTransitionEnd === void 0) { mergeTransitionEnd = false; }
|
|
11508
|
-
var transition = _a.transition, transitionEnd = _a.transitionEnd, target = __rest(_a, ["transition", "transitionEnd"]);
|
|
11768
|
+
var transition = _a.transition, transitionEnd = _a.transitionEnd, target = __rest$5(_a, ["transition", "transitionEnd"]);
|
|
11509
11769
|
return mergeTransitionEnd
|
|
11510
|
-
? __assign(__assign({}, target), transitionEnd)
|
|
11770
|
+
? __assign$7(__assign$7({}, target), transitionEnd)
|
|
11511
11771
|
: target;
|
|
11512
11772
|
}
|
|
11513
11773
|
/**
|
|
@@ -11559,9 +11819,9 @@ function useAnimateProp(targetAndTransition, controls, values, defaultTransition
|
|
|
11559
11819
|
}
|
|
11560
11820
|
}
|
|
11561
11821
|
isInitialRender.current = false;
|
|
11562
|
-
prevValues.current = __assign(__assign({}, prevValues.current), finalTarget);
|
|
11822
|
+
prevValues.current = __assign$7(__assign$7({}, prevValues.current), finalTarget);
|
|
11563
11823
|
if (Object.keys(targetToAnimate).length) {
|
|
11564
|
-
controls.start(__assign(__assign({}, targetToAnimate), { transition: targetAndTransition.transition || defaultTransition, transitionEnd: targetAndTransition.transitionEnd }));
|
|
11824
|
+
controls.start(__assign$7(__assign$7({}, targetToAnimate), { transition: targetAndTransition.transition || defaultTransition, transitionEnd: targetAndTransition.transitionEnd }));
|
|
11565
11825
|
}
|
|
11566
11826
|
}, [targetAndTransition]);
|
|
11567
11827
|
}
|
|
@@ -11735,7 +11995,7 @@ var Exit = {
|
|
|
11735
11995
|
React.useEffect(function () {
|
|
11736
11996
|
if (!isPresent) {
|
|
11737
11997
|
if (!isPlayingExitAnimation.current && exit) {
|
|
11738
|
-
controls.setProps(__assign(__assign({}, props), { custom: custom }));
|
|
11998
|
+
controls.setProps(__assign$7(__assign$7({}, props), { custom: custom }));
|
|
11739
11999
|
controls.start(exit).then(onExitComplete);
|
|
11740
12000
|
}
|
|
11741
12001
|
isPlayingExitAnimation.current = true;
|
|
@@ -11806,7 +12066,7 @@ var buildHTMLProps = function (values, style, isStatic, isDrag) {
|
|
|
11806
12066
|
var buildSVGProps = function (values, style) {
|
|
11807
12067
|
var motionValueStyles = resolveCurrent(values);
|
|
11808
12068
|
var props = buildSVGAttrs(motionValueStyles, undefined, undefined, undefined, undefined, false);
|
|
11809
|
-
props.style = __assign(__assign({}, style), props.style);
|
|
12069
|
+
props.style = __assign$7(__assign$7({}, style), props.style);
|
|
11810
12070
|
return props;
|
|
11811
12071
|
};
|
|
11812
12072
|
var functionalityComponents = [Layout, Drag, Gestures, Exit];
|
|
@@ -11825,7 +12085,7 @@ function createDomMotionConfig(Component) {
|
|
|
11825
12085
|
var staticVisualStyles = isSVG
|
|
11826
12086
|
? buildSVGProps(values, style)
|
|
11827
12087
|
: buildHTMLProps(values, style, isStatic, !!props.drag);
|
|
11828
|
-
return React.createElement(Component, __assign(__assign(__assign({}, forwardedProps), { ref: ref }), staticVisualStyles));
|
|
12088
|
+
return React.createElement(Component, __assign$7(__assign$7(__assign$7({}, forwardedProps), { ref: ref }), staticVisualStyles));
|
|
11829
12089
|
},
|
|
11830
12090
|
/**
|
|
11831
12091
|
* loadFunctionalityComponents gets used by the `motion` component
|
|
@@ -11856,7 +12116,7 @@ function createDomMotionConfig(Component) {
|
|
|
11856
12116
|
for (var i = 0; i < numFunctionalityComponents; i++) {
|
|
11857
12117
|
var _a = functionalityComponents[i], shouldRender = _a.shouldRender, key = _a.key, Component_1 = _a.Component;
|
|
11858
12118
|
if (shouldRender(props, context)) {
|
|
11859
|
-
activeComponents.push(React.createElement(Component_1, __assign({ key: key }, props, { parentContext: context, values: values, controls: controls, innerRef: ref })));
|
|
12119
|
+
activeComponents.push(React.createElement(Component_1, __assign$7({ key: key }, props, { parentContext: context, values: values, controls: controls, innerRef: ref })));
|
|
11860
12120
|
}
|
|
11861
12121
|
}
|
|
11862
12122
|
return activeComponents;
|
|
@@ -11908,7 +12168,7 @@ var svgMotionComponents = svgElements.reduce(function (acc, Component) {
|
|
|
11908
12168
|
*
|
|
11909
12169
|
* @public
|
|
11910
12170
|
*/
|
|
11911
|
-
var motion = __assign(__assign({
|
|
12171
|
+
var motion = __assign$7(__assign$7({
|
|
11912
12172
|
/**
|
|
11913
12173
|
* Convert a custom React component into a `motion` component.
|
|
11914
12174
|
*
|
|
@@ -11960,7 +12220,7 @@ var PresenceChild = function (_a) {
|
|
|
11960
12220
|
return function () { return numPresenceChildren.current--; };
|
|
11961
12221
|
};
|
|
11962
12222
|
}, [isPresent]);
|
|
11963
|
-
return (React.createElement(PresenceContext.Provider, { value: __assign(__assign({}, context), { register: register }) }, children));
|
|
12223
|
+
return (React.createElement(PresenceContext.Provider, { value: __assign$7(__assign$7({}, context), { register: register }) }, children));
|
|
11964
12224
|
};
|
|
11965
12225
|
|
|
11966
12226
|
function getChildKey(child) {
|
|
@@ -12076,7 +12336,7 @@ var AnimatePresence = function (_a) {
|
|
|
12076
12336
|
return (React.createElement(React.Fragment, null, filteredChildren.map(function (child) { return (React.createElement(PresenceChild, { key: getChildKey(child), isPresent: true, initial: initial ? undefined : false }, child)); })));
|
|
12077
12337
|
}
|
|
12078
12338
|
// If this is a subsequent render, deal with entering and exiting children
|
|
12079
|
-
var childrenToRender = __spreadArrays(filteredChildren);
|
|
12339
|
+
var childrenToRender = __spreadArrays$2(filteredChildren);
|
|
12080
12340
|
// Diff the keys of the currently-present and target children to update our
|
|
12081
12341
|
// exiting list.
|
|
12082
12342
|
var presentKeys = presentChildren.current.map(getChildKey);
|
|
@@ -12355,7 +12615,7 @@ var general$1 = /*#__PURE__*/Object.freeze({
|
|
|
12355
12615
|
CASH_METHOD: CASH_METHOD
|
|
12356
12616
|
});
|
|
12357
12617
|
|
|
12358
|
-
var URL_TEST = /(([a-z]{3,6}:\/\/)|(^|\s))([a-zA-Z0-9\-]+\.)+[a-z]{2,13}[\.\?\=\&\%\/\w\-]*\b([^@]|$)/;
|
|
12618
|
+
var URL_TEST = /(([a-z]{3,6}:\/\/)|(^|\s))((\d{1,3}\.){3}\d{1,3}|([a-zA-Z0-9\-]+\.)+[a-z]{2,13})[\.\?\=\&\%\/\w\-]*\b([^@]|$)/;
|
|
12359
12619
|
|
|
12360
12620
|
var regex_constants = /*#__PURE__*/Object.freeze({
|
|
12361
12621
|
__proto__: null,
|
|
@@ -39683,8 +39943,7 @@ var CardText = function CardText(_ref) {
|
|
|
39683
39943
|
}, /*#__PURE__*/React__default.createElement(Cover, null, /*#__PURE__*/React__default.createElement(Stack, null, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
39684
39944
|
justify: "space-between",
|
|
39685
39945
|
align: "center",
|
|
39686
|
-
overflow: true
|
|
39687
|
-
nowrap: true
|
|
39946
|
+
overflow: true
|
|
39688
39947
|
}, titleText && /*#__PURE__*/React__default.createElement(Title$1, {
|
|
39689
39948
|
as: titleAs,
|
|
39690
39949
|
variant: titleVariant,
|