first commit

This commit is contained in:
2026-06-24 09:48:54 +02:00
commit 41e62ddcad
33739 changed files with 4266226 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
/**
* Add the ability for test suites to manually set support flags
* to better test more environments.
*/
const supportsFlags = {
linearEasing: undefined,
};
export { supportsFlags };
+15
View File
@@ -0,0 +1,15 @@
import { memoSupports } from './memo.mjs';
const supportsLinearEasing = /*@__PURE__*/ memoSupports(() => {
try {
document
.createElement("div")
.animate({ opacity: 0 }, { easing: "linear(0, 1)" });
}
catch (e) {
return false;
}
return true;
}, "linearEasing");
export { supportsLinearEasing };
+9
View File
@@ -0,0 +1,9 @@
import { memo } from 'motion-utils';
import { supportsFlags } from './flags.mjs';
function memoSupports(callback, supportsFlag) {
const memoized = memo(callback);
return () => { var _a; return (_a = supportsFlags[supportsFlag]) !== null && _a !== void 0 ? _a : memoized(); };
}
export { memoSupports };
+5
View File
@@ -0,0 +1,5 @@
import { memo } from 'motion-utils';
const supportsScrollTimeline = memo(() => window.ScrollTimeline !== undefined);
export { supportsScrollTimeline };