📚 Documentação inicial do ALETHEIA
- MANUAL-PRODUTO.md: Manual do usuário final - MANUAL-VENDAS.md: Estratégia comercial e vendas - MANUAL-TECNICO.md: Infraestrutura e deploy - README.md: Visão geral do projeto
This commit is contained in:
6
frontend/node_modules/motion-dom/dist/es/animation/waapi/utils/attach-timeline.mjs
generated
vendored
Normal file
6
frontend/node_modules/motion-dom/dist/es/animation/waapi/utils/attach-timeline.mjs
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
function attachTimeline(animation, timeline) {
|
||||
animation.timeline = timeline;
|
||||
animation.onfinish = null;
|
||||
}
|
||||
|
||||
export { attachTimeline };
|
||||
55
frontend/node_modules/motion-dom/dist/es/animation/waapi/utils/convert-options.mjs
generated
vendored
Normal file
55
frontend/node_modules/motion-dom/dist/es/animation/waapi/utils/convert-options.mjs
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
import { secondsToMilliseconds } from 'motion-utils';
|
||||
import { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';
|
||||
import { createGeneratorEasing } from '../../generators/utils/create-generator-easing.mjs';
|
||||
import { isGenerator } from '../../generators/utils/is-generator.mjs';
|
||||
import { mapEasingToNativeEasing } from './easing.mjs';
|
||||
|
||||
const defaultEasing = "easeOut";
|
||||
function applyGeneratorOptions(options) {
|
||||
var _a;
|
||||
if (isGenerator(options.type)) {
|
||||
const generatorOptions = createGeneratorEasing(options, 100, options.type);
|
||||
options.ease = supportsLinearEasing()
|
||||
? generatorOptions.ease
|
||||
: defaultEasing;
|
||||
options.duration = secondsToMilliseconds(generatorOptions.duration);
|
||||
options.type = "keyframes";
|
||||
}
|
||||
else {
|
||||
options.duration = secondsToMilliseconds((_a = options.duration) !== null && _a !== void 0 ? _a : 0.3);
|
||||
options.ease = options.ease || defaultEasing;
|
||||
}
|
||||
}
|
||||
// TODO: Reuse for NativeAnimation
|
||||
function convertMotionOptionsToNative(valueName, keyframes, options) {
|
||||
var _a;
|
||||
const nativeKeyframes = {};
|
||||
const nativeOptions = {
|
||||
fill: "both",
|
||||
easing: "linear",
|
||||
composite: "replace",
|
||||
};
|
||||
nativeOptions.delay = secondsToMilliseconds((_a = options.delay) !== null && _a !== void 0 ? _a : 0);
|
||||
applyGeneratorOptions(options);
|
||||
nativeOptions.duration = options.duration;
|
||||
const { ease, times } = options;
|
||||
if (times)
|
||||
nativeKeyframes.offset = times;
|
||||
nativeKeyframes[valueName] = keyframes;
|
||||
const easing = mapEasingToNativeEasing(ease, options.duration);
|
||||
/**
|
||||
* If this is an easing array, apply to keyframes, not animation as a whole
|
||||
*/
|
||||
if (Array.isArray(easing)) {
|
||||
nativeKeyframes.easing = easing;
|
||||
}
|
||||
else {
|
||||
nativeOptions.easing = easing;
|
||||
}
|
||||
return {
|
||||
keyframes: nativeKeyframes,
|
||||
options: nativeOptions,
|
||||
};
|
||||
}
|
||||
|
||||
export { applyGeneratorOptions, convertMotionOptionsToNative };
|
||||
44
frontend/node_modules/motion-dom/dist/es/animation/waapi/utils/easing.mjs
generated
vendored
Normal file
44
frontend/node_modules/motion-dom/dist/es/animation/waapi/utils/easing.mjs
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
import { isBezierDefinition } from '../../../utils/is-bezier-definition.mjs';
|
||||
import { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';
|
||||
import { generateLinearEasing } from './linear.mjs';
|
||||
|
||||
function isWaapiSupportedEasing(easing) {
|
||||
return Boolean((typeof easing === "function" && supportsLinearEasing()) ||
|
||||
!easing ||
|
||||
(typeof easing === "string" &&
|
||||
(easing in supportedWaapiEasing || supportsLinearEasing())) ||
|
||||
isBezierDefinition(easing) ||
|
||||
(Array.isArray(easing) && easing.every(isWaapiSupportedEasing)));
|
||||
}
|
||||
const cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;
|
||||
const supportedWaapiEasing = {
|
||||
linear: "linear",
|
||||
ease: "ease",
|
||||
easeIn: "ease-in",
|
||||
easeOut: "ease-out",
|
||||
easeInOut: "ease-in-out",
|
||||
circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]),
|
||||
circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]),
|
||||
backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),
|
||||
backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),
|
||||
};
|
||||
function mapEasingToNativeEasing(easing, duration) {
|
||||
if (!easing) {
|
||||
return undefined;
|
||||
}
|
||||
else if (typeof easing === "function" && supportsLinearEasing()) {
|
||||
return generateLinearEasing(easing, duration);
|
||||
}
|
||||
else if (isBezierDefinition(easing)) {
|
||||
return cubicBezierAsString(easing);
|
||||
}
|
||||
else if (Array.isArray(easing)) {
|
||||
return easing.map((segmentEasing) => mapEasingToNativeEasing(segmentEasing, duration) ||
|
||||
supportedWaapiEasing.easeOut);
|
||||
}
|
||||
else {
|
||||
return supportedWaapiEasing[easing];
|
||||
}
|
||||
}
|
||||
|
||||
export { cubicBezierAsString, isWaapiSupportedEasing, mapEasingToNativeEasing, supportedWaapiEasing };
|
||||
14
frontend/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs
generated
vendored
Normal file
14
frontend/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { progress } from 'motion-utils';
|
||||
|
||||
const generateLinearEasing = (easing, duration, // as milliseconds
|
||||
resolution = 10 // as milliseconds
|
||||
) => {
|
||||
let points = "";
|
||||
const numPoints = Math.max(Math.round(duration / resolution), 2);
|
||||
for (let i = 0; i < numPoints; i++) {
|
||||
points += easing(progress(0, numPoints - 1, i)) + ", ";
|
||||
}
|
||||
return `linear(${points.substring(0, points.length - 2)})`;
|
||||
};
|
||||
|
||||
export { generateLinearEasing };
|
||||
Reference in New Issue
Block a user