Mission Control Dashboard - Initial implementation
This commit is contained in:
22
node_modules/motion-utils/dist/es/array.mjs
generated
vendored
Normal file
22
node_modules/motion-utils/dist/es/array.mjs
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
function addUniqueItem(arr, item) {
|
||||
if (arr.indexOf(item) === -1)
|
||||
arr.push(item);
|
||||
}
|
||||
function removeItem(arr, item) {
|
||||
const index = arr.indexOf(item);
|
||||
if (index > -1)
|
||||
arr.splice(index, 1);
|
||||
}
|
||||
// Adapted from array-move
|
||||
function moveItem([...arr], fromIndex, toIndex) {
|
||||
const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;
|
||||
if (startIndex >= 0 && startIndex < arr.length) {
|
||||
const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;
|
||||
const [item] = arr.splice(fromIndex, 1);
|
||||
arr.splice(endIndex, 0, item);
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
export { addUniqueItem, moveItem, removeItem };
|
||||
//# sourceMappingURL=array.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/array.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/array.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"array.mjs","sources":["../../src/array.ts"],"sourcesContent":["export function addUniqueItem<T>(arr: T[], item: T) {\n if (arr.indexOf(item) === -1) arr.push(item)\n}\n\nexport function removeItem<T>(arr: T[], item: T) {\n const index = arr.indexOf(item)\n if (index > -1) arr.splice(index, 1)\n}\n\n// Adapted from array-move\nexport function moveItem<T>([...arr]: T[], fromIndex: number, toIndex: number) {\n const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex\n\n if (startIndex >= 0 && startIndex < arr.length) {\n const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex\n\n const [item] = arr.splice(fromIndex, 1)\n arr.splice(endIndex, 0, item)\n }\n\n return arr\n}\n"],"names":[],"mappings":"AAAM,SAAU,aAAa,CAAI,GAAQ,EAAE,IAAO,EAAA;IAC9C,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE;AAAE,QAAA,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;AAChD;AAEM,SAAU,UAAU,CAAI,GAAQ,EAAE,IAAO,EAAA;IAC3C,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;IAC/B,IAAI,KAAK,GAAG,EAAE;AAAE,QAAA,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;AACxC;AAEA;AACM,SAAU,QAAQ,CAAI,CAAC,GAAG,GAAG,CAAM,EAAE,SAAiB,EAAE,OAAe,EAAA;AACzE,IAAA,MAAM,UAAU,GAAG,SAAS,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,SAAS,GAAG,SAAS;IAErE,IAAI,UAAU,IAAI,CAAC,IAAI,UAAU,GAAG,GAAG,CAAC,MAAM,EAAE;AAC5C,QAAA,MAAM,QAAQ,GAAG,OAAO,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,OAAO,GAAG,OAAO;AAE7D,QAAA,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;QACvC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC;IACjC;AAEA,IAAA,OAAO,GAAG;AACd;;;;"}
|
||||
10
node_modules/motion-utils/dist/es/clamp.mjs
generated
vendored
Normal file
10
node_modules/motion-utils/dist/es/clamp.mjs
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
const clamp = (min, max, v) => {
|
||||
if (v > max)
|
||||
return max;
|
||||
if (v < min)
|
||||
return min;
|
||||
return v;
|
||||
};
|
||||
|
||||
export { clamp };
|
||||
//# sourceMappingURL=clamp.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/clamp.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/clamp.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"clamp.mjs","sources":["../../src/clamp.ts"],"sourcesContent":["export const clamp = (min: number, max: number, v: number) => {\n if (v > max) return max\n if (v < min) return min\n return v\n}\n"],"names":[],"mappings":"AAAO,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,CAAS,KAAI;IACzD,IAAI,CAAC,GAAG,GAAG;AAAE,QAAA,OAAO,GAAG;IACvB,IAAI,CAAC,GAAG,GAAG;AAAE,QAAA,OAAO,GAAG;AACvB,IAAA,OAAO,CAAC;AACZ;;;;"}
|
||||
10
node_modules/motion-utils/dist/es/easing/anticipate.mjs
generated
vendored
Normal file
10
node_modules/motion-utils/dist/es/easing/anticipate.mjs
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { backIn } from './back.mjs';
|
||||
|
||||
const anticipate = (p) => p >= 1
|
||||
? 1
|
||||
: (p *= 2) < 1
|
||||
? 0.5 * backIn(p)
|
||||
: 0.5 * (2 - Math.pow(2, -10 * (p - 1)));
|
||||
|
||||
export { anticipate };
|
||||
//# sourceMappingURL=anticipate.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/easing/anticipate.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/easing/anticipate.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"anticipate.mjs","sources":["../../../src/easing/anticipate.ts"],"sourcesContent":["import { backIn } from \"./back\"\n\nexport const anticipate = (p: number) =>\n p >= 1\n ? 1\n : (p *= 2) < 1\n ? 0.5 * backIn(p)\n : 0.5 * (2 - Math.pow(2, -10 * (p - 1)))\n"],"names":[],"mappings":";;AAEO,MAAM,UAAU,GAAG,CAAC,CAAS,KAChC,CAAC,IAAI;AACD,MAAE;AACF,MAAE,CAAC,CAAC,IAAI,CAAC,IAAI;AACX,UAAE,GAAG,GAAG,MAAM,CAAC,CAAC;UACd,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;;;;"}
|
||||
10
node_modules/motion-utils/dist/es/easing/back.mjs
generated
vendored
Normal file
10
node_modules/motion-utils/dist/es/easing/back.mjs
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { cubicBezier } from './cubic-bezier.mjs';
|
||||
import { mirrorEasing } from './modifiers/mirror.mjs';
|
||||
import { reverseEasing } from './modifiers/reverse.mjs';
|
||||
|
||||
const backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99);
|
||||
const backIn = /*@__PURE__*/ reverseEasing(backOut);
|
||||
const backInOut = /*@__PURE__*/ mirrorEasing(backIn);
|
||||
|
||||
export { backIn, backInOut, backOut };
|
||||
//# sourceMappingURL=back.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/easing/back.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/easing/back.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"back.mjs","sources":["../../../src/easing/back.ts"],"sourcesContent":["import { cubicBezier } from \"./cubic-bezier\"\nimport { mirrorEasing } from \"./modifiers/mirror\"\nimport { reverseEasing } from \"./modifiers/reverse\"\n\nexport const backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99)\nexport const backIn = /*@__PURE__*/ reverseEasing(backOut)\nexport const backInOut = /*@__PURE__*/ mirrorEasing(backIn)\n"],"names":[],"mappings":";;;;AAIO,MAAM,OAAO,iBAAiB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;AAChE,MAAM,MAAM,iBAAiB,aAAa,CAAC,OAAO;AAClD,MAAM,SAAS,iBAAiB,YAAY,CAAC,MAAM;;;;"}
|
||||
9
node_modules/motion-utils/dist/es/easing/circ.mjs
generated
vendored
Normal file
9
node_modules/motion-utils/dist/es/easing/circ.mjs
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { mirrorEasing } from './modifiers/mirror.mjs';
|
||||
import { reverseEasing } from './modifiers/reverse.mjs';
|
||||
|
||||
const circIn = (p) => 1 - Math.sin(Math.acos(p));
|
||||
const circOut = reverseEasing(circIn);
|
||||
const circInOut = mirrorEasing(circIn);
|
||||
|
||||
export { circIn, circInOut, circOut };
|
||||
//# sourceMappingURL=circ.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/easing/circ.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/easing/circ.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"circ.mjs","sources":["../../../src/easing/circ.ts"],"sourcesContent":["import { mirrorEasing } from \"./modifiers/mirror\"\nimport { reverseEasing } from \"./modifiers/reverse\"\nimport { EasingFunction } from \"./types\"\n\nexport const circIn: EasingFunction = (p) => 1 - Math.sin(Math.acos(p))\nexport const circOut = reverseEasing(circIn)\nexport const circInOut = mirrorEasing(circIn)\n"],"names":[],"mappings":";;;MAIa,MAAM,GAAmB,CAAC,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;MACzD,OAAO,GAAG,aAAa,CAAC,MAAM;MAC9B,SAAS,GAAG,YAAY,CAAC,MAAM;;;;"}
|
||||
52
node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs
generated
vendored
Normal file
52
node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
import { noop } from '../noop.mjs';
|
||||
|
||||
/*
|
||||
Bezier function generator
|
||||
This has been modified from Gaëtan Renaudeau's BezierEasing
|
||||
https://github.com/gre/bezier-easing/blob/master/src/index.js
|
||||
https://github.com/gre/bezier-easing/blob/master/LICENSE
|
||||
|
||||
I've removed the newtonRaphsonIterate algo because in benchmarking it
|
||||
wasn't noticeably faster than binarySubdivision, indeed removing it
|
||||
usually improved times, depending on the curve.
|
||||
I also removed the lookup table, as for the added bundle size and loop we're
|
||||
only cutting ~4 or so subdivision iterations. I bumped the max iterations up
|
||||
to 12 to compensate and this still tended to be faster for no perceivable
|
||||
loss in accuracy.
|
||||
Usage
|
||||
const easeOut = cubicBezier(.17,.67,.83,.67);
|
||||
const x = easeOut(0.5); // returns 0.627...
|
||||
*/
|
||||
// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
|
||||
const calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) *
|
||||
t;
|
||||
const subdivisionPrecision = 0.0000001;
|
||||
const subdivisionMaxIterations = 12;
|
||||
function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {
|
||||
let currentX;
|
||||
let currentT;
|
||||
let i = 0;
|
||||
do {
|
||||
currentT = lowerBound + (upperBound - lowerBound) / 2.0;
|
||||
currentX = calcBezier(currentT, mX1, mX2) - x;
|
||||
if (currentX > 0.0) {
|
||||
upperBound = currentT;
|
||||
}
|
||||
else {
|
||||
lowerBound = currentT;
|
||||
}
|
||||
} while (Math.abs(currentX) > subdivisionPrecision &&
|
||||
++i < subdivisionMaxIterations);
|
||||
return currentT;
|
||||
}
|
||||
function cubicBezier(mX1, mY1, mX2, mY2) {
|
||||
// If this is a linear gradient, return linear easing
|
||||
if (mX1 === mY1 && mX2 === mY2)
|
||||
return noop;
|
||||
const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);
|
||||
// If animation is at start/end, return t without easing
|
||||
return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);
|
||||
}
|
||||
|
||||
export { cubicBezier };
|
||||
//# sourceMappingURL=cubic-bezier.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"cubic-bezier.mjs","sources":["../../../src/easing/cubic-bezier.ts"],"sourcesContent":["/*\n Bezier function generator\n This has been modified from Gaëtan Renaudeau's BezierEasing\n https://github.com/gre/bezier-easing/blob/master/src/index.js\n https://github.com/gre/bezier-easing/blob/master/LICENSE\n \n I've removed the newtonRaphsonIterate algo because in benchmarking it\n wasn't noticeably faster than binarySubdivision, indeed removing it\n usually improved times, depending on the curve.\n I also removed the lookup table, as for the added bundle size and loop we're\n only cutting ~4 or so subdivision iterations. I bumped the max iterations up\n to 12 to compensate and this still tended to be faster for no perceivable\n loss in accuracy.\n Usage\n const easeOut = cubicBezier(.17,.67,.83,.67);\n const x = easeOut(0.5); // returns 0.627...\n*/\n\nimport { noop } from \"../noop\"\n\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nconst calcBezier = (t: number, a1: number, a2: number) =>\n (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) *\n t\n\nconst subdivisionPrecision = 0.0000001\nconst subdivisionMaxIterations = 12\n\nfunction binarySubdivide(\n x: number,\n lowerBound: number,\n upperBound: number,\n mX1: number,\n mX2: number\n) {\n let currentX: number\n let currentT: number\n let i: number = 0\n\n do {\n currentT = lowerBound + (upperBound - lowerBound) / 2.0\n currentX = calcBezier(currentT, mX1, mX2) - x\n if (currentX > 0.0) {\n upperBound = currentT\n } else {\n lowerBound = currentT\n }\n } while (\n Math.abs(currentX) > subdivisionPrecision &&\n ++i < subdivisionMaxIterations\n )\n\n return currentT\n}\n\nexport function cubicBezier(\n mX1: number,\n mY1: number,\n mX2: number,\n mY2: number\n) {\n // If this is a linear gradient, return linear easing\n if (mX1 === mY1 && mX2 === mY2) return noop\n\n const getTForX = (aX: number) => binarySubdivide(aX, 0, 1, mX1, mX2)\n\n // If animation is at start/end, return t without easing\n return (t: number) =>\n t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2)\n}\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;;AAgBE;AAIF;AACA,MAAM,UAAU,GAAG,CAAC,CAAS,EAAE,EAAU,EAAE,EAAU,KACjD,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,EAAE,IAAI,CAAC,IAAI,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,EAAE;AACzE,IAAA,CAAC;AAEL,MAAM,oBAAoB,GAAG,SAAS;AACtC,MAAM,wBAAwB,GAAG,EAAE;AAEnC,SAAS,eAAe,CACpB,CAAS,EACT,UAAkB,EAClB,UAAkB,EAClB,GAAW,EACX,GAAW,EAAA;AAEX,IAAA,IAAI,QAAgB;AACpB,IAAA,IAAI,QAAgB;IACpB,IAAI,CAAC,GAAW,CAAC;AAEjB,IAAA,GAAG;QACC,QAAQ,GAAG,UAAU,GAAG,CAAC,UAAU,GAAG,UAAU,IAAI,GAAG;QACvD,QAAQ,GAAG,UAAU,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC;AAC7C,QAAA,IAAI,QAAQ,GAAG,GAAG,EAAE;YAChB,UAAU,GAAG,QAAQ;QACzB;aAAO;YACH,UAAU,GAAG,QAAQ;QACzB;IACJ,CAAC,QACG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,oBAAoB;QACzC,EAAE,CAAC,GAAG,wBAAwB;AAGlC,IAAA,OAAO,QAAQ;AACnB;AAEM,SAAU,WAAW,CACvB,GAAW,EACX,GAAW,EACX,GAAW,EACX,GAAW,EAAA;;AAGX,IAAA,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG;AAAE,QAAA,OAAO,IAAI;AAE3C,IAAA,MAAM,QAAQ,GAAG,CAAC,EAAU,KAAK,eAAe,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC;;AAGpE,IAAA,OAAO,CAAC,CAAS,KACb,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC;AAClE;;;;"}
|
||||
8
node_modules/motion-utils/dist/es/easing/ease.mjs
generated
vendored
Normal file
8
node_modules/motion-utils/dist/es/easing/ease.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { cubicBezier } from './cubic-bezier.mjs';
|
||||
|
||||
const easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1);
|
||||
const easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1);
|
||||
const easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1);
|
||||
|
||||
export { easeIn, easeInOut, easeOut };
|
||||
//# sourceMappingURL=ease.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/easing/ease.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/easing/ease.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ease.mjs","sources":["../../../src/easing/ease.ts"],"sourcesContent":["import { cubicBezier } from \"./cubic-bezier\"\n\nexport const easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1)\nexport const easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1)\nexport const easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1)\n"],"names":[],"mappings":";;AAEO,MAAM,MAAM,iBAAiB,WAAW,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AACtD,MAAM,OAAO,iBAAiB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC;AACvD,MAAM,SAAS,iBAAiB,WAAW,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC;;;;"}
|
||||
6
node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs
generated
vendored
Normal file
6
node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// Accepts an easing function and returns a new one that outputs mirrored values for
|
||||
// the second half of the animation. Turns easeIn into easeInOut.
|
||||
const mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;
|
||||
|
||||
export { mirrorEasing };
|
||||
//# sourceMappingURL=mirror.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mirror.mjs","sources":["../../../../src/easing/modifiers/mirror.ts"],"sourcesContent":["// Accepts an easing function and returns a new one that outputs mirrored values for\n\nimport { EasingModifier } from \"../types\"\n\n// the second half of the animation. Turns easeIn into easeInOut.\nexport const mirrorEasing: EasingModifier = (easing) => (p) =>\n p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2\n"],"names":[],"mappings":"AAAA;AAIA;MACa,YAAY,GAAmB,CAAC,MAAM,KAAK,CAAC,CAAC,KACtD,CAAC,IAAI,GAAG,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI;;;;"}
|
||||
6
node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs
generated
vendored
Normal file
6
node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// Accepts an easing function and returns a new one that outputs reversed values.
|
||||
// Turns easeIn into easeOut.
|
||||
const reverseEasing = (easing) => (p) => 1 - easing(1 - p);
|
||||
|
||||
export { reverseEasing };
|
||||
//# sourceMappingURL=reverse.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"reverse.mjs","sources":["../../../../src/easing/modifiers/reverse.ts"],"sourcesContent":["// Accepts an easing function and returns a new one that outputs reversed values.\n\nimport { EasingModifier } from \"../types\"\n\n// Turns easeIn into easeOut.\nexport const reverseEasing: EasingModifier = (easing) => (p) =>\n 1 - easing(1 - p)\n"],"names":[],"mappings":"AAAA;AAIA;MACa,aAAa,GAAmB,CAAC,MAAM,KAAK,CAAC,CAAC,KACvD,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC;;;;"}
|
||||
16
node_modules/motion-utils/dist/es/easing/steps.mjs
generated
vendored
Normal file
16
node_modules/motion-utils/dist/es/easing/steps.mjs
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { clamp } from '../clamp.mjs';
|
||||
|
||||
function steps(numSteps, direction = "end") {
|
||||
return (progress) => {
|
||||
progress =
|
||||
direction === "end"
|
||||
? Math.min(progress, 0.999)
|
||||
: Math.max(progress, 0.001);
|
||||
const expanded = progress * numSteps;
|
||||
const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded);
|
||||
return clamp(0, 1, rounded / numSteps);
|
||||
};
|
||||
}
|
||||
|
||||
export { steps };
|
||||
//# sourceMappingURL=steps.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/easing/steps.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/easing/steps.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"steps.mjs","sources":["../../../src/easing/steps.ts"],"sourcesContent":["import { clamp } from \"../clamp\"\nimport type { EasingFunction } from \"./types\"\n\n/*\n Create stepped version of 0-1 progress\n\n @param [int]: Number of steps\n @param [number]: Current value\n @return [number]: Stepped value\n*/\nexport type Direction = \"start\" | \"end\"\n\nexport function steps(\n numSteps: number,\n direction: Direction = \"end\"\n): EasingFunction {\n return (progress: number) => {\n progress =\n direction === \"end\"\n ? Math.min(progress, 0.999)\n : Math.max(progress, 0.001)\n const expanded = progress * numSteps\n const rounded =\n direction === \"end\" ? Math.floor(expanded) : Math.ceil(expanded)\n\n return clamp(0, 1, rounded / numSteps)\n }\n}\n"],"names":[],"mappings":";;SAYgB,KAAK,CACjB,QAAgB,EAChB,YAAuB,KAAK,EAAA;IAE5B,OAAO,CAAC,QAAgB,KAAI;QACxB,QAAQ;AACJ,YAAA,SAAS,KAAK;kBACR,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK;kBACxB,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC;AACnC,QAAA,MAAM,QAAQ,GAAG,QAAQ,GAAG,QAAQ;QACpC,MAAM,OAAO,GACT,SAAS,KAAK,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;QAEpE,OAAO,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;AAC1C,IAAA,CAAC;AACL;;;;"}
|
||||
9
node_modules/motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs
generated
vendored
Normal file
9
node_modules/motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { wrap } from '../../wrap.mjs';
|
||||
import { isEasingArray } from './is-easing-array.mjs';
|
||||
|
||||
function getEasingForSegment(easing, i) {
|
||||
return isEasingArray(easing) ? easing[wrap(0, easing.length, i)] : easing;
|
||||
}
|
||||
|
||||
export { getEasingForSegment };
|
||||
//# sourceMappingURL=get-easing-for-segment.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"get-easing-for-segment.mjs","sources":["../../../../src/easing/utils/get-easing-for-segment.ts"],"sourcesContent":["import { wrap } from \"../../wrap\"\nimport { Easing } from \"../types\"\nimport { isEasingArray } from \"./is-easing-array\"\n\nexport function getEasingForSegment(\n easing: Easing | Easing[],\n i: number\n): Easing {\n return isEasingArray(easing) ? easing[wrap(0, easing.length, i)] : easing\n}\n"],"names":[],"mappings":";;;AAIM,SAAU,mBAAmB,CAC/B,MAAyB,EACzB,CAAS,EAAA;IAET,OAAO,aAAa,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM;AAC7E;;;;"}
|
||||
4
node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs
generated
vendored
Normal file
4
node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
const isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === "number";
|
||||
|
||||
export { isBezierDefinition };
|
||||
//# sourceMappingURL=is-bezier-definition.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"is-bezier-definition.mjs","sources":["../../../../src/easing/utils/is-bezier-definition.ts"],"sourcesContent":["import { BezierDefinition, Easing } from \"../types\"\n\nexport const isBezierDefinition = (\n easing: Easing | Easing[]\n): easing is BezierDefinition =>\n Array.isArray(easing) && typeof easing[0] === \"number\"\n"],"names":[],"mappings":"MAEa,kBAAkB,GAAG,CAC9B,MAAyB,KAEzB,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,OAAO,MAAM,CAAC,CAAC,CAAC,KAAK;;;;"}
|
||||
6
node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs
generated
vendored
Normal file
6
node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
const isEasingArray = (ease) => {
|
||||
return Array.isArray(ease) && typeof ease[0] !== "number";
|
||||
};
|
||||
|
||||
export { isEasingArray };
|
||||
//# sourceMappingURL=is-easing-array.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"is-easing-array.mjs","sources":["../../../../src/easing/utils/is-easing-array.ts"],"sourcesContent":["import { Easing } from \"../types\"\n\nexport const isEasingArray = (ease: any): ease is Easing[] => {\n return Array.isArray(ease) && typeof ease[0] !== \"number\"\n}\n"],"names":[],"mappings":"AAEO,MAAM,aAAa,GAAG,CAAC,IAAS,KAAsB;AACzD,IAAA,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ;AAC7D;;;;"}
|
||||
42
node_modules/motion-utils/dist/es/easing/utils/map.mjs
generated
vendored
Normal file
42
node_modules/motion-utils/dist/es/easing/utils/map.mjs
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
import { invariant } from '../../errors.mjs';
|
||||
import { noop } from '../../noop.mjs';
|
||||
import { anticipate } from '../anticipate.mjs';
|
||||
import { backOut, backInOut, backIn } from '../back.mjs';
|
||||
import { circOut, circInOut, circIn } from '../circ.mjs';
|
||||
import { cubicBezier } from '../cubic-bezier.mjs';
|
||||
import { easeOut, easeInOut, easeIn } from '../ease.mjs';
|
||||
import { isBezierDefinition } from './is-bezier-definition.mjs';
|
||||
|
||||
const easingLookup = {
|
||||
linear: noop,
|
||||
easeIn,
|
||||
easeInOut,
|
||||
easeOut,
|
||||
circIn,
|
||||
circInOut,
|
||||
circOut,
|
||||
backIn,
|
||||
backInOut,
|
||||
backOut,
|
||||
anticipate,
|
||||
};
|
||||
const isValidEasing = (easing) => {
|
||||
return typeof easing === "string";
|
||||
};
|
||||
const easingDefinitionToFunction = (definition) => {
|
||||
if (isBezierDefinition(definition)) {
|
||||
// If cubic bezier definition, create bezier curve
|
||||
invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`, "cubic-bezier-length");
|
||||
const [x1, y1, x2, y2] = definition;
|
||||
return cubicBezier(x1, y1, x2, y2);
|
||||
}
|
||||
else if (isValidEasing(definition)) {
|
||||
// Else lookup from table
|
||||
invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`, "invalid-easing-type");
|
||||
return easingLookup[definition];
|
||||
}
|
||||
return definition;
|
||||
};
|
||||
|
||||
export { easingDefinitionToFunction };
|
||||
//# sourceMappingURL=map.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/easing/utils/map.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/easing/utils/map.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"map.mjs","sources":["../../../../src/easing/utils/map.ts"],"sourcesContent":["import { invariant } from \"../../errors\"\nimport { noop } from \"../../noop\"\nimport { anticipate } from \"../anticipate\"\nimport { backIn, backInOut, backOut } from \"../back\"\nimport { circIn, circInOut, circOut } from \"../circ\"\nimport { cubicBezier } from \"../cubic-bezier\"\nimport { easeIn, easeInOut, easeOut } from \"../ease\"\nimport { Easing, EasingFunction } from \"../types\"\nimport { isBezierDefinition } from \"./is-bezier-definition\"\n\nconst easingLookup = {\n linear: noop,\n easeIn,\n easeInOut,\n easeOut,\n circIn,\n circInOut,\n circOut,\n backIn,\n backInOut,\n backOut,\n anticipate,\n}\n\nconst isValidEasing = (easing: Easing): easing is keyof typeof easingLookup => {\n return typeof easing === \"string\"\n}\n\nexport const easingDefinitionToFunction = (\n definition: Easing\n): EasingFunction => {\n if (isBezierDefinition(definition)) {\n // If cubic bezier definition, create bezier curve\n invariant(\n definition.length === 4,\n `Cubic bezier arrays must contain four numerical values.`,\n \"cubic-bezier-length\"\n )\n\n const [x1, y1, x2, y2] = definition\n return cubicBezier(x1, y1, x2, y2)\n } else if (isValidEasing(definition)) {\n // Else lookup from table\n invariant(\n easingLookup[definition] !== undefined,\n `Invalid easing type '${definition}'`,\n \"invalid-easing-type\"\n )\n return easingLookup[definition]\n }\n\n return definition\n}\n"],"names":[],"mappings":";;;;;;;;;AAUA,MAAM,YAAY,GAAG;AACjB,IAAA,MAAM,EAAE,IAAI;IACZ,MAAM;IACN,SAAS;IACT,OAAO;IACP,MAAM;IACN,SAAS;IACT,OAAO;IACP,MAAM;IACN,SAAS;IACT,OAAO;IACP,UAAU;CACb;AAED,MAAM,aAAa,GAAG,CAAC,MAAc,KAAyC;AAC1E,IAAA,OAAO,OAAO,MAAM,KAAK,QAAQ;AACrC,CAAC;AAEM,MAAM,0BAA0B,GAAG,CACtC,UAAkB,KACF;AAChB,IAAA,IAAI,kBAAkB,CAAC,UAAU,CAAC,EAAE;;QAEhC,SAAS,CACL,UAAU,CAAC,MAAM,KAAK,CAAC,EACvB,CAAA,uDAAA,CAAyD,EACzD,qBAAqB,CACxB;QAED,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,UAAU;QACnC,OAAO,WAAW,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IACtC;AAAO,SAAA,IAAI,aAAa,CAAC,UAAU,CAAC,EAAE;;AAElC,QAAA,SAAS,CACL,YAAY,CAAC,UAAU,CAAC,KAAK,SAAS,EACtC,CAAA,qBAAA,EAAwB,UAAU,CAAA,CAAA,CAAG,EACrC,qBAAqB,CACxB;AACD,QAAA,OAAO,YAAY,CAAC,UAAU,CAAC;IACnC;AAEA,IAAA,OAAO,UAAU;AACrB;;;;"}
|
||||
20
node_modules/motion-utils/dist/es/errors.mjs
generated
vendored
Normal file
20
node_modules/motion-utils/dist/es/errors.mjs
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { formatErrorMessage } from './format-error-message.mjs';
|
||||
|
||||
let warning = () => { };
|
||||
let invariant = () => { };
|
||||
if (typeof process !== "undefined" &&
|
||||
process.env?.NODE_ENV !== "production") {
|
||||
warning = (check, message, errorCode) => {
|
||||
if (!check && typeof console !== "undefined") {
|
||||
console.warn(formatErrorMessage(message, errorCode));
|
||||
}
|
||||
};
|
||||
invariant = (check, message, errorCode) => {
|
||||
if (!check) {
|
||||
throw new Error(formatErrorMessage(message, errorCode));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export { invariant, warning };
|
||||
//# sourceMappingURL=errors.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/errors.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/errors.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"errors.mjs","sources":["../../src/errors.ts"],"sourcesContent":["import { formatErrorMessage } from \"./format-error-message\"\n\nexport type DevMessage = (\n check: boolean,\n message: string,\n errorCode?: string\n) => void\n\nlet warning: DevMessage = () => {}\nlet invariant: DevMessage = () => {}\n\nif (\n typeof process !== \"undefined\" &&\n process.env?.NODE_ENV !== \"production\"\n) {\n warning = (check, message, errorCode) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(formatErrorMessage(message, errorCode))\n }\n }\n\n invariant = (check, message, errorCode) => {\n if (!check) {\n throw new Error(formatErrorMessage(message, errorCode))\n }\n }\n}\n\nexport { invariant, warning }\n"],"names":[],"mappings":";;AAQA,IAAI,OAAO,GAAe,MAAK,EAAE;AACjC,IAAI,SAAS,GAAe,MAAK,EAAE;AAEnC,IACI,OAAO,OAAO,KAAK,WAAW;AAC9B,IAAA,OAAO,CAAC,GAAG,EAAE,QAAQ,KAAK,YAAY,EACxC;IACE,OAAO,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,KAAI;QACpC,IAAI,CAAC,KAAK,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE;YAC1C,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACxD;AACJ,IAAA,CAAC;IAED,SAAS,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,KAAI;QACtC,IAAI,CAAC,KAAK,EAAE;YACR,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAC3D;AACJ,IAAA,CAAC;AACL;;;;"}
|
||||
8
node_modules/motion-utils/dist/es/format-error-message.mjs
generated
vendored
Normal file
8
node_modules/motion-utils/dist/es/format-error-message.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
function formatErrorMessage(message, errorCode) {
|
||||
return errorCode
|
||||
? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}`
|
||||
: message;
|
||||
}
|
||||
|
||||
export { formatErrorMessage };
|
||||
//# sourceMappingURL=format-error-message.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/format-error-message.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/format-error-message.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"format-error-message.mjs","sources":["../../src/format-error-message.ts"],"sourcesContent":["export function formatErrorMessage(message: string, errorCode?: string) {\n return errorCode\n ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}`\n : message\n}\n"],"names":[],"mappings":"AAAM,SAAU,kBAAkB,CAAC,OAAe,EAAE,SAAkB,EAAA;AAClE,IAAA,OAAO;AACH,UAAE,CAAA,EAAG,OAAO,CAAA,uFAAA,EAA0F,SAAS,CAAA;UAC7G,OAAO;AACjB;;;;"}
|
||||
4
node_modules/motion-utils/dist/es/global-config.mjs
generated
vendored
Normal file
4
node_modules/motion-utils/dist/es/global-config.mjs
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
const MotionGlobalConfig = {};
|
||||
|
||||
export { MotionGlobalConfig };
|
||||
//# sourceMappingURL=global-config.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/global-config.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/global-config.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"global-config.mjs","sources":["../../src/global-config.ts"],"sourcesContent":["export const MotionGlobalConfig: {\n skipAnimations?: boolean\n instantAnimations?: boolean\n useManualTiming?: boolean\n WillChange?: any\n mix?: <T>(a: T, b: T) => (p: number) => T\n} = {}\n"],"names":[],"mappings":"AAAO,MAAM,kBAAkB,GAM3B;;;;"}
|
||||
29
node_modules/motion-utils/dist/es/index.mjs
generated
vendored
Normal file
29
node_modules/motion-utils/dist/es/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
export { addUniqueItem, moveItem, removeItem } from './array.mjs';
|
||||
export { clamp } from './clamp.mjs';
|
||||
export { invariant, warning } from './errors.mjs';
|
||||
export { MotionGlobalConfig } from './global-config.mjs';
|
||||
export { isNumericalString } from './is-numerical-string.mjs';
|
||||
export { isObject } from './is-object.mjs';
|
||||
export { isZeroValueString } from './is-zero-value-string.mjs';
|
||||
export { memo } from './memo.mjs';
|
||||
export { noop } from './noop.mjs';
|
||||
export { pipe } from './pipe.mjs';
|
||||
export { progress } from './progress.mjs';
|
||||
export { SubscriptionManager } from './subscription-manager.mjs';
|
||||
export { millisecondsToSeconds, secondsToMilliseconds } from './time-conversion.mjs';
|
||||
export { velocityPerSecond } from './velocity-per-second.mjs';
|
||||
export { hasWarned, warnOnce } from './warn-once.mjs';
|
||||
export { wrap } from './wrap.mjs';
|
||||
export { anticipate } from './easing/anticipate.mjs';
|
||||
export { backIn, backInOut, backOut } from './easing/back.mjs';
|
||||
export { circIn, circInOut, circOut } from './easing/circ.mjs';
|
||||
export { cubicBezier } from './easing/cubic-bezier.mjs';
|
||||
export { easeIn, easeInOut, easeOut } from './easing/ease.mjs';
|
||||
export { mirrorEasing } from './easing/modifiers/mirror.mjs';
|
||||
export { reverseEasing } from './easing/modifiers/reverse.mjs';
|
||||
export { steps } from './easing/steps.mjs';
|
||||
export { getEasingForSegment } from './easing/utils/get-easing-for-segment.mjs';
|
||||
export { isBezierDefinition } from './easing/utils/is-bezier-definition.mjs';
|
||||
export { isEasingArray } from './easing/utils/is-easing-array.mjs';
|
||||
export { easingDefinitionToFunction } from './easing/utils/map.mjs';
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/index.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/index.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
||||
7
node_modules/motion-utils/dist/es/is-numerical-string.mjs
generated
vendored
Normal file
7
node_modules/motion-utils/dist/es/is-numerical-string.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Check if value is a numerical string, ie a string that is purely a number eg "100" or "-100.1"
|
||||
*/
|
||||
const isNumericalString = (v) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(v);
|
||||
|
||||
export { isNumericalString };
|
||||
//# sourceMappingURL=is-numerical-string.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/is-numerical-string.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/is-numerical-string.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"is-numerical-string.mjs","sources":["../../src/is-numerical-string.ts"],"sourcesContent":["/**\n * Check if value is a numerical string, ie a string that is purely a number eg \"100\" or \"-100.1\"\n */\nexport const isNumericalString = (v: string) => /^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(v)\n"],"names":[],"mappings":"AAAA;;AAEG;AACI,MAAM,iBAAiB,GAAG,CAAC,CAAS,KAAK,8BAA8B,CAAC,IAAI,CAAC,CAAC;;;;"}
|
||||
6
node_modules/motion-utils/dist/es/is-object.mjs
generated
vendored
Normal file
6
node_modules/motion-utils/dist/es/is-object.mjs
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
function isObject(value) {
|
||||
return typeof value === "object" && value !== null;
|
||||
}
|
||||
|
||||
export { isObject };
|
||||
//# sourceMappingURL=is-object.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/is-object.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/is-object.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"is-object.mjs","sources":["../../src/is-object.ts"],"sourcesContent":["export function isObject(value: unknown): value is object {\n return typeof value === \"object\" && value !== null\n}\n"],"names":[],"mappings":"AAAM,SAAU,QAAQ,CAAC,KAAc,EAAA;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;AACtD;;;;"}
|
||||
7
node_modules/motion-utils/dist/es/is-zero-value-string.mjs
generated
vendored
Normal file
7
node_modules/motion-utils/dist/es/is-zero-value-string.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Check if the value is a zero value string like "0px" or "0%"
|
||||
*/
|
||||
const isZeroValueString = (v) => /^0[^.\s]+$/u.test(v);
|
||||
|
||||
export { isZeroValueString };
|
||||
//# sourceMappingURL=is-zero-value-string.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/is-zero-value-string.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/is-zero-value-string.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"is-zero-value-string.mjs","sources":["../../src/is-zero-value-string.ts"],"sourcesContent":["/**\n * Check if the value is a zero value string like \"0px\" or \"0%\"\n */\nexport const isZeroValueString = (v: string) => /^0[^.\\s]+$/u.test(v)\n"],"names":[],"mappings":"AAAA;;AAEG;AACI,MAAM,iBAAiB,GAAG,CAAC,CAAS,KAAK,aAAa,CAAC,IAAI,CAAC,CAAC;;;;"}
|
||||
12
node_modules/motion-utils/dist/es/memo.mjs
generated
vendored
Normal file
12
node_modules/motion-utils/dist/es/memo.mjs
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
/*#__NO_SIDE_EFFECTS__*/
|
||||
function memo(callback) {
|
||||
let result;
|
||||
return () => {
|
||||
if (result === undefined)
|
||||
result = callback();
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
export { memo };
|
||||
//# sourceMappingURL=memo.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/memo.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/memo.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"memo.mjs","sources":["../../src/memo.ts"],"sourcesContent":["/*#__NO_SIDE_EFFECTS__*/\nexport function memo<T extends any>(callback: () => T) {\n let result: T | undefined\n\n return () => {\n if (result === undefined) result = callback()\n return result\n }\n}\n"],"names":[],"mappings":"AAAA;AACM,SAAU,IAAI,CAAgB,QAAiB,EAAA;AACjD,IAAA,IAAI,MAAqB;AAEzB,IAAA,OAAO,MAAK;QACR,IAAI,MAAM,KAAK,SAAS;YAAE,MAAM,GAAG,QAAQ,EAAE;AAC7C,QAAA,OAAO,MAAM;AACjB,IAAA,CAAC;AACL;;;;"}
|
||||
5
node_modules/motion-utils/dist/es/noop.mjs
generated
vendored
Normal file
5
node_modules/motion-utils/dist/es/noop.mjs
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/*#__NO_SIDE_EFFECTS__*/
|
||||
const noop = (any) => any;
|
||||
|
||||
export { noop };
|
||||
//# sourceMappingURL=noop.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/noop.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/noop.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"noop.mjs","sources":["../../src/noop.ts"],"sourcesContent":["/*#__NO_SIDE_EFFECTS__*/\nexport const noop = <T>(any: T): T => any\n"],"names":[],"mappings":"AAAA;AACO,MAAM,IAAI,GAAG,CAAI,GAAM,KAAQ;;;;"}
|
||||
12
node_modules/motion-utils/dist/es/pipe.mjs
generated
vendored
Normal file
12
node_modules/motion-utils/dist/es/pipe.mjs
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Pipe
|
||||
* Compose other transformers to run linearily
|
||||
* pipe(min(20), max(40))
|
||||
* @param {...functions} transformers
|
||||
* @return {function}
|
||||
*/
|
||||
const combineFunctions = (a, b) => (v) => b(a(v));
|
||||
const pipe = (...transformers) => transformers.reduce(combineFunctions);
|
||||
|
||||
export { pipe };
|
||||
//# sourceMappingURL=pipe.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/pipe.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/pipe.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"pipe.mjs","sources":["../../src/pipe.ts"],"sourcesContent":["/**\n * Pipe\n * Compose other transformers to run linearily\n * pipe(min(20), max(40))\n * @param {...functions} transformers\n * @return {function}\n */\nconst combineFunctions = (a: Function, b: Function) => (v: any) => b(a(v))\nexport const pipe = (...transformers: Function[]) =>\n transformers.reduce(combineFunctions)\n"],"names":[],"mappings":"AAAA;;;;;;AAMG;AACH,MAAM,gBAAgB,GAAG,CAAC,CAAW,EAAE,CAAW,KAAK,CAAC,CAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACnE,MAAM,IAAI,GAAG,CAAC,GAAG,YAAwB,KAC5C,YAAY,CAAC,MAAM,CAAC,gBAAgB;;;;"}
|
||||
20
node_modules/motion-utils/dist/es/progress.mjs
generated
vendored
Normal file
20
node_modules/motion-utils/dist/es/progress.mjs
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Progress within given range
|
||||
|
||||
Given a lower limit and an upper limit, we return the progress
|
||||
(expressed as a number 0-1) represented by the given value, and
|
||||
limit that progress to within 0-1.
|
||||
|
||||
@param [number]: Lower limit
|
||||
@param [number]: Upper limit
|
||||
@param [number]: Value to find progress within given range
|
||||
@return [number]: Progress of value within range as expressed 0-1
|
||||
*/
|
||||
/*#__NO_SIDE_EFFECTS__*/
|
||||
const progress = (from, to, value) => {
|
||||
const toFromDifference = to - from;
|
||||
return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;
|
||||
};
|
||||
|
||||
export { progress };
|
||||
//# sourceMappingURL=progress.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/progress.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/progress.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"progress.mjs","sources":["../../src/progress.ts"],"sourcesContent":["/*\n Progress within given range\n\n Given a lower limit and an upper limit, we return the progress\n (expressed as a number 0-1) represented by the given value, and\n limit that progress to within 0-1.\n\n @param [number]: Lower limit\n @param [number]: Upper limit\n @param [number]: Value to find progress within given range\n @return [number]: Progress of value within range as expressed 0-1\n*/\n/*#__NO_SIDE_EFFECTS__*/\nexport const progress = (from: number, to: number, value: number) => {\n const toFromDifference = to - from\n\n return toFromDifference === 0 ? 1 : (value - from) / toFromDifference\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;AAWE;AACF;AACO,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAU,EAAE,KAAa,KAAI;AAChE,IAAA,MAAM,gBAAgB,GAAG,EAAE,GAAG,IAAI;AAElC,IAAA,OAAO,gBAAgB,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,GAAG,IAAI,IAAI,gBAAgB;AACzE;;;;"}
|
||||
41
node_modules/motion-utils/dist/es/subscription-manager.mjs
generated
vendored
Normal file
41
node_modules/motion-utils/dist/es/subscription-manager.mjs
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
import { addUniqueItem, removeItem } from './array.mjs';
|
||||
|
||||
class SubscriptionManager {
|
||||
constructor() {
|
||||
this.subscriptions = [];
|
||||
}
|
||||
add(handler) {
|
||||
addUniqueItem(this.subscriptions, handler);
|
||||
return () => removeItem(this.subscriptions, handler);
|
||||
}
|
||||
notify(a, b, c) {
|
||||
const numSubscriptions = this.subscriptions.length;
|
||||
if (!numSubscriptions)
|
||||
return;
|
||||
if (numSubscriptions === 1) {
|
||||
/**
|
||||
* If there's only a single handler we can just call it without invoking a loop.
|
||||
*/
|
||||
this.subscriptions[0](a, b, c);
|
||||
}
|
||||
else {
|
||||
for (let i = 0; i < numSubscriptions; i++) {
|
||||
/**
|
||||
* Check whether the handler exists before firing as it's possible
|
||||
* the subscriptions were modified during this loop running.
|
||||
*/
|
||||
const handler = this.subscriptions[i];
|
||||
handler && handler(a, b, c);
|
||||
}
|
||||
}
|
||||
}
|
||||
getSize() {
|
||||
return this.subscriptions.length;
|
||||
}
|
||||
clear() {
|
||||
this.subscriptions.length = 0;
|
||||
}
|
||||
}
|
||||
|
||||
export { SubscriptionManager };
|
||||
//# sourceMappingURL=subscription-manager.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/subscription-manager.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/subscription-manager.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"subscription-manager.mjs","sources":["../../src/subscription-manager.ts"],"sourcesContent":["import { addUniqueItem, removeItem } from \"./array\"\n\ntype GenericHandler = (...args: any) => void\n\nexport class SubscriptionManager<Handler extends GenericHandler> {\n private subscriptions: Handler[] = []\n\n add(handler: Handler): VoidFunction {\n addUniqueItem(this.subscriptions, handler)\n return () => removeItem(this.subscriptions, handler)\n }\n\n notify(\n a?: Parameters<Handler>[0],\n b?: Parameters<Handler>[1],\n c?: Parameters<Handler>[2]\n ) {\n const numSubscriptions = this.subscriptions.length\n\n if (!numSubscriptions) return\n\n if (numSubscriptions === 1) {\n /**\n * If there's only a single handler we can just call it without invoking a loop.\n */\n this.subscriptions[0](a, b, c)\n } else {\n for (let i = 0; i < numSubscriptions; i++) {\n /**\n * Check whether the handler exists before firing as it's possible\n * the subscriptions were modified during this loop running.\n */\n const handler = this.subscriptions[i]\n handler && handler(a, b, c)\n }\n }\n }\n\n getSize() {\n return this.subscriptions.length\n }\n\n clear() {\n this.subscriptions.length = 0\n }\n}\n"],"names":[],"mappings":";;MAIa,mBAAmB,CAAA;AAAhC,IAAA,WAAA,GAAA;QACY,IAAA,CAAA,aAAa,GAAc,EAAE;IAwCzC;AAtCI,IAAA,GAAG,CAAC,OAAgB,EAAA;AAChB,QAAA,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC;QAC1C,OAAO,MAAM,UAAU,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC;IACxD;AAEA,IAAA,MAAM,CACF,CAA0B,EAC1B,CAA0B,EAC1B,CAA0B,EAAA;AAE1B,QAAA,MAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM;AAElD,QAAA,IAAI,CAAC,gBAAgB;YAAE;AAEvB,QAAA,IAAI,gBAAgB,KAAK,CAAC,EAAE;AACxB;;AAEG;AACH,YAAA,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAClC;aAAO;AACH,YAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,gBAAgB,EAAE,CAAC,EAAE,EAAE;AACvC;;;AAGG;gBACH,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;gBACrC,OAAO,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;YAC/B;QACJ;IACJ;IAEA,OAAO,GAAA;AACH,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM;IACpC;IAEA,KAAK,GAAA;AACD,QAAA,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC;IACjC;AACH;;;;"}
|
||||
13
node_modules/motion-utils/dist/es/time-conversion.mjs
generated
vendored
Normal file
13
node_modules/motion-utils/dist/es/time-conversion.mjs
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Converts seconds to milliseconds
|
||||
*
|
||||
* @param seconds - Time in seconds.
|
||||
* @return milliseconds - Converted time in milliseconds.
|
||||
*/
|
||||
/*#__NO_SIDE_EFFECTS__*/
|
||||
const secondsToMilliseconds = (seconds) => seconds * 1000;
|
||||
/*#__NO_SIDE_EFFECTS__*/
|
||||
const millisecondsToSeconds = (milliseconds) => milliseconds / 1000;
|
||||
|
||||
export { millisecondsToSeconds, secondsToMilliseconds };
|
||||
//# sourceMappingURL=time-conversion.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/time-conversion.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/time-conversion.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"time-conversion.mjs","sources":["../../src/time-conversion.ts"],"sourcesContent":["/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\n\n/*#__NO_SIDE_EFFECTS__*/\nexport const secondsToMilliseconds = (seconds: number) => seconds * 1000\n\n/*#__NO_SIDE_EFFECTS__*/\nexport const millisecondsToSeconds = (milliseconds: number) =>\n milliseconds / 1000\n"],"names":[],"mappings":"AAAA;;;;;AAKG;AAEH;AACO,MAAM,qBAAqB,GAAG,CAAC,OAAe,KAAK,OAAO,GAAG;AAEpE;AACO,MAAM,qBAAqB,GAAG,CAAC,YAAoB,KACtD,YAAY,GAAG;;;;"}
|
||||
12
node_modules/motion-utils/dist/es/velocity-per-second.mjs
generated
vendored
Normal file
12
node_modules/motion-utils/dist/es/velocity-per-second.mjs
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Convert velocity into velocity per second
|
||||
|
||||
@param [number]: Unit per frame
|
||||
@param [number]: Frame duration in ms
|
||||
*/
|
||||
function velocityPerSecond(velocity, frameDuration) {
|
||||
return frameDuration ? velocity * (1000 / frameDuration) : 0;
|
||||
}
|
||||
|
||||
export { velocityPerSecond };
|
||||
//# sourceMappingURL=velocity-per-second.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/velocity-per-second.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/velocity-per-second.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"velocity-per-second.mjs","sources":["../../src/velocity-per-second.ts"],"sourcesContent":["/*\n Convert velocity into velocity per second\n\n @param [number]: Unit per frame\n @param [number]: Frame duration in ms\n*/\nexport function velocityPerSecond(velocity: number, frameDuration: number) {\n return frameDuration ? velocity * (1000 / frameDuration) : 0\n}\n"],"names":[],"mappings":"AAAA;;;;;AAKE;AACI,SAAU,iBAAiB,CAAC,QAAgB,EAAE,aAAqB,EAAA;AACrE,IAAA,OAAO,aAAa,GAAG,QAAQ,IAAI,IAAI,GAAG,aAAa,CAAC,GAAG,CAAC;AAChE;;;;"}
|
||||
15
node_modules/motion-utils/dist/es/warn-once.mjs
generated
vendored
Normal file
15
node_modules/motion-utils/dist/es/warn-once.mjs
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import { formatErrorMessage } from './format-error-message.mjs';
|
||||
|
||||
const warned = new Set();
|
||||
function hasWarned(message) {
|
||||
return warned.has(message);
|
||||
}
|
||||
function warnOnce(condition, message, errorCode) {
|
||||
if (condition || warned.has(message))
|
||||
return;
|
||||
console.warn(formatErrorMessage(message, errorCode));
|
||||
warned.add(message);
|
||||
}
|
||||
|
||||
export { hasWarned, warnOnce };
|
||||
//# sourceMappingURL=warn-once.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/warn-once.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/warn-once.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"warn-once.mjs","sources":["../../src/warn-once.ts"],"sourcesContent":["import { formatErrorMessage } from \"./format-error-message\"\n\nconst warned = new Set<string>()\n\nexport function hasWarned(message: string) {\n return warned.has(message)\n}\n\nexport function warnOnce(\n condition: boolean,\n message: string,\n errorCode?: string\n) {\n if (condition || warned.has(message)) return\n\n console.warn(formatErrorMessage(message, errorCode))\n warned.add(message)\n}\n"],"names":[],"mappings":";;AAEA,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU;AAE1B,SAAU,SAAS,CAAC,OAAe,EAAA;AACrC,IAAA,OAAO,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC;AAC9B;SAEgB,QAAQ,CACpB,SAAkB,EAClB,OAAe,EACf,SAAkB,EAAA;AAElB,IAAA,IAAI,SAAS,IAAI,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC;QAAE;IAEtC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AACpD,IAAA,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC;AACvB;;;;"}
|
||||
7
node_modules/motion-utils/dist/es/wrap.mjs
generated
vendored
Normal file
7
node_modules/motion-utils/dist/es/wrap.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
const wrap = (min, max, v) => {
|
||||
const rangeSize = max - min;
|
||||
return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min;
|
||||
};
|
||||
|
||||
export { wrap };
|
||||
//# sourceMappingURL=wrap.mjs.map
|
||||
1
node_modules/motion-utils/dist/es/wrap.mjs.map
generated
vendored
Normal file
1
node_modules/motion-utils/dist/es/wrap.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"wrap.mjs","sources":["../../src/wrap.ts"],"sourcesContent":["export const wrap = (min: number, max: number, v: number) => {\n const rangeSize = max - min\n return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min\n}\n"],"names":[],"mappings":"AAAO,MAAM,IAAI,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,CAAS,KAAI;AACxD,IAAA,MAAM,SAAS,GAAG,GAAG,GAAG,GAAG;AAC3B,IAAA,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,SAAS,IAAI,SAAS,IAAI,SAAS,IAAI,GAAG;AACpE;;;;"}
|
||||
Reference in New Issue
Block a user