Mission Control Dashboard - Initial implementation
This commit is contained in:
18
node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs
generated
vendored
Normal file
18
node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Implement a practical max duration for keyframe generation
|
||||
* to prevent infinite loops
|
||||
*/
|
||||
const maxGeneratorDuration = 20000;
|
||||
function calcGeneratorDuration(generator) {
|
||||
let duration = 0;
|
||||
const timeStep = 50;
|
||||
let state = generator.next(duration);
|
||||
while (!state.done && duration < maxGeneratorDuration) {
|
||||
duration += timeStep;
|
||||
state = generator.next(duration);
|
||||
}
|
||||
return duration >= maxGeneratorDuration ? Infinity : duration;
|
||||
}
|
||||
|
||||
export { calcGeneratorDuration, maxGeneratorDuration };
|
||||
//# sourceMappingURL=calc-duration.mjs.map
|
||||
1
node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"calc-duration.mjs","sources":["../../../../../src/animation/generators/utils/calc-duration.ts"],"sourcesContent":["import { KeyframeGenerator } from \"../../types\"\n\n/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nexport const maxGeneratorDuration = 20_000\nexport function calcGeneratorDuration(\n generator: KeyframeGenerator<unknown>\n): number {\n let duration = 0\n const timeStep = 50\n let state = generator.next(duration)\n while (!state.done && duration < maxGeneratorDuration) {\n duration += timeStep\n state = generator.next(duration)\n }\n\n return duration >= maxGeneratorDuration ? Infinity : duration\n}\n"],"names":[],"mappings":"AAEA;;;AAGG;AACI,MAAM,oBAAoB,GAAG;AAC9B,SAAU,qBAAqB,CACjC,SAAqC,EAAA;IAErC,IAAI,QAAQ,GAAG,CAAC;IAChB,MAAM,QAAQ,GAAG,EAAE;IACnB,IAAI,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;IACpC,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,QAAQ,GAAG,oBAAoB,EAAE;QACnD,QAAQ,IAAI,QAAQ;AACpB,QAAA,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;IACpC;IAEA,OAAO,QAAQ,IAAI,oBAAoB,GAAG,QAAQ,GAAG,QAAQ;AACjE;;;;"}
|
||||
20
node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs
generated
vendored
Normal file
20
node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { millisecondsToSeconds } from 'motion-utils';
|
||||
import { calcGeneratorDuration, maxGeneratorDuration } from './calc-duration.mjs';
|
||||
|
||||
/**
|
||||
* Create a progress => progress easing function from a generator.
|
||||
*/
|
||||
function createGeneratorEasing(options, scale = 100, createGenerator) {
|
||||
const generator = createGenerator({ ...options, keyframes: [0, scale] });
|
||||
const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);
|
||||
return {
|
||||
type: "keyframes",
|
||||
ease: (progress) => {
|
||||
return generator.next(duration * progress).value / scale;
|
||||
},
|
||||
duration: millisecondsToSeconds(duration),
|
||||
};
|
||||
}
|
||||
|
||||
export { createGeneratorEasing };
|
||||
//# sourceMappingURL=create-generator-easing.mjs.map
|
||||
1
node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"create-generator-easing.mjs","sources":["../../../../../src/animation/generators/utils/create-generator-easing.ts"],"sourcesContent":["import { millisecondsToSeconds } from \"motion-utils\"\nimport { GeneratorFactory, Transition } from \"../../types\"\nimport { calcGeneratorDuration, maxGeneratorDuration } from \"./calc-duration\"\n\n/**\n * Create a progress => progress easing function from a generator.\n */\nexport function createGeneratorEasing(\n options: Transition,\n scale = 100,\n createGenerator: GeneratorFactory\n) {\n const generator = createGenerator({ ...options, keyframes: [0, scale] })\n const duration = Math.min(\n calcGeneratorDuration(generator),\n maxGeneratorDuration\n )\n\n return {\n type: \"keyframes\",\n ease: (progress: number) => {\n return generator.next(duration * progress).value / scale\n },\n duration: millisecondsToSeconds(duration),\n }\n}\n"],"names":[],"mappings":";;;AAIA;;AAEG;AACG,SAAU,qBAAqB,CACjC,OAAmB,EACnB,KAAK,GAAG,GAAG,EACX,eAAiC,EAAA;AAEjC,IAAA,MAAM,SAAS,GAAG,eAAe,CAAC,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;AACxE,IAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CACrB,qBAAqB,CAAC,SAAS,CAAC,EAChC,oBAAoB,CACvB;IAED,OAAO;AACH,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,IAAI,EAAE,CAAC,QAAgB,KAAI;AACvB,YAAA,OAAO,SAAS,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC,KAAK,GAAG,KAAK;QAC5D,CAAC;AACD,QAAA,QAAQ,EAAE,qBAAqB,CAAC,QAAQ,CAAC;KAC5C;AACL;;;;"}
|
||||
6
node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs
generated
vendored
Normal file
6
node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
function isGenerator(type) {
|
||||
return typeof type === "function" && "applyToOptions" in type;
|
||||
}
|
||||
|
||||
export { isGenerator };
|
||||
//# sourceMappingURL=is-generator.mjs.map
|
||||
1
node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"is-generator.mjs","sources":["../../../../../src/animation/generators/utils/is-generator.ts"],"sourcesContent":["import { AnimationGeneratorType, GeneratorFactory } from \"../../types\"\n\nexport function isGenerator(\n type?: AnimationGeneratorType\n): type is GeneratorFactory {\n return typeof type === \"function\" && \"applyToOptions\" in type\n}\n"],"names":[],"mappings":"AAEM,SAAU,WAAW,CACvB,IAA6B,EAAA;IAE7B,OAAO,OAAO,IAAI,KAAK,UAAU,IAAI,gBAAgB,IAAI,IAAI;AACjE;;;;"}
|
||||
10
node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs
generated
vendored
Normal file
10
node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { velocityPerSecond } from 'motion-utils';
|
||||
|
||||
const velocitySampleDuration = 5; // ms
|
||||
function getGeneratorVelocity(resolveValue, t, current) {
|
||||
const prevT = Math.max(t - velocitySampleDuration, 0);
|
||||
return velocityPerSecond(current - resolveValue(prevT), t - prevT);
|
||||
}
|
||||
|
||||
export { getGeneratorVelocity };
|
||||
//# sourceMappingURL=velocity.mjs.map
|
||||
1
node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"velocity.mjs","sources":["../../../../../src/animation/generators/utils/velocity.ts"],"sourcesContent":["import { velocityPerSecond } from \"motion-utils\"\n\nconst velocitySampleDuration = 5 // ms\n\nexport function getGeneratorVelocity(\n resolveValue: (v: number) => number,\n t: number,\n current: number\n) {\n const prevT = Math.max(t - velocitySampleDuration, 0)\n return velocityPerSecond(current - resolveValue(prevT), t - prevT)\n}\n"],"names":[],"mappings":";;AAEA,MAAM,sBAAsB,GAAG,CAAC,CAAA;SAEhB,oBAAoB,CAChC,YAAmC,EACnC,CAAS,EACT,OAAe,EAAA;AAEf,IAAA,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,sBAAsB,EAAE,CAAC,CAAC;AACrD,IAAA,OAAO,iBAAiB,CAAC,OAAO,GAAG,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC;AACtE;;;;"}
|
||||
Reference in New Issue
Block a user