@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.esm.js
CHANGED
|
@@ -228,6 +228,58 @@ function __rest(s, e) {
|
|
|
228
228
|
t[p[i]] = s[p[i]];
|
|
229
229
|
}
|
|
230
230
|
return t;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/*! *****************************************************************************
|
|
234
|
+
Copyright (c) Microsoft Corporation.
|
|
235
|
+
|
|
236
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
237
|
+
purpose with or without fee is hereby granted.
|
|
238
|
+
|
|
239
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
240
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
241
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
242
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
243
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
244
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
245
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
246
|
+
***************************************************************************** */
|
|
247
|
+
/* global Reflect, Promise */
|
|
248
|
+
|
|
249
|
+
var extendStatics$1 = function(d, b) {
|
|
250
|
+
extendStatics$1 = Object.setPrototypeOf ||
|
|
251
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
252
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
253
|
+
return extendStatics$1(d, b);
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
function __extends$1(d, b) {
|
|
257
|
+
extendStatics$1(d, b);
|
|
258
|
+
function __() { this.constructor = d; }
|
|
259
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
var __assign$1 = function() {
|
|
263
|
+
__assign$1 = Object.assign || function __assign(t) {
|
|
264
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
265
|
+
s = arguments[i];
|
|
266
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
267
|
+
}
|
|
268
|
+
return t;
|
|
269
|
+
};
|
|
270
|
+
return __assign$1.apply(this, arguments);
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
function __rest$1(s, e) {
|
|
274
|
+
var t = {};
|
|
275
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
276
|
+
t[p] = s[p];
|
|
277
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
278
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
279
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
280
|
+
t[p[i]] = s[p[i]];
|
|
281
|
+
}
|
|
282
|
+
return t;
|
|
231
283
|
}
|
|
232
284
|
|
|
233
285
|
function __spreadArrays() {
|
|
@@ -238,6 +290,32 @@ function __spreadArrays() {
|
|
|
238
290
|
return r;
|
|
239
291
|
}
|
|
240
292
|
|
|
293
|
+
/*! *****************************************************************************
|
|
294
|
+
Copyright (c) Microsoft Corporation.
|
|
295
|
+
|
|
296
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
297
|
+
purpose with or without fee is hereby granted.
|
|
298
|
+
|
|
299
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
300
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
301
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
302
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
303
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
304
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
305
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
306
|
+
***************************************************************************** */
|
|
307
|
+
|
|
308
|
+
var __assign$2 = function() {
|
|
309
|
+
__assign$2 = Object.assign || function __assign(t) {
|
|
310
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
311
|
+
s = arguments[i];
|
|
312
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
313
|
+
}
|
|
314
|
+
return t;
|
|
315
|
+
};
|
|
316
|
+
return __assign$2.apply(this, arguments);
|
|
317
|
+
};
|
|
318
|
+
|
|
241
319
|
var clamp = function (min, max) { return function (v) {
|
|
242
320
|
return Math.max(Math.min(v, max), min);
|
|
243
321
|
}; };
|
|
@@ -251,8 +329,8 @@ var number = {
|
|
|
251
329
|
parse: parseFloat,
|
|
252
330
|
transform: function (v) { return v; }
|
|
253
331
|
};
|
|
254
|
-
var alpha = __assign(__assign({}, number), { transform: clamp(0, 1) });
|
|
255
|
-
var scale = __assign(__assign({}, number), { default: 1 });
|
|
332
|
+
var alpha = __assign$2(__assign$2({}, number), { transform: clamp(0, 1) });
|
|
333
|
+
var scale = __assign$2(__assign$2({}, number), { default: 1 });
|
|
256
334
|
|
|
257
335
|
var createUnitType = function (unit) { return ({
|
|
258
336
|
test: function (v) {
|
|
@@ -266,7 +344,7 @@ var percent = createUnitType('%');
|
|
|
266
344
|
var px = createUnitType('px');
|
|
267
345
|
var vh = createUnitType('vh');
|
|
268
346
|
var vw = createUnitType('vw');
|
|
269
|
-
var progressPercentage = __assign(__assign({}, percent), { parse: function (v) { return percent.parse(v) / 100; }, transform: function (v) { return percent.transform(v * 100); } });
|
|
347
|
+
var progressPercentage = __assign$2(__assign$2({}, percent), { parse: function (v) { return percent.parse(v) / 100; }, transform: function (v) { return percent.transform(v * 100); } });
|
|
270
348
|
|
|
271
349
|
var getValueFromFunctionString = function (value) {
|
|
272
350
|
return value.substring(value.indexOf('(') + 1, value.lastIndexOf(')'));
|
|
@@ -300,7 +378,7 @@ var hslaTemplate = function (_a) {
|
|
|
300
378
|
var hue = _a.hue, saturation = _a.saturation, lightness = _a.lightness, _b = _a.alpha, alpha = _b === void 0 ? 1 : _b;
|
|
301
379
|
return "hsla(" + hue + ", " + saturation + ", " + lightness + ", " + alpha + ")";
|
|
302
380
|
};
|
|
303
|
-
var rgbUnit = __assign(__assign({}, number), { transform: function (v) { return Math.round(clampRgbUnit(v)); } });
|
|
381
|
+
var rgbUnit = __assign$2(__assign$2({}, number), { transform: function (v) { return Math.round(clampRgbUnit(v)); } });
|
|
304
382
|
function isColorString(color, colorType) {
|
|
305
383
|
return color.startsWith(colorType) && singleColorRegex.test(color);
|
|
306
384
|
}
|
|
@@ -330,7 +408,7 @@ var hsla = {
|
|
|
330
408
|
});
|
|
331
409
|
}
|
|
332
410
|
};
|
|
333
|
-
var hex = __assign(__assign({}, rgba), { test: function (v) { return typeof v === 'string' && isColorString(v, '#'); }, parse: function (v) {
|
|
411
|
+
var hex = __assign$2(__assign$2({}, rgba), { test: function (v) { return typeof v === 'string' && isColorString(v, '#'); }, parse: function (v) {
|
|
334
412
|
var r = '';
|
|
335
413
|
var g = '';
|
|
336
414
|
var b = '';
|
|
@@ -866,15 +944,15 @@ See the Apache Version 2.0 License for specific language governing permissions
|
|
|
866
944
|
and limitations under the License.
|
|
867
945
|
***************************************************************************** */
|
|
868
946
|
|
|
869
|
-
var __assign$
|
|
870
|
-
__assign$
|
|
947
|
+
var __assign$3 = function() {
|
|
948
|
+
__assign$3 = Object.assign || function __assign(t) {
|
|
871
949
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
872
950
|
s = arguments[i];
|
|
873
951
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
874
952
|
}
|
|
875
953
|
return t;
|
|
876
954
|
};
|
|
877
|
-
return __assign$
|
|
955
|
+
return __assign$3.apply(this, arguments);
|
|
878
956
|
};
|
|
879
957
|
|
|
880
958
|
var mixLinearColor = function (from, to, v) {
|
|
@@ -897,7 +975,7 @@ var mixColor = (function (from, to) {
|
|
|
897
975
|
invariant(fromColorType.transform === toColorType.transform, 'Both colors must be hex/RGBA, OR both must be HSLA.');
|
|
898
976
|
var fromColor = fromColorType.parse(from);
|
|
899
977
|
var toColor = toColorType.parse(to);
|
|
900
|
-
var blended = __assign$
|
|
978
|
+
var blended = __assign$3({}, fromColor);
|
|
901
979
|
var mixFunc = fromColorType === hsla ? mix : mixLinearColor;
|
|
902
980
|
return function (v) {
|
|
903
981
|
for (var key in blended) {
|
|
@@ -942,7 +1020,7 @@ var mixArray = function (from, to) {
|
|
|
942
1020
|
};
|
|
943
1021
|
};
|
|
944
1022
|
var mixObject = function (origin, target) {
|
|
945
|
-
var output = __assign$
|
|
1023
|
+
var output = __assign$3({}, origin, target);
|
|
946
1024
|
var blendValue = {};
|
|
947
1025
|
for (var key in output) {
|
|
948
1026
|
if (origin[key] !== undefined && target[key] !== undefined) {
|
|
@@ -1154,6 +1232,44 @@ var wrap$1 = curryRange(wrap);
|
|
|
1154
1232
|
|
|
1155
1233
|
var clampProgress = clamp$1$1(0, 1);
|
|
1156
1234
|
|
|
1235
|
+
/*! *****************************************************************************
|
|
1236
|
+
Copyright (c) Microsoft Corporation.
|
|
1237
|
+
|
|
1238
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
1239
|
+
purpose with or without fee is hereby granted.
|
|
1240
|
+
|
|
1241
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1242
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1243
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1244
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1245
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1246
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1247
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
1248
|
+
***************************************************************************** */
|
|
1249
|
+
|
|
1250
|
+
var __assign$4 = function() {
|
|
1251
|
+
__assign$4 = Object.assign || function __assign(t) {
|
|
1252
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
1253
|
+
s = arguments[i];
|
|
1254
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
1255
|
+
}
|
|
1256
|
+
return t;
|
|
1257
|
+
};
|
|
1258
|
+
return __assign$4.apply(this, arguments);
|
|
1259
|
+
};
|
|
1260
|
+
|
|
1261
|
+
function __rest$2(s, e) {
|
|
1262
|
+
var t = {};
|
|
1263
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1264
|
+
t[p] = s[p];
|
|
1265
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1266
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1267
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1268
|
+
t[p[i]] = s[p[i]];
|
|
1269
|
+
}
|
|
1270
|
+
return t;
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1157
1273
|
var createStyler = function (_a) {
|
|
1158
1274
|
var onRead = _a.onRead,
|
|
1159
1275
|
onRender = _a.onRender,
|
|
@@ -1165,7 +1281,7 @@ var createStyler = function (_a) {
|
|
|
1165
1281
|
if (_a === void 0) {
|
|
1166
1282
|
_a = {};
|
|
1167
1283
|
}
|
|
1168
|
-
var props = __rest(_a, []);
|
|
1284
|
+
var props = __rest$2(_a, []);
|
|
1169
1285
|
var state = {};
|
|
1170
1286
|
var changedValues = [];
|
|
1171
1287
|
var hasChanged = false;
|
|
@@ -1285,7 +1401,7 @@ function isTransformOriginProp(key) {
|
|
|
1285
1401
|
return transformOriginProps.has(key);
|
|
1286
1402
|
}
|
|
1287
1403
|
|
|
1288
|
-
var int = /*#__PURE__*/__assign( /*#__PURE__*/__assign({}, number), { transform: Math.round });
|
|
1404
|
+
var int = /*#__PURE__*/__assign$4( /*#__PURE__*/__assign$4({}, number), { transform: Math.round });
|
|
1289
1405
|
var valueTypes = {
|
|
1290
1406
|
color: color,
|
|
1291
1407
|
backgroundColor: color,
|
|
@@ -1517,8 +1633,8 @@ function createCssStyler(element, _a) {
|
|
|
1517
1633
|
}
|
|
1518
1634
|
var enableHardwareAcceleration = _a.enableHardwareAcceleration,
|
|
1519
1635
|
allowTransformNone = _a.allowTransformNone,
|
|
1520
|
-
props = __rest(_a, ["enableHardwareAcceleration", "allowTransformNone"]);
|
|
1521
|
-
return cssStyler(__assign({ element: element, buildStyles: createStyleBuilder({
|
|
1636
|
+
props = __rest$2(_a, ["enableHardwareAcceleration", "allowTransformNone"]);
|
|
1637
|
+
return cssStyler(__assign$4({ element: element, buildStyles: createStyleBuilder({
|
|
1522
1638
|
enableHardwareAcceleration: enableHardwareAcceleration,
|
|
1523
1639
|
allowTransformNone: allowTransformNone
|
|
1524
1640
|
}), preparseOutput: true }, props));
|
|
@@ -1568,7 +1684,7 @@ function buildSVGAttrs(_a, dimensions, totalPathLength, cssBuilder, attrs, isDas
|
|
|
1568
1684
|
pathSpacing = _b === void 0 ? 1 : _b,
|
|
1569
1685
|
_c = _a.pathOffset,
|
|
1570
1686
|
pathOffset = _c === void 0 ? 0 : _c,
|
|
1571
|
-
state = __rest(_a, ["attrX", "attrY", "originX", "originY", "pathLength", "pathSpacing", "pathOffset"]);
|
|
1687
|
+
state = __rest$2(_a, ["attrX", "attrY", "originX", "originY", "pathLength", "pathSpacing", "pathOffset"]);
|
|
1572
1688
|
var style = cssBuilder(state);
|
|
1573
1689
|
for (var key in style) {
|
|
1574
1690
|
if (key === 'transform') {
|
|
@@ -1697,7 +1813,7 @@ var Chainable = /*#__PURE__*/function () {
|
|
|
1697
1813
|
this.props = props;
|
|
1698
1814
|
}
|
|
1699
1815
|
Chainable.prototype.applyMiddleware = function (middleware) {
|
|
1700
|
-
return this.create(__assign(__assign({}, this.props), { middleware: this.props.middleware ? __spreadArrays([middleware], this.props.middleware) : [middleware] }));
|
|
1816
|
+
return this.create(__assign$1(__assign$1({}, this.props), { middleware: this.props.middleware ? __spreadArrays([middleware], this.props.middleware) : [middleware] }));
|
|
1701
1817
|
};
|
|
1702
1818
|
Chainable.prototype.pipe = function () {
|
|
1703
1819
|
var funcs = [];
|
|
@@ -1769,7 +1885,7 @@ var createObserver = function (observerCandidate, _a, onComplete) {
|
|
|
1769
1885
|
};
|
|
1770
1886
|
|
|
1771
1887
|
var Action = /*#__PURE__*/function (_super) {
|
|
1772
|
-
__extends(Action, _super);
|
|
1888
|
+
__extends$1(Action, _super);
|
|
1773
1889
|
function Action() {
|
|
1774
1890
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
1775
1891
|
}
|
|
@@ -1788,13 +1904,13 @@ var Action = /*#__PURE__*/function (_super) {
|
|
|
1788
1904
|
};
|
|
1789
1905
|
var _a = this.props,
|
|
1790
1906
|
init = _a.init,
|
|
1791
|
-
observerProps = __rest(_a, ["init"]);
|
|
1907
|
+
observerProps = __rest$1(_a, ["init"]);
|
|
1792
1908
|
var observer = createObserver(observerCandidate, observerProps, function () {
|
|
1793
1909
|
isComplete = true;
|
|
1794
1910
|
subscription.stop();
|
|
1795
1911
|
});
|
|
1796
1912
|
var api = init(observer);
|
|
1797
|
-
subscription = api ? __assign(__assign({}, subscription), api) : subscription;
|
|
1913
|
+
subscription = api ? __assign$1(__assign$1({}, subscription), api) : subscription;
|
|
1798
1914
|
if (observerCandidate.registerParent) {
|
|
1799
1915
|
observerCandidate.registerParent(subscription);
|
|
1800
1916
|
}
|
|
@@ -1808,7 +1924,7 @@ var action = function (init) {
|
|
|
1808
1924
|
};
|
|
1809
1925
|
|
|
1810
1926
|
var BaseMulticast = /*#__PURE__*/function (_super) {
|
|
1811
|
-
__extends(BaseMulticast, _super);
|
|
1927
|
+
__extends$1(BaseMulticast, _super);
|
|
1812
1928
|
function BaseMulticast() {
|
|
1813
1929
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1814
1930
|
_this.subscribers = [];
|
|
@@ -1868,7 +1984,7 @@ var isSingleValue = function (v) {
|
|
|
1868
1984
|
return typeOfV === 'string' || typeOfV === 'number';
|
|
1869
1985
|
};
|
|
1870
1986
|
var ValueReaction = /*#__PURE__*/function (_super) {
|
|
1871
|
-
__extends(ValueReaction, _super);
|
|
1987
|
+
__extends$1(ValueReaction, _super);
|
|
1872
1988
|
function ValueReaction(props) {
|
|
1873
1989
|
var _this = _super.call(this, props) || this;
|
|
1874
1990
|
_this.scheduleVelocityCheck = function () {
|
|
@@ -2118,7 +2234,7 @@ var reduceArrayValue = function (i) {
|
|
|
2118
2234
|
var createArrayAction = function (action, props, vectorKeys) {
|
|
2119
2235
|
var firstVectorKey = vectorKeys[0];
|
|
2120
2236
|
var actionList = props[firstVectorKey].map(function (v, i) {
|
|
2121
|
-
var childActionProps = vectorKeys.reduce(reduceArrayValue(i), __assign({}, props));
|
|
2237
|
+
var childActionProps = vectorKeys.reduce(reduceArrayValue(i), __assign$1({}, props));
|
|
2122
2238
|
return getActionCreator(v)(action, childActionProps);
|
|
2123
2239
|
});
|
|
2124
2240
|
return parallel$1.apply(void 0, actionList);
|
|
@@ -2132,7 +2248,7 @@ var reduceObjectValue = function (key) {
|
|
|
2132
2248
|
var createObjectAction = function (action, props, vectorKeys) {
|
|
2133
2249
|
var firstVectorKey = vectorKeys[0];
|
|
2134
2250
|
var actionMap = Object.keys(props[firstVectorKey]).reduce(function (map, key) {
|
|
2135
|
-
var childActionProps = vectorKeys.reduce(reduceObjectValue(key), __assign({}, props));
|
|
2251
|
+
var childActionProps = vectorKeys.reduce(reduceObjectValue(key), __assign$1({}, props));
|
|
2136
2252
|
map[key] = getActionCreator(props[firstVectorKey][key])(action, childActionProps);
|
|
2137
2253
|
return map;
|
|
2138
2254
|
}, {});
|
|
@@ -2141,18 +2257,18 @@ var createObjectAction = function (action, props, vectorKeys) {
|
|
|
2141
2257
|
var createUnitAction = function (action, _a) {
|
|
2142
2258
|
var from = _a.from,
|
|
2143
2259
|
to = _a.to,
|
|
2144
|
-
props = __rest(_a, ["from", "to"]);
|
|
2260
|
+
props = __rest$1(_a, ["from", "to"]);
|
|
2145
2261
|
var unitType = findUnitType(from) || findUnitType(to);
|
|
2146
2262
|
var transform = unitType.transform,
|
|
2147
2263
|
parse = unitType.parse;
|
|
2148
|
-
return action(__assign(__assign({}, props), { from: typeof from === 'string' ? parse(from) : from, to: typeof to === 'string' ? parse(to) : to })).pipe(transform);
|
|
2264
|
+
return action(__assign$1(__assign$1({}, props), { from: typeof from === 'string' ? parse(from) : from, to: typeof to === 'string' ? parse(to) : to })).pipe(transform);
|
|
2149
2265
|
};
|
|
2150
2266
|
var createMixerAction = function (mixer) {
|
|
2151
2267
|
return function (action, _a) {
|
|
2152
2268
|
var from = _a.from,
|
|
2153
2269
|
to = _a.to,
|
|
2154
|
-
props = __rest(_a, ["from", "to"]);
|
|
2155
|
-
return action(__assign(__assign({}, props), { from: 0, to: 1 })).pipe(mixer(from, to));
|
|
2270
|
+
props = __rest$1(_a, ["from", "to"]);
|
|
2271
|
+
return action(__assign$1(__assign$1({}, props), { from: 0, to: 1 })).pipe(mixer(from, to));
|
|
2156
2272
|
};
|
|
2157
2273
|
};
|
|
2158
2274
|
var createColorAction = /*#__PURE__*/createMixerAction(mixColor);
|
|
@@ -2498,7 +2614,7 @@ var keyframes = function (_a) {
|
|
|
2498
2614
|
ease = _b === void 0 ? linear : _b,
|
|
2499
2615
|
times = _a.times,
|
|
2500
2616
|
values = _a.values,
|
|
2501
|
-
tweenProps = __rest(_a, ["easings", "ease", "times", "values"]);
|
|
2617
|
+
tweenProps = __rest$1(_a, ["easings", "ease", "times", "values"]);
|
|
2502
2618
|
easings = Array.isArray(easings) ? easings : defaultEasings(values, easings);
|
|
2503
2619
|
times = times || defaultTimings(values);
|
|
2504
2620
|
var scrubbers = easings.map(function (easing, i) {
|
|
@@ -2508,7 +2624,7 @@ var keyframes = function (_a) {
|
|
|
2508
2624
|
ease: easing
|
|
2509
2625
|
});
|
|
2510
2626
|
});
|
|
2511
|
-
return tween(__assign(__assign({}, tweenProps), { ease: ease })).applyMiddleware(function (update) {
|
|
2627
|
+
return tween(__assign$1(__assign$1({}, tweenProps), { ease: ease })).applyMiddleware(function (update) {
|
|
2512
2628
|
return interpolateScrubbers(times, scrubbers, update);
|
|
2513
2629
|
});
|
|
2514
2630
|
};
|
|
@@ -2752,7 +2868,7 @@ var index$1 = function (_a) {
|
|
|
2752
2868
|
}
|
|
2753
2869
|
var x = _a.x,
|
|
2754
2870
|
y = _a.y,
|
|
2755
|
-
props = __rest(_a, ["x", "y"]);
|
|
2871
|
+
props = __rest$1(_a, ["x", "y"]);
|
|
2756
2872
|
if (x !== undefined || y !== undefined) {
|
|
2757
2873
|
var applyXOffset_1 = applyOffset(x || 0);
|
|
2758
2874
|
var applyYOffset_1 = applyOffset(y || 0);
|
|
@@ -2826,7 +2942,7 @@ var steps$1 = function (st, min, max) {
|
|
|
2826
2942
|
};
|
|
2827
2943
|
var transformMap = function (childTransformers) {
|
|
2828
2944
|
return function (v) {
|
|
2829
|
-
var output = __assign({}, v);
|
|
2945
|
+
var output = __assign$1({}, v);
|
|
2830
2946
|
for (var key in childTransformers) {
|
|
2831
2947
|
if (childTransformers.hasOwnProperty(key)) {
|
|
2832
2948
|
var childTransformer = childTransformers[key];
|
|
@@ -2857,6 +2973,52 @@ var transformers = /*#__PURE__*/Object.freeze({
|
|
|
2857
2973
|
transformMap: transformMap
|
|
2858
2974
|
});
|
|
2859
2975
|
|
|
2976
|
+
/*! *****************************************************************************
|
|
2977
|
+
Copyright (c) Microsoft Corporation.
|
|
2978
|
+
|
|
2979
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
2980
|
+
purpose with or without fee is hereby granted.
|
|
2981
|
+
|
|
2982
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
2983
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
2984
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
2985
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
2986
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2987
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2988
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
2989
|
+
***************************************************************************** */
|
|
2990
|
+
|
|
2991
|
+
var __assign$5 = function() {
|
|
2992
|
+
__assign$5 = Object.assign || function __assign(t) {
|
|
2993
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
2994
|
+
s = arguments[i];
|
|
2995
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
2996
|
+
}
|
|
2997
|
+
return t;
|
|
2998
|
+
};
|
|
2999
|
+
return __assign$5.apply(this, arguments);
|
|
3000
|
+
};
|
|
3001
|
+
|
|
3002
|
+
function __rest$3(s, e) {
|
|
3003
|
+
var t = {};
|
|
3004
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3005
|
+
t[p] = s[p];
|
|
3006
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
3007
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
3008
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
3009
|
+
t[p[i]] = s[p[i]];
|
|
3010
|
+
}
|
|
3011
|
+
return t;
|
|
3012
|
+
}
|
|
3013
|
+
|
|
3014
|
+
function __spreadArrays$1() {
|
|
3015
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
3016
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
3017
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
3018
|
+
r[k] = a[j];
|
|
3019
|
+
return r;
|
|
3020
|
+
}
|
|
3021
|
+
|
|
2860
3022
|
var getPoseValues = function (_a) {
|
|
2861
3023
|
var transition = _a.transition,
|
|
2862
3024
|
flip = _a.flip,
|
|
@@ -2869,7 +3031,7 @@ var getPoseValues = function (_a) {
|
|
|
2869
3031
|
preTransition = _a.preTransition,
|
|
2870
3032
|
applyAtStart = _a.applyAtStart,
|
|
2871
3033
|
applyAtEnd = _a.applyAtEnd,
|
|
2872
|
-
props = __rest(_a, ["transition", "flip", "delay", "delayChildren", "staggerChildren", "staggerDirection", "afterChildren", "beforeChildren", "preTransition", "applyAtStart", "applyAtEnd"]);
|
|
3034
|
+
props = __rest$3(_a, ["transition", "flip", "delay", "delayChildren", "staggerChildren", "staggerDirection", "afterChildren", "beforeChildren", "preTransition", "applyAtStart", "applyAtEnd"]);
|
|
2873
3035
|
return props;
|
|
2874
3036
|
};
|
|
2875
3037
|
var selectPoses = function (_a) {
|
|
@@ -2881,7 +3043,7 @@ var selectPoses = function (_a) {
|
|
|
2881
3043
|
onChange = _a.onChange,
|
|
2882
3044
|
passive = _a.passive,
|
|
2883
3045
|
initialPose = _a.initialPose,
|
|
2884
|
-
poses = __rest(_a, ["label", "props", "values", "parentValues", "ancestorValues", "onChange", "passive", "initialPose"]);
|
|
3046
|
+
poses = __rest$3(_a, ["label", "props", "values", "parentValues", "ancestorValues", "onChange", "passive", "initialPose"]);
|
|
2885
3047
|
return poses;
|
|
2886
3048
|
};
|
|
2887
3049
|
var selectAllValues = function (values, selectValue) {
|
|
@@ -2981,7 +3143,7 @@ var createPoseSetter = function (setterProps) {
|
|
|
2981
3143
|
var _a = nextProps.delay,
|
|
2982
3144
|
delay = _a === void 0 ? 0 : _a;
|
|
2983
3145
|
var hasChildren = children.size;
|
|
2984
|
-
var baseTransitionProps = __assign(__assign({}, props), nextProps);
|
|
3146
|
+
var baseTransitionProps = __assign$5(__assign$5({}, props), nextProps);
|
|
2985
3147
|
var nextPose = poses[next];
|
|
2986
3148
|
var getChildAnimations = function () {
|
|
2987
3149
|
return hasChildren && propagate ? startChildAnimations(children, next, nextPose, baseTransitionProps) : [];
|
|
@@ -3007,11 +3169,11 @@ var createPoseSetter = function (setterProps) {
|
|
|
3007
3169
|
valuePoses.splice(insertionIndex, 0, next);
|
|
3008
3170
|
return insertionIndex === 0 ? new Promise(function (complete) {
|
|
3009
3171
|
var value = values.get(key);
|
|
3010
|
-
var transitionProps = __assign(__assign({}, baseTransitionProps), { key: key,
|
|
3172
|
+
var transitionProps = __assign$5(__assign$5({}, baseTransitionProps), { key: key,
|
|
3011
3173
|
value: value });
|
|
3012
3174
|
var target = resolveTarget(value, resolveProp(nextPose[key], transitionProps));
|
|
3013
3175
|
if (activeActions.has(key)) stopAction(activeActions.get(key));
|
|
3014
|
-
var resolveTransitionProps = __assign(__assign({ to: target }, transitionProps), getTransitionProps(value, target, transitionProps));
|
|
3176
|
+
var resolveTransitionProps = __assign$5(__assign$5({ to: target }, transitionProps), getTransitionProps(value, target, transitionProps));
|
|
3015
3177
|
var transition = resolveTransition(getTransition, key, value, resolveTransitionProps, convertTransitionDefinition, getInstantTransition);
|
|
3016
3178
|
var poseDelay = delay || resolveProp(nextPose.delay, transitionProps);
|
|
3017
3179
|
if (poseDelay) {
|
|
@@ -3035,7 +3197,7 @@ var createPoseSetter = function (setterProps) {
|
|
|
3035
3197
|
});
|
|
3036
3198
|
}
|
|
3037
3199
|
}
|
|
3038
|
-
return Promise.all(__spreadArrays(getParentAnimations(), getChildAnimations()));
|
|
3200
|
+
return Promise.all(__spreadArrays$1(getParentAnimations(), getChildAnimations()));
|
|
3039
3201
|
};
|
|
3040
3202
|
};
|
|
3041
3203
|
|
|
@@ -3161,7 +3323,7 @@ var createValueMap = function (props) {
|
|
|
3161
3323
|
};
|
|
3162
3324
|
|
|
3163
3325
|
var applyDefaultTransition = function (pose, key, defaultTransitions) {
|
|
3164
|
-
return __assign(__assign({}, pose), { transition: defaultTransitions.has(key) ? defaultTransitions.get(key) : defaultTransitions.get('default') });
|
|
3326
|
+
return __assign$5(__assign$5({}, pose), { transition: defaultTransitions.has(key) ? defaultTransitions.get(key) : defaultTransitions.get('default') });
|
|
3165
3327
|
};
|
|
3166
3328
|
var generateTransitions = function (poses, defaultTransitions) {
|
|
3167
3329
|
Object.keys(poses).forEach(function (key) {
|
|
@@ -3215,7 +3377,7 @@ var poseFactory = function (_a) {
|
|
|
3215
3377
|
var poses = generateTransitions(selectPoses(config), defaultTransitions);
|
|
3216
3378
|
var _b = config.props,
|
|
3217
3379
|
props = _b === void 0 ? {} : _b;
|
|
3218
|
-
if (getDefaultProps) props = __assign(__assign({}, getDefaultProps(config)), props);
|
|
3380
|
+
if (getDefaultProps) props = __assign$5(__assign$5({}, getDefaultProps(config)), props);
|
|
3219
3381
|
var passive = config.passive,
|
|
3220
3382
|
userSetValues = config.values,
|
|
3221
3383
|
_c = config.initialPose,
|
|
@@ -3290,10 +3452,10 @@ var poseFactory = function (_a) {
|
|
|
3290
3452
|
},
|
|
3291
3453
|
has: has,
|
|
3292
3454
|
setProps: function (newProps) {
|
|
3293
|
-
return state.props = __assign(__assign({}, state.props), newProps);
|
|
3455
|
+
return state.props = __assign$5(__assign$5({}, state.props), newProps);
|
|
3294
3456
|
},
|
|
3295
3457
|
_addChild: function (childConfig, factory) {
|
|
3296
|
-
var child = factory(__assign(__assign({ initialPose: initialPose }, childConfig), { ancestorValues: __spreadArrays([{ label: config.label, values: values }], ancestorValues) }));
|
|
3458
|
+
var child = factory(__assign$5(__assign$5({ initialPose: initialPose }, childConfig), { ancestorValues: __spreadArrays$1([{ label: config.label, values: values }], ancestorValues) }));
|
|
3297
3459
|
children.add(child);
|
|
3298
3460
|
return child;
|
|
3299
3461
|
},
|
|
@@ -3332,18 +3494,18 @@ See the Apache Version 2.0 License for specific language governing permissions
|
|
|
3332
3494
|
and limitations under the License.
|
|
3333
3495
|
***************************************************************************** */
|
|
3334
3496
|
|
|
3335
|
-
var __assign$
|
|
3336
|
-
__assign$
|
|
3497
|
+
var __assign$6 = function () {
|
|
3498
|
+
__assign$6 = Object.assign || function __assign(t) {
|
|
3337
3499
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3338
3500
|
s = arguments[i];
|
|
3339
3501
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
3340
3502
|
}
|
|
3341
3503
|
return t;
|
|
3342
3504
|
};
|
|
3343
|
-
return __assign$
|
|
3505
|
+
return __assign$6.apply(this, arguments);
|
|
3344
3506
|
};
|
|
3345
3507
|
|
|
3346
|
-
function __rest$
|
|
3508
|
+
function __rest$4(s, e) {
|
|
3347
3509
|
var t = {};
|
|
3348
3510
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
3349
3511
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
@@ -3460,12 +3622,12 @@ var intelligentTransition = {
|
|
|
3460
3622
|
opacity: linearTween,
|
|
3461
3623
|
default: tween
|
|
3462
3624
|
};
|
|
3463
|
-
var dragAction = /*#__PURE__*/__assign$
|
|
3625
|
+
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) });
|
|
3464
3626
|
var justAxis = function (_a) {
|
|
3465
3627
|
var from = _a.from;
|
|
3466
3628
|
return just(from);
|
|
3467
3629
|
};
|
|
3468
|
-
var intelligentDragEnd = /*#__PURE__*/__assign$
|
|
3630
|
+
var intelligentDragEnd = /*#__PURE__*/__assign$6( /*#__PURE__*/__assign$6({}, intelligentTransition), { x: justAxis, y: justAxis });
|
|
3469
3631
|
var defaultTransitions = /*#__PURE__*/new Map([['default', intelligentTransition], ['drag', dragAction], ['dragEnd', intelligentDragEnd]]);
|
|
3470
3632
|
|
|
3471
3633
|
var animationLookup = {
|
|
@@ -3535,7 +3697,7 @@ var getAction = function (v, _a, _b) {
|
|
|
3535
3697
|
var _c = _a.type,
|
|
3536
3698
|
type = _c === void 0 ? 'tween' : _c,
|
|
3537
3699
|
definedEase = _a.ease,
|
|
3538
|
-
def = __rest$
|
|
3700
|
+
def = __rest$4(_a, ["type", "ease"]);
|
|
3539
3701
|
invariant(animationLookup[type] !== undefined, "Invalid transition type '" + type + "'. Valid transition types are: tween, spring, decay, physics and keyframes.");
|
|
3540
3702
|
var ease;
|
|
3541
3703
|
if (type === 'tween') {
|
|
@@ -3560,7 +3722,7 @@ var getAction = function (v, _a, _b) {
|
|
|
3560
3722
|
velocity: velocity,
|
|
3561
3723
|
ease: ease
|
|
3562
3724
|
} : { ease: ease };
|
|
3563
|
-
return animationLookup[type](__assign$
|
|
3725
|
+
return animationLookup[type](__assign$6(__assign$6({}, baseProps), def));
|
|
3564
3726
|
};
|
|
3565
3727
|
var isAction = function (action$$1) {
|
|
3566
3728
|
return typeof action$$1.start !== 'undefined';
|
|
@@ -3645,7 +3807,7 @@ var pose = function (_a) {
|
|
|
3645
3807
|
min = def.min,
|
|
3646
3808
|
max = def.max,
|
|
3647
3809
|
round = def.round,
|
|
3648
|
-
remainingDef = __rest$
|
|
3810
|
+
remainingDef = __rest$4(def, ["delay", "min", "max", "round"]);
|
|
3649
3811
|
var action$$1 = getAction(val, remainingDef, props);
|
|
3650
3812
|
var outputPipe = [];
|
|
3651
3813
|
if (delay$$1) action$$1 = addActionDelay(delay$$1, action$$1);
|
|
@@ -3827,7 +3989,7 @@ var explicitlyFlipPose = function (state, nextPose) {
|
|
|
3827
3989
|
bottom = nextPose.bottom,
|
|
3828
3990
|
right = nextPose.right,
|
|
3829
3991
|
position = nextPose.position,
|
|
3830
|
-
remainingPose = __rest$
|
|
3992
|
+
remainingPose = __rest$4(nextPose, ["width", "height", "top", "left", "bottom", "right", "position"]);
|
|
3831
3993
|
var propsToSet = positionalProps.concat('position').reduce(function (acc, key) {
|
|
3832
3994
|
if (nextPose[key] !== undefined) {
|
|
3833
3995
|
acc[key] = resolveProp$1(nextPose[key], state.props);
|
|
@@ -3939,7 +4101,7 @@ var convertPositionalUnits = function (state, nextPose) {
|
|
|
3939
4101
|
changedPositionalKeys.push(key);
|
|
3940
4102
|
if (!applyAtEndHasBeenCopied) {
|
|
3941
4103
|
applyAtEndHasBeenCopied = true;
|
|
3942
|
-
nextPose.applyAtEnd = nextPose.applyAtEnd ? __assign$
|
|
4104
|
+
nextPose.applyAtEnd = nextPose.applyAtEnd ? __assign$6({}, nextPose.applyAtEnd) : {};
|
|
3943
4105
|
}
|
|
3944
4106
|
nextPose.applyAtEnd[key] = nextPose.applyAtEnd[key] || nextPose[key];
|
|
3945
4107
|
setValue(state, key, to);
|
|
@@ -3995,8 +4157,8 @@ var createPoseConfig = function (element, _a) {
|
|
|
3995
4157
|
focusable = _a.focusable,
|
|
3996
4158
|
pressable = _a.pressable,
|
|
3997
4159
|
dragBounds = _a.dragBounds,
|
|
3998
|
-
config = __rest$
|
|
3999
|
-
var poseConfig = __assign$
|
|
4160
|
+
config = __rest$4(_a, ["onDragStart", "onDragEnd", "onPressStart", "onPressEnd", "draggable", "hoverable", "focusable", "pressable", "dragBounds"]);
|
|
4161
|
+
var poseConfig = __assign$6(__assign$6({ flip: {} }, config), { props: __assign$6(__assign$6({}, config.props), { onDragStart: onDragStart,
|
|
4000
4162
|
onDragEnd: onDragEnd,
|
|
4001
4163
|
onPressStart: onPressStart,
|
|
4002
4164
|
onPressEnd: onPressEnd,
|
|
@@ -4010,8 +4172,8 @@ var createPoseConfig = function (element, _a) {
|
|
|
4010
4172
|
var _b = dragPoses(draggable),
|
|
4011
4173
|
drag = _b.drag,
|
|
4012
4174
|
dragEnd = _b.dragEnd;
|
|
4013
|
-
poseConfig.drag = __assign$
|
|
4014
|
-
poseConfig.dragEnd = __assign$
|
|
4175
|
+
poseConfig.drag = __assign$6(__assign$6({}, drag), poseConfig.drag);
|
|
4176
|
+
poseConfig.dragEnd = __assign$6(__assign$6({}, dragEnd), poseConfig.dragEnd);
|
|
4015
4177
|
}
|
|
4016
4178
|
return poseConfig;
|
|
4017
4179
|
};
|
|
@@ -4019,7 +4181,7 @@ var domPose = /*#__PURE__*/pose({
|
|
|
4019
4181
|
posePriority: ['drag', 'press', 'focus', 'hover'],
|
|
4020
4182
|
transformPose: function (_a, name, state) {
|
|
4021
4183
|
var flip = _a.flip,
|
|
4022
|
-
pose$$1 = __rest$
|
|
4184
|
+
pose$$1 = __rest$4(_a, ["flip"]);
|
|
4023
4185
|
if (isFlipPose(flip, name, state)) {
|
|
4024
4186
|
return flipPose(state, pose$$1);
|
|
4025
4187
|
} else if (isPositional(pose$$1)) {
|
|
@@ -4057,7 +4219,7 @@ var domPose = /*#__PURE__*/pose({
|
|
|
4057
4219
|
var props = _a.props,
|
|
4058
4220
|
activeActions = _a.activeActions;
|
|
4059
4221
|
var measure = props.dimensions.measure;
|
|
4060
|
-
var poserApi = __assign$
|
|
4222
|
+
var poserApi = __assign$6(__assign$6({}, api), { addChild: function (element, childConfig) {
|
|
4061
4223
|
return api._addChild(createPoseConfig(element, childConfig), domPose);
|
|
4062
4224
|
}, measure: measure, flip: function (op) {
|
|
4063
4225
|
if (op) {
|
|
@@ -7085,6 +7247,104 @@ var Imposter = function Imposter(_ref) {
|
|
|
7085
7247
|
}, rest), safeChildren(children, /*#__PURE__*/React.createElement(Fragment$1, null)));
|
|
7086
7248
|
};
|
|
7087
7249
|
|
|
7250
|
+
/*! *****************************************************************************
|
|
7251
|
+
Copyright (c) Microsoft Corporation.
|
|
7252
|
+
|
|
7253
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
7254
|
+
purpose with or without fee is hereby granted.
|
|
7255
|
+
|
|
7256
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
7257
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
7258
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
7259
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
7260
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
7261
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
7262
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
7263
|
+
***************************************************************************** */
|
|
7264
|
+
/* global Reflect, Promise */
|
|
7265
|
+
|
|
7266
|
+
var extendStatics$2 = function(d, b) {
|
|
7267
|
+
extendStatics$2 = Object.setPrototypeOf ||
|
|
7268
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
7269
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7270
|
+
return extendStatics$2(d, b);
|
|
7271
|
+
};
|
|
7272
|
+
|
|
7273
|
+
function __extends$2(d, b) {
|
|
7274
|
+
extendStatics$2(d, b);
|
|
7275
|
+
function __() { this.constructor = d; }
|
|
7276
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
7277
|
+
}
|
|
7278
|
+
|
|
7279
|
+
var __assign$7 = function() {
|
|
7280
|
+
__assign$7 = Object.assign || function __assign(t) {
|
|
7281
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
7282
|
+
s = arguments[i];
|
|
7283
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
7284
|
+
}
|
|
7285
|
+
return t;
|
|
7286
|
+
};
|
|
7287
|
+
return __assign$7.apply(this, arguments);
|
|
7288
|
+
};
|
|
7289
|
+
|
|
7290
|
+
function __rest$5(s, e) {
|
|
7291
|
+
var t = {};
|
|
7292
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
7293
|
+
t[p] = s[p];
|
|
7294
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7295
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7296
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
7297
|
+
t[p[i]] = s[p[i]];
|
|
7298
|
+
}
|
|
7299
|
+
return t;
|
|
7300
|
+
}
|
|
7301
|
+
|
|
7302
|
+
function __spreadArrays$2() {
|
|
7303
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
7304
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
7305
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
7306
|
+
r[k] = a[j];
|
|
7307
|
+
return r;
|
|
7308
|
+
}
|
|
7309
|
+
|
|
7310
|
+
/*! *****************************************************************************
|
|
7311
|
+
Copyright (c) Microsoft Corporation.
|
|
7312
|
+
|
|
7313
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
7314
|
+
purpose with or without fee is hereby granted.
|
|
7315
|
+
|
|
7316
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
7317
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
7318
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
7319
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
7320
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
7321
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
7322
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
7323
|
+
***************************************************************************** */
|
|
7324
|
+
|
|
7325
|
+
var __assign$8 = function() {
|
|
7326
|
+
__assign$8 = Object.assign || function __assign(t) {
|
|
7327
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
7328
|
+
s = arguments[i];
|
|
7329
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
7330
|
+
}
|
|
7331
|
+
return t;
|
|
7332
|
+
};
|
|
7333
|
+
return __assign$8.apply(this, arguments);
|
|
7334
|
+
};
|
|
7335
|
+
|
|
7336
|
+
function __rest$6(s, e) {
|
|
7337
|
+
var t = {};
|
|
7338
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
7339
|
+
t[p] = s[p];
|
|
7340
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7341
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7342
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
7343
|
+
t[p[i]] = s[p[i]];
|
|
7344
|
+
}
|
|
7345
|
+
return t;
|
|
7346
|
+
}
|
|
7347
|
+
|
|
7088
7348
|
var Observer$1 = /*#__PURE__*/function () {
|
|
7089
7349
|
function Observer(_a, observer) {
|
|
7090
7350
|
var _this = this;
|
|
@@ -7147,18 +7407,18 @@ var Action$1 = /*#__PURE__*/function () {
|
|
|
7147
7407
|
};
|
|
7148
7408
|
var _a = this.props,
|
|
7149
7409
|
init = _a.init,
|
|
7150
|
-
observerProps = __rest(_a, ["init"]);
|
|
7410
|
+
observerProps = __rest$6(_a, ["init"]);
|
|
7151
7411
|
var observer = createObserver$1(observerCandidate, observerProps, function () {
|
|
7152
7412
|
isComplete = true;
|
|
7153
7413
|
subscription.stop();
|
|
7154
7414
|
});
|
|
7155
7415
|
var api = init(observer);
|
|
7156
|
-
subscription = api ? __assign({}, subscription, api) : subscription;
|
|
7416
|
+
subscription = api ? __assign$8({}, subscription, api) : subscription;
|
|
7157
7417
|
if (isComplete) subscription.stop();
|
|
7158
7418
|
return subscription;
|
|
7159
7419
|
};
|
|
7160
7420
|
Action.prototype.applyMiddleware = function (middleware) {
|
|
7161
|
-
return this.create(__assign({}, this.props, { middleware: this.props.middleware ? [middleware].concat(this.props.middleware) : [middleware] }));
|
|
7421
|
+
return this.create(__assign$8({}, this.props, { middleware: this.props.middleware ? [middleware].concat(this.props.middleware) : [middleware] }));
|
|
7162
7422
|
};
|
|
7163
7423
|
Action.prototype.pipe = function () {
|
|
7164
7424
|
var funcs = [];
|
|
@@ -7211,18 +7471,18 @@ var createAction$1 = function (action, props) {
|
|
|
7211
7471
|
var createUnitAction$1 = function (action, _a) {
|
|
7212
7472
|
var from = _a.from,
|
|
7213
7473
|
to = _a.to,
|
|
7214
|
-
props = __rest(_a, ["from", "to"]);
|
|
7474
|
+
props = __rest$6(_a, ["from", "to"]);
|
|
7215
7475
|
var unitType = findUnitType$1(from) || findUnitType$1(to);
|
|
7216
7476
|
var transform = unitType.transform,
|
|
7217
7477
|
parse = unitType.parse;
|
|
7218
|
-
return action(__assign({}, props, { from: typeof from === 'string' ? parse(from) : from, to: typeof to === 'string' ? parse(to) : to })).pipe(transform);
|
|
7478
|
+
return action(__assign$8({}, props, { from: typeof from === 'string' ? parse(from) : from, to: typeof to === 'string' ? parse(to) : to })).pipe(transform);
|
|
7219
7479
|
};
|
|
7220
7480
|
var createMixerAction$1 = function (mixer) {
|
|
7221
7481
|
return function (action, _a) {
|
|
7222
7482
|
var from = _a.from,
|
|
7223
7483
|
to = _a.to,
|
|
7224
|
-
props = __rest(_a, ["from", "to"]);
|
|
7225
|
-
return action(__assign({}, props, { from: 0, to: 1 })).pipe(mixer(from, to));
|
|
7484
|
+
props = __rest$6(_a, ["from", "to"]);
|
|
7485
|
+
return action(__assign$8({}, props, { from: 0, to: 1 })).pipe(mixer(from, to));
|
|
7226
7486
|
};
|
|
7227
7487
|
};
|
|
7228
7488
|
var createColorAction$1 = /*#__PURE__*/createMixerAction$1(mixColor);
|
|
@@ -7435,7 +7695,7 @@ var inertia = function (_a) {
|
|
|
7435
7695
|
};
|
|
7436
7696
|
var startSpring = function (props) {
|
|
7437
7697
|
isSpring = true;
|
|
7438
|
-
startAnimation(vectorSpring$1(__assign({}, props, { to: isLessThanMin(props.from) ? min : max, stiffness: bounceStiffness, damping: bounceDamping, restDelta: restDelta })));
|
|
7698
|
+
startAnimation(vectorSpring$1(__assign$8({}, props, { to: isLessThanMin(props.from) ? min : max, stiffness: bounceStiffness, damping: bounceDamping, restDelta: restDelta })));
|
|
7439
7699
|
};
|
|
7440
7700
|
if (isOutOfBounds(from)) {
|
|
7441
7701
|
startSpring({ from: from, velocity: velocity });
|
|
@@ -7667,7 +7927,7 @@ var keyframes$1 = function (_a) {
|
|
|
7667
7927
|
ease = _b === void 0 ? linear : _b,
|
|
7668
7928
|
times = _a.times,
|
|
7669
7929
|
values = _a.values,
|
|
7670
|
-
tweenProps = __rest(_a, ["easings", "ease", "times", "values"]);
|
|
7930
|
+
tweenProps = __rest$6(_a, ["easings", "ease", "times", "values"]);
|
|
7671
7931
|
easings = Array.isArray(easings) ? easings : defaultEasings$1(values, easings);
|
|
7672
7932
|
times = times || defaultTimings$1(values);
|
|
7673
7933
|
var scrubbers = easings.map(function (easing, i) {
|
|
@@ -7677,7 +7937,7 @@ var keyframes$1 = function (_a) {
|
|
|
7677
7937
|
ease: easing
|
|
7678
7938
|
});
|
|
7679
7939
|
});
|
|
7680
|
-
return tween$1(__assign({}, tweenProps, { ease: ease })).applyMiddleware(function (update) {
|
|
7940
|
+
return tween$1(__assign$8({}, tweenProps, { ease: ease })).applyMiddleware(function (update) {
|
|
7681
7941
|
return interpolateScrubbers$1(times, scrubbers, update);
|
|
7682
7942
|
});
|
|
7683
7943
|
};
|
|
@@ -7879,7 +8139,7 @@ var MotionValue = /** @class */ (function () {
|
|
|
7879
8139
|
*/
|
|
7880
8140
|
MotionValue.prototype.addChild = function (config) {
|
|
7881
8141
|
if (config === void 0) { config = {}; }
|
|
7882
|
-
var child = new MotionValue(this.current, __assign({ parent: this }, config));
|
|
8142
|
+
var child = new MotionValue(this.current, __assign$7({ parent: this }, config));
|
|
7883
8143
|
if (!this.children)
|
|
7884
8144
|
this.children = new Set();
|
|
7885
8145
|
this.children.add(child);
|
|
@@ -8321,7 +8581,7 @@ var buildStyleAttr = function (values, styleProp, isStatic) {
|
|
|
8321
8581
|
? transformTemplate({}, styleProp.transform)
|
|
8322
8582
|
: transformTemplate;
|
|
8323
8583
|
}
|
|
8324
|
-
return buildStyleProperty(__assign(__assign({}, styleProp), motionValueStyles), !isStatic);
|
|
8584
|
+
return buildStyleProperty(__assign$7(__assign$7({}, styleProp), motionValueStyles), !isStatic);
|
|
8325
8585
|
};
|
|
8326
8586
|
var useMotionStyles = function (values, styleProp, isStatic, transformValues) {
|
|
8327
8587
|
if (styleProp === void 0) { styleProp = {}; }
|
|
@@ -8375,7 +8635,7 @@ var auto$1 = {
|
|
|
8375
8635
|
parse: function (v) { return v; },
|
|
8376
8636
|
};
|
|
8377
8637
|
var dimensionTypes = [number, px, percent, degrees, vw, vh, auto$1];
|
|
8378
|
-
var valueTypes$1 = __spreadArrays(dimensionTypes, [color, complex]);
|
|
8638
|
+
var valueTypes$1 = __spreadArrays$2(dimensionTypes, [color, complex]);
|
|
8379
8639
|
var testValueType$1 = function (v) { return function (type) { return type.test(v); }; };
|
|
8380
8640
|
var getDimensionValueType = function (v) {
|
|
8381
8641
|
return dimensionTypes.find(testValueType$1(v));
|
|
@@ -8428,7 +8688,7 @@ var getDefaultTransition = function (valueKey, to) {
|
|
|
8428
8688
|
transitionFactory =
|
|
8429
8689
|
defaultTransitions$1[valueKey] || defaultTransitions$1.default;
|
|
8430
8690
|
}
|
|
8431
|
-
return __assign({ to: to }, transitionFactory(to));
|
|
8691
|
+
return __assign$7({ to: to }, transitionFactory(to));
|
|
8432
8692
|
};
|
|
8433
8693
|
|
|
8434
8694
|
/**
|
|
@@ -8524,9 +8784,9 @@ var transitionOptionParser = {
|
|
|
8524
8784
|
return opts;
|
|
8525
8785
|
},
|
|
8526
8786
|
keyframes: function (_a) {
|
|
8527
|
-
var from = _a.from, to = _a.to, velocity = _a.velocity, opts = __rest(_a, ["from", "to", "velocity"]);
|
|
8787
|
+
var from = _a.from, to = _a.to, velocity = _a.velocity, opts = __rest$5(_a, ["from", "to", "velocity"]);
|
|
8528
8788
|
if (opts.values && opts.values[0] === null) {
|
|
8529
|
-
var values = __spreadArrays(opts.values);
|
|
8789
|
+
var values = __spreadArrays$2(opts.values);
|
|
8530
8790
|
values[0] = from;
|
|
8531
8791
|
opts.values = values;
|
|
8532
8792
|
}
|
|
@@ -8540,7 +8800,7 @@ var transitionOptionParser = {
|
|
|
8540
8800
|
},
|
|
8541
8801
|
};
|
|
8542
8802
|
var isTransitionDefined = function (_a) {
|
|
8543
|
-
var when = _a.when, delay = _a.delay, delayChildren = _a.delayChildren, staggerChildren = _a.staggerChildren, staggerDirection = _a.staggerDirection, transition = __rest(_a, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection"]);
|
|
8803
|
+
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"]);
|
|
8544
8804
|
return Object.keys(transition).length;
|
|
8545
8805
|
};
|
|
8546
8806
|
var getTransitionDefinition = function (key, to, transitionDefinition) {
|
|
@@ -8550,7 +8810,7 @@ var getTransitionDefinition = function (key, to, transitionDefinition) {
|
|
|
8550
8810
|
// and see if there's any props remaining
|
|
8551
8811
|
if (transitionDefinition === undefined ||
|
|
8552
8812
|
!isTransitionDefined(transitionDefinition)) {
|
|
8553
|
-
return __assign({ delay: delay }, getDefaultTransition(key, to));
|
|
8813
|
+
return __assign$7({ delay: delay }, getDefaultTransition(key, to));
|
|
8554
8814
|
}
|
|
8555
8815
|
var valueTransitionDefinition = transitionDefinition[key] ||
|
|
8556
8816
|
transitionDefinition.default ||
|
|
@@ -8567,12 +8827,12 @@ var getTransitionDefinition = function (key, to, transitionDefinition) {
|
|
|
8567
8827
|
};
|
|
8568
8828
|
}
|
|
8569
8829
|
else if (isKeyframesTarget(to)) {
|
|
8570
|
-
return __assign(__assign({ values: to, duration: 0.8, delay: delay, ease: "linear" }, valueTransitionDefinition), {
|
|
8830
|
+
return __assign$7(__assign$7({ values: to, duration: 0.8, delay: delay, ease: "linear" }, valueTransitionDefinition), {
|
|
8571
8831
|
// This animation must be keyframes if we're animating through an array
|
|
8572
8832
|
type: "keyframes" });
|
|
8573
8833
|
}
|
|
8574
8834
|
else {
|
|
8575
|
-
return __assign({ type: "tween", to: to,
|
|
8835
|
+
return __assign$7({ type: "tween", to: to,
|
|
8576
8836
|
delay: delay }, valueTransitionDefinition);
|
|
8577
8837
|
}
|
|
8578
8838
|
};
|
|
@@ -8589,12 +8849,12 @@ var getAnimation = function (key, value, target, transition) {
|
|
|
8589
8849
|
// for instance 100 to #fff. This might live better in Popmotion.
|
|
8590
8850
|
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.");
|
|
8591
8851
|
// Parse the `transition` prop and return options for the Popmotion animation
|
|
8592
|
-
var _a = getTransitionDefinition(key, target, transition), _b = _a.type, type = _b === void 0 ? "tween" : _b, transitionDefinition = __rest(_a, ["type"]);
|
|
8852
|
+
var _a = getTransitionDefinition(key, target, transition), _b = _a.type, type = _b === void 0 ? "tween" : _b, transitionDefinition = __rest$5(_a, ["type"]);
|
|
8593
8853
|
// If this is an animatable pair of values, return an animation, otherwise use `just`
|
|
8594
8854
|
var actionFactory = isOriginAnimatable && isTargetAnimatable
|
|
8595
8855
|
? transitions[type]
|
|
8596
8856
|
: just$1;
|
|
8597
|
-
var opts = preprocessOptions(type, __assign({ from: origin, velocity: value.getVelocity() }, transitionDefinition));
|
|
8857
|
+
var opts = preprocessOptions(type, __assign$7({ from: origin, velocity: value.getVelocity() }, transitionDefinition));
|
|
8598
8858
|
// Convert duration from Framer Motion's seconds into Popmotion's milliseconds
|
|
8599
8859
|
if (isDurationAnimation(opts)) {
|
|
8600
8860
|
if (opts.duration) {
|
|
@@ -8612,10 +8872,10 @@ var getAnimation = function (key, value, target, transition) {
|
|
|
8612
8872
|
* @internal
|
|
8613
8873
|
*/
|
|
8614
8874
|
function startAnimation(key, value, target, _a) {
|
|
8615
|
-
var _b = _a.delay, delay$1$1 = _b === void 0 ? 0 : _b, transition = __rest(_a, ["delay"]);
|
|
8875
|
+
var _b = _a.delay, delay$1$1 = _b === void 0 ? 0 : _b, transition = __rest$5(_a, ["delay"]);
|
|
8616
8876
|
return value.start(function (complete) {
|
|
8617
8877
|
var activeAnimation;
|
|
8618
|
-
var _a = getAnimation(key, value, target, transition), animationFactory = _a[0], _b = _a[1], valueDelay = _b.delay, options = __rest(_b, ["delay"]);
|
|
8878
|
+
var _a = getAnimation(key, value, target, transition), animationFactory = _a[0], _b = _a[1], valueDelay = _b.delay, options = __rest$5(_b, ["delay"]);
|
|
8619
8879
|
if (valueDelay !== undefined) {
|
|
8620
8880
|
delay$1$1 = valueDelay;
|
|
8621
8881
|
}
|
|
@@ -8761,7 +9021,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
8761
9021
|
var _this = this;
|
|
8762
9022
|
var _b = _a === void 0 ? {} : _a, _c = _b.isActive, isActive = _c === void 0 ? new Set() : _c, priority = _b.priority;
|
|
8763
9023
|
var _d = this.resolveVariant(definition), target = _d.target, transitionEnd = _d.transitionEnd;
|
|
8764
|
-
target = this.transformValues(__assign(__assign({}, target), transitionEnd));
|
|
9024
|
+
target = this.transformValues(__assign$7(__assign$7({}, target), transitionEnd));
|
|
8765
9025
|
return Object.keys(target).forEach(function (key) {
|
|
8766
9026
|
if (isActive.has(key))
|
|
8767
9027
|
return;
|
|
@@ -8851,7 +9111,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
8851
9111
|
// resolve current and velocity
|
|
8852
9112
|
variant = variant(this.props.custom, getCurrent$1(this.values), getVelocity(this.values));
|
|
8853
9113
|
}
|
|
8854
|
-
var _a = variant.transition, transition = _a === void 0 ? this.defaultTransition : _a, transitionEnd = variant.transitionEnd, target = __rest(variant, ["transition", "transitionEnd"]);
|
|
9114
|
+
var _a = variant.transition, transition = _a === void 0 ? this.defaultTransition : _a, transitionEnd = variant.transitionEnd, target = __rest$5(variant, ["transition", "transitionEnd"]);
|
|
8855
9115
|
return { transition: transition, transitionEnd: transitionEnd, target: target };
|
|
8856
9116
|
};
|
|
8857
9117
|
/**
|
|
@@ -8942,7 +9202,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
8942
9202
|
ValueAnimationControls.prototype.applyVariantLabels = function (variantLabelList) {
|
|
8943
9203
|
var _this = this;
|
|
8944
9204
|
var isActive = new Set();
|
|
8945
|
-
var reversedList = __spreadArrays(variantLabelList).reverse();
|
|
9205
|
+
var reversedList = __spreadArrays$2(variantLabelList).reverse();
|
|
8946
9206
|
reversedList.forEach(function (key) {
|
|
8947
9207
|
var _a = _this.resolveVariant(_this.variants[key]), target = _a.target, transitionEnd = _a.transitionEnd;
|
|
8948
9208
|
if (transitionEnd) {
|
|
@@ -9013,7 +9273,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
9013
9273
|
if (this.isAnimating.has(key))
|
|
9014
9274
|
continue;
|
|
9015
9275
|
this.isAnimating.add(key);
|
|
9016
|
-
animations.push(startAnimation(key, value, valueTarget, __assign({ delay: delay }, transition)));
|
|
9276
|
+
animations.push(startAnimation(key, value, valueTarget, __assign$7({ delay: delay }, transition)));
|
|
9017
9277
|
}
|
|
9018
9278
|
var allAnimations = Promise.all(animations);
|
|
9019
9279
|
return transitionEnd
|
|
@@ -9024,7 +9284,7 @@ var ValueAnimationControls = /** @class */ (function () {
|
|
|
9024
9284
|
};
|
|
9025
9285
|
ValueAnimationControls.prototype.animateVariantLabels = function (variantLabels, opts) {
|
|
9026
9286
|
var _this = this;
|
|
9027
|
-
var animations = __spreadArrays(variantLabels).reverse()
|
|
9287
|
+
var animations = __spreadArrays$2(variantLabels).reverse()
|
|
9028
9288
|
.map(function (label) { return _this.animateVariant(label, opts); });
|
|
9029
9289
|
return Promise.all(animations);
|
|
9030
9290
|
};
|
|
@@ -9468,7 +9728,7 @@ function useValueAnimationControls(config, props, subscribeToParentControls) {
|
|
|
9468
9728
|
// Remove reference to onAnimationComplete from controls. All the MotionValues
|
|
9469
9729
|
// are unsubscribed from this component separately. We let animations run out
|
|
9470
9730
|
// as they might be animating other components.
|
|
9471
|
-
var onAnimationComplete = props.onAnimationComplete, unmountProps = __rest(props, ["onAnimationComplete"]);
|
|
9731
|
+
var onAnimationComplete = props.onAnimationComplete, unmountProps = __rest$5(props, ["onAnimationComplete"]);
|
|
9472
9732
|
controls.setProps(unmountProps);
|
|
9473
9733
|
parentControls && parentControls.removeChild(controls);
|
|
9474
9734
|
};
|
|
@@ -9953,7 +10213,7 @@ var PanSession = /** @class */ (function () {
|
|
|
9953
10213
|
return;
|
|
9954
10214
|
var point = info.point;
|
|
9955
10215
|
var timestamp = getFrameData().timestamp;
|
|
9956
|
-
_this.history.push(__assign(__assign({}, point), { timestamp: timestamp }));
|
|
10216
|
+
_this.history.push(__assign$7(__assign$7({}, point), { timestamp: timestamp }));
|
|
9957
10217
|
var _a = _this.handlers, onStart = _a.onStart, onMove = _a.onMove;
|
|
9958
10218
|
if (!isPanStarted) {
|
|
9959
10219
|
onStart && onStart(_this.lastMoveEvent, info);
|
|
@@ -9970,7 +10230,7 @@ var PanSession = /** @class */ (function () {
|
|
|
9970
10230
|
var initialInfo = transformPoint(info, this.transformPagePoint);
|
|
9971
10231
|
var point = initialInfo.point;
|
|
9972
10232
|
var timestamp = getFrameData().timestamp;
|
|
9973
|
-
this.history = [__assign(__assign({}, point), { timestamp: timestamp })];
|
|
10233
|
+
this.history = [__assign$7(__assign$7({}, point), { timestamp: timestamp })];
|
|
9974
10234
|
var onSessionStart = handlers.onSessionStart;
|
|
9975
10235
|
onSessionStart &&
|
|
9976
10236
|
onSessionStart(event, getPanInfo(initialInfo, this.history));
|
|
@@ -10298,7 +10558,7 @@ var Gestures = {
|
|
|
10298
10558
|
return gestureProps.some(function (key) { return props.hasOwnProperty(key); });
|
|
10299
10559
|
},
|
|
10300
10560
|
Component: makeRenderlessComponent(function (_a) {
|
|
10301
|
-
var innerRef = _a.innerRef, props = __rest(_a, ["innerRef"]);
|
|
10561
|
+
var innerRef = _a.innerRef, props = __rest$5(_a, ["innerRef"]);
|
|
10302
10562
|
useGestures(props, innerRef);
|
|
10303
10563
|
}),
|
|
10304
10564
|
};
|
|
@@ -10538,8 +10798,8 @@ var ComponentDragControls = /** @class */ (function () {
|
|
|
10538
10798
|
};
|
|
10539
10799
|
ComponentDragControls.prototype.updateProps = function (_a) {
|
|
10540
10800
|
var _this = this;
|
|
10541
|
-
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"]);
|
|
10542
|
-
this.props = __assign({ drag: drag,
|
|
10801
|
+
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"]);
|
|
10802
|
+
this.props = __assign$7({ drag: drag,
|
|
10543
10803
|
dragDirectionLock: dragDirectionLock,
|
|
10544
10804
|
dragPropagation: dragPropagation,
|
|
10545
10805
|
dragConstraints: dragConstraints,
|
|
@@ -10595,7 +10855,7 @@ var ComponentDragControls = /** @class */ (function () {
|
|
|
10595
10855
|
var bounceStiffness = dragElastic ? 200 : 1000000;
|
|
10596
10856
|
var bounceDamping = dragElastic ? 40 : 10000000;
|
|
10597
10857
|
var animationControls = _dragTransitionControls || _this.controls;
|
|
10598
|
-
var inertia = __assign(__assign({ type: "inertia", velocity: dragMomentum ? velocity[axis] : 0, bounceStiffness: bounceStiffness,
|
|
10858
|
+
var inertia = __assign$7(__assign$7({ type: "inertia", velocity: dragMomentum ? velocity[axis] : 0, bounceStiffness: bounceStiffness,
|
|
10599
10859
|
bounceDamping: bounceDamping, timeConstant: 750, restDelta: 1 }, dragTransition), transition);
|
|
10600
10860
|
var externalAxisMotionValue = axis === "x" ? _dragValueX : _dragValueY;
|
|
10601
10861
|
// If we're not animating on an externally-provided `MotionValue` we can use the
|
|
@@ -10676,7 +10936,7 @@ function bothAxis(handler) {
|
|
|
10676
10936
|
return [handler("x"), handler("y")];
|
|
10677
10937
|
}
|
|
10678
10938
|
function convertPanToDrag(info, point) {
|
|
10679
|
-
return __assign(__assign({}, info), { point: {
|
|
10939
|
+
return __assign$7(__assign$7({}, info), { point: {
|
|
10680
10940
|
x: point.x ? point.x.get() : 0,
|
|
10681
10941
|
y: point.y ? point.y.get() : 0,
|
|
10682
10942
|
} });
|
|
@@ -10787,7 +11047,7 @@ function useDrag(props, ref, values, controls) {
|
|
|
10787
11047
|
var groupDragControls = props.dragControls;
|
|
10788
11048
|
var transformPagePoint = useContext(MotionPluginContext).transformPagePoint;
|
|
10789
11049
|
var dragControls = useConstant(function () { return new ComponentDragControls({ ref: ref, values: values, controls: controls }); });
|
|
10790
|
-
dragControls.updateProps(__assign(__assign({}, props), { transformPagePoint: transformPagePoint }));
|
|
11050
|
+
dragControls.updateProps(__assign$7(__assign$7({}, props), { transformPagePoint: transformPagePoint }));
|
|
10791
11051
|
useEffect$1(function () { return groupDragControls && groupDragControls.subscribe(dragControls); }, [dragControls]);
|
|
10792
11052
|
useEffect$1(function () { return dragControls.mount(ref.current); }, []);
|
|
10793
11053
|
}
|
|
@@ -10796,7 +11056,7 @@ var Drag = {
|
|
|
10796
11056
|
key: "drag",
|
|
10797
11057
|
shouldRender: function (props) { return !!props.drag; },
|
|
10798
11058
|
Component: makeRenderlessComponent(function (_a) {
|
|
10799
|
-
var innerRef = _a.innerRef, values = _a.values, controls = _a.controls, props = __rest(_a, ["innerRef", "values", "controls"]);
|
|
11059
|
+
var innerRef = _a.innerRef, values = _a.values, controls = _a.controls, props = __rest$5(_a, ["innerRef", "values", "controls"]);
|
|
10800
11060
|
return useDrag(props, innerRef, values, controls);
|
|
10801
11061
|
}),
|
|
10802
11062
|
};
|
|
@@ -10848,14 +11108,14 @@ function getVariableValue(current, element, depth) {
|
|
|
10848
11108
|
* @internal
|
|
10849
11109
|
*/
|
|
10850
11110
|
function resolveCSSVariables(values, ref, _a, transitionEnd) {
|
|
10851
|
-
var target = __rest(_a, []);
|
|
11111
|
+
var target = __rest$5(_a, []);
|
|
10852
11112
|
var element = ref.current;
|
|
10853
11113
|
if (!(element instanceof HTMLElement))
|
|
10854
11114
|
return { target: target, transitionEnd: transitionEnd };
|
|
10855
11115
|
// If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd`
|
|
10856
11116
|
// only if they change but I think this reads clearer and this isn't a performance-critical path.
|
|
10857
11117
|
if (transitionEnd) {
|
|
10858
|
-
transitionEnd = __assign({}, transitionEnd);
|
|
11118
|
+
transitionEnd = __assign$7({}, transitionEnd);
|
|
10859
11119
|
}
|
|
10860
11120
|
// Go through existing `MotionValue`s and ensure any existing CSS variables are resolved
|
|
10861
11121
|
values.forEach(function (value) {
|
|
@@ -11012,8 +11272,8 @@ var convertChangedValueTypes = function (target, values, element, elementStyler,
|
|
|
11012
11272
|
};
|
|
11013
11273
|
var checkAndConvertChangedValueTypes = function (values, ref, target, transitionEnd) {
|
|
11014
11274
|
if (transitionEnd === void 0) { transitionEnd = {}; }
|
|
11015
|
-
target = __assign({}, target);
|
|
11016
|
-
transitionEnd = __assign({}, transitionEnd);
|
|
11275
|
+
target = __assign$7({}, target);
|
|
11276
|
+
transitionEnd = __assign$7({}, transitionEnd);
|
|
11017
11277
|
var element = ref.current;
|
|
11018
11278
|
var elementStyler = index(element);
|
|
11019
11279
|
var targetPositionalKeys = Object.keys(target).filter(isPositionalKey$1);
|
|
@@ -11241,7 +11501,7 @@ function calcAxisDelta(prev, next, names) {
|
|
|
11241
11501
|
return delta;
|
|
11242
11502
|
}
|
|
11243
11503
|
function calcDelta(prev, next) {
|
|
11244
|
-
var delta = __assign(__assign({}, calcAxisDelta(prev, next, axisLabels.x)), calcAxisDelta(prev, next, axisLabels.y));
|
|
11504
|
+
var delta = __assign$7(__assign$7({}, calcAxisDelta(prev, next, axisLabels.x)), calcAxisDelta(prev, next, axisLabels.y));
|
|
11245
11505
|
return delta;
|
|
11246
11506
|
}
|
|
11247
11507
|
var offset = {
|
|
@@ -11285,7 +11545,7 @@ function getTransition(_a) {
|
|
|
11285
11545
|
return layoutTransition || positionTransition;
|
|
11286
11546
|
}
|
|
11287
11547
|
var LayoutAnimation = /** @class */ (function (_super) {
|
|
11288
|
-
__extends(LayoutAnimation, _super);
|
|
11548
|
+
__extends$2(LayoutAnimation, _super);
|
|
11289
11549
|
function LayoutAnimation() {
|
|
11290
11550
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
11291
11551
|
}
|
|
@@ -11352,11 +11612,11 @@ var LayoutAnimation = /** @class */ (function (_super) {
|
|
|
11352
11612
|
if (!delta[deltaKey])
|
|
11353
11613
|
return;
|
|
11354
11614
|
var baseTransition = typeof transitionDefinition === "boolean"
|
|
11355
|
-
? __assign({}, getDefaultLayoutTransition(isPositionOnly)) : transitionDefinition;
|
|
11615
|
+
? __assign$7({}, getDefaultLayoutTransition(isPositionOnly)) : transitionDefinition;
|
|
11356
11616
|
var value = values.get(transformKey, targetValue);
|
|
11357
11617
|
var velocity = value.getVelocity();
|
|
11358
11618
|
transition[transformKey] = baseTransition[transformKey]
|
|
11359
|
-
? __assign({}, baseTransition[transformKey]) : __assign({}, baseTransition);
|
|
11619
|
+
? __assign$7({}, baseTransition[transformKey]) : __assign$7({}, baseTransition);
|
|
11360
11620
|
if (transition[transformKey].velocity === undefined) {
|
|
11361
11621
|
transition[transformKey].velocity = velocity || 0;
|
|
11362
11622
|
}
|
|
@@ -11497,9 +11757,9 @@ var hasUpdated = function (prev, next) {
|
|
|
11497
11757
|
};
|
|
11498
11758
|
function targetWithoutTransition(_a, mergeTransitionEnd) {
|
|
11499
11759
|
if (mergeTransitionEnd === void 0) { mergeTransitionEnd = false; }
|
|
11500
|
-
var transition = _a.transition, transitionEnd = _a.transitionEnd, target = __rest(_a, ["transition", "transitionEnd"]);
|
|
11760
|
+
var transition = _a.transition, transitionEnd = _a.transitionEnd, target = __rest$5(_a, ["transition", "transitionEnd"]);
|
|
11501
11761
|
return mergeTransitionEnd
|
|
11502
|
-
? __assign(__assign({}, target), transitionEnd)
|
|
11762
|
+
? __assign$7(__assign$7({}, target), transitionEnd)
|
|
11503
11763
|
: target;
|
|
11504
11764
|
}
|
|
11505
11765
|
/**
|
|
@@ -11551,9 +11811,9 @@ function useAnimateProp(targetAndTransition, controls, values, defaultTransition
|
|
|
11551
11811
|
}
|
|
11552
11812
|
}
|
|
11553
11813
|
isInitialRender.current = false;
|
|
11554
|
-
prevValues.current = __assign(__assign({}, prevValues.current), finalTarget);
|
|
11814
|
+
prevValues.current = __assign$7(__assign$7({}, prevValues.current), finalTarget);
|
|
11555
11815
|
if (Object.keys(targetToAnimate).length) {
|
|
11556
|
-
controls.start(__assign(__assign({}, targetToAnimate), { transition: targetAndTransition.transition || defaultTransition, transitionEnd: targetAndTransition.transitionEnd }));
|
|
11816
|
+
controls.start(__assign$7(__assign$7({}, targetToAnimate), { transition: targetAndTransition.transition || defaultTransition, transitionEnd: targetAndTransition.transitionEnd }));
|
|
11557
11817
|
}
|
|
11558
11818
|
}, [targetAndTransition]);
|
|
11559
11819
|
}
|
|
@@ -11727,7 +11987,7 @@ var Exit = {
|
|
|
11727
11987
|
useEffect$1(function () {
|
|
11728
11988
|
if (!isPresent) {
|
|
11729
11989
|
if (!isPlayingExitAnimation.current && exit) {
|
|
11730
|
-
controls.setProps(__assign(__assign({}, props), { custom: custom }));
|
|
11990
|
+
controls.setProps(__assign$7(__assign$7({}, props), { custom: custom }));
|
|
11731
11991
|
controls.start(exit).then(onExitComplete);
|
|
11732
11992
|
}
|
|
11733
11993
|
isPlayingExitAnimation.current = true;
|
|
@@ -11798,7 +12058,7 @@ var buildHTMLProps = function (values, style, isStatic, isDrag) {
|
|
|
11798
12058
|
var buildSVGProps = function (values, style) {
|
|
11799
12059
|
var motionValueStyles = resolveCurrent(values);
|
|
11800
12060
|
var props = buildSVGAttrs(motionValueStyles, undefined, undefined, undefined, undefined, false);
|
|
11801
|
-
props.style = __assign(__assign({}, style), props.style);
|
|
12061
|
+
props.style = __assign$7(__assign$7({}, style), props.style);
|
|
11802
12062
|
return props;
|
|
11803
12063
|
};
|
|
11804
12064
|
var functionalityComponents = [Layout, Drag, Gestures, Exit];
|
|
@@ -11817,7 +12077,7 @@ function createDomMotionConfig(Component) {
|
|
|
11817
12077
|
var staticVisualStyles = isSVG
|
|
11818
12078
|
? buildSVGProps(values, style)
|
|
11819
12079
|
: buildHTMLProps(values, style, isStatic, !!props.drag);
|
|
11820
|
-
return createElement(Component, __assign(__assign(__assign({}, forwardedProps), { ref: ref }), staticVisualStyles));
|
|
12080
|
+
return createElement(Component, __assign$7(__assign$7(__assign$7({}, forwardedProps), { ref: ref }), staticVisualStyles));
|
|
11821
12081
|
},
|
|
11822
12082
|
/**
|
|
11823
12083
|
* loadFunctionalityComponents gets used by the `motion` component
|
|
@@ -11848,7 +12108,7 @@ function createDomMotionConfig(Component) {
|
|
|
11848
12108
|
for (var i = 0; i < numFunctionalityComponents; i++) {
|
|
11849
12109
|
var _a = functionalityComponents[i], shouldRender = _a.shouldRender, key = _a.key, Component_1 = _a.Component;
|
|
11850
12110
|
if (shouldRender(props, context)) {
|
|
11851
|
-
activeComponents.push(createElement(Component_1, __assign({ key: key }, props, { parentContext: context, values: values, controls: controls, innerRef: ref })));
|
|
12111
|
+
activeComponents.push(createElement(Component_1, __assign$7({ key: key }, props, { parentContext: context, values: values, controls: controls, innerRef: ref })));
|
|
11852
12112
|
}
|
|
11853
12113
|
}
|
|
11854
12114
|
return activeComponents;
|
|
@@ -11900,7 +12160,7 @@ var svgMotionComponents = svgElements.reduce(function (acc, Component) {
|
|
|
11900
12160
|
*
|
|
11901
12161
|
* @public
|
|
11902
12162
|
*/
|
|
11903
|
-
var motion = __assign(__assign({
|
|
12163
|
+
var motion = __assign$7(__assign$7({
|
|
11904
12164
|
/**
|
|
11905
12165
|
* Convert a custom React component into a `motion` component.
|
|
11906
12166
|
*
|
|
@@ -11952,7 +12212,7 @@ var PresenceChild = function (_a) {
|
|
|
11952
12212
|
return function () { return numPresenceChildren.current--; };
|
|
11953
12213
|
};
|
|
11954
12214
|
}, [isPresent]);
|
|
11955
|
-
return (createElement(PresenceContext.Provider, { value: __assign(__assign({}, context), { register: register }) }, children));
|
|
12215
|
+
return (createElement(PresenceContext.Provider, { value: __assign$7(__assign$7({}, context), { register: register }) }, children));
|
|
11956
12216
|
};
|
|
11957
12217
|
|
|
11958
12218
|
function getChildKey(child) {
|
|
@@ -12068,7 +12328,7 @@ var AnimatePresence = function (_a) {
|
|
|
12068
12328
|
return (createElement(Fragment$1, null, filteredChildren.map(function (child) { return (createElement(PresenceChild, { key: getChildKey(child), isPresent: true, initial: initial ? undefined : false }, child)); })));
|
|
12069
12329
|
}
|
|
12070
12330
|
// If this is a subsequent render, deal with entering and exiting children
|
|
12071
|
-
var childrenToRender = __spreadArrays(filteredChildren);
|
|
12331
|
+
var childrenToRender = __spreadArrays$2(filteredChildren);
|
|
12072
12332
|
// Diff the keys of the currently-present and target children to update our
|
|
12073
12333
|
// exiting list.
|
|
12074
12334
|
var presentKeys = presentChildren.current.map(getChildKey);
|
|
@@ -12347,7 +12607,7 @@ var general$1 = /*#__PURE__*/Object.freeze({
|
|
|
12347
12607
|
CASH_METHOD: CASH_METHOD
|
|
12348
12608
|
});
|
|
12349
12609
|
|
|
12350
|
-
var URL_TEST = /(([a-z]{3,6}:\/\/)|(^|\s))([a-zA-Z0-9\-]+\.)+[a-z]{2,13}[\.\?\=\&\%\/\w\-]*\b([^@]|$)/;
|
|
12610
|
+
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([^@]|$)/;
|
|
12351
12611
|
|
|
12352
12612
|
var regex_constants = /*#__PURE__*/Object.freeze({
|
|
12353
12613
|
__proto__: null,
|
|
@@ -39675,8 +39935,7 @@ var CardText = function CardText(_ref) {
|
|
|
39675
39935
|
}, /*#__PURE__*/React.createElement(Cover, null, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(Cluster, {
|
|
39676
39936
|
justify: "space-between",
|
|
39677
39937
|
align: "center",
|
|
39678
|
-
overflow: true
|
|
39679
|
-
nowrap: true
|
|
39938
|
+
overflow: true
|
|
39680
39939
|
}, titleText && /*#__PURE__*/React.createElement(Title$1, {
|
|
39681
39940
|
as: titleAs,
|
|
39682
39941
|
variant: titleVariant,
|