Mission Control Dashboard - Initial implementation
This commit is contained in:
14
node_modules/motion-dom/dist/es/animation/waapi/supports/partial-keyframes.mjs
generated
vendored
Normal file
14
node_modules/motion-dom/dist/es/animation/waapi/supports/partial-keyframes.mjs
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { memo } from 'motion-utils';
|
||||
|
||||
const supportsPartialKeyframes = /*@__PURE__*/ memo(() => {
|
||||
try {
|
||||
document.createElement("div").animate({ opacity: [1] });
|
||||
}
|
||||
catch (e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
export { supportsPartialKeyframes };
|
||||
//# sourceMappingURL=partial-keyframes.mjs.map
|
||||
1
node_modules/motion-dom/dist/es/animation/waapi/supports/partial-keyframes.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/animation/waapi/supports/partial-keyframes.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"partial-keyframes.mjs","sources":["../../../../../src/animation/waapi/supports/partial-keyframes.ts"],"sourcesContent":["import { memo } from \"motion-utils\"\n\nexport const supportsPartialKeyframes = /*@__PURE__*/ memo(() => {\n try {\n document.createElement(\"div\").animate({ opacity: [1] })\n } catch (e) {\n return false\n }\n return true\n})\n"],"names":[],"mappings":";;MAEa,wBAAwB,iBAAiB,IAAI,CAAC,MAAK;AAC5D,IAAA,IAAI;AACA,QAAA,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3D;IAAE,OAAO,CAAC,EAAE;AACR,QAAA,OAAO,KAAK;IAChB;AACA,IAAA,OAAO,IAAI;AACf,CAAC;;;;"}
|
||||
53
node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs
generated
vendored
Normal file
53
node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
import { memo } from 'motion-utils';
|
||||
import { acceleratedValues } from '../utils/accelerated-values.mjs';
|
||||
import { hasBrowserOnlyColors } from '../utils/is-browser-color.mjs';
|
||||
|
||||
const colorProperties = new Set([
|
||||
"color",
|
||||
"backgroundColor",
|
||||
"outlineColor",
|
||||
"fill",
|
||||
"stroke",
|
||||
"borderColor",
|
||||
"borderTopColor",
|
||||
"borderRightColor",
|
||||
"borderBottomColor",
|
||||
"borderLeftColor",
|
||||
]);
|
||||
const supportsWaapi = /*@__PURE__*/ memo(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
||||
function supportsBrowserAnimation(options) {
|
||||
const { motionValue, name, repeatDelay, repeatType, damping, type, keyframes, } = options;
|
||||
const subject = motionValue?.owner?.current;
|
||||
/**
|
||||
* We use this check instead of isHTMLElement() because we explicitly
|
||||
* **don't** want elements in different timing contexts (i.e. popups)
|
||||
* to be accelerated, as it's not possible to sync these animations
|
||||
* properly with those driven from the main window frameloop.
|
||||
*/
|
||||
if (!(subject instanceof HTMLElement)) {
|
||||
return false;
|
||||
}
|
||||
const { onUpdate, transformTemplate } = motionValue.owner.getProps();
|
||||
return (supportsWaapi() &&
|
||||
name &&
|
||||
/**
|
||||
* Force WAAPI for color properties with browser-only color formats
|
||||
* (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse.
|
||||
*/
|
||||
(acceleratedValues.has(name) ||
|
||||
(colorProperties.has(name) &&
|
||||
hasBrowserOnlyColors(keyframes))) &&
|
||||
(name !== "transform" || !transformTemplate) &&
|
||||
/**
|
||||
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
||||
* no way to read the value from WAAPI every frame.
|
||||
*/
|
||||
!onUpdate &&
|
||||
!repeatDelay &&
|
||||
repeatType !== "mirror" &&
|
||||
damping !== 0 &&
|
||||
type !== "inertia");
|
||||
}
|
||||
|
||||
export { supportsBrowserAnimation };
|
||||
//# sourceMappingURL=waapi.mjs.map
|
||||
1
node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"waapi.mjs","sources":["../../../../../src/animation/waapi/supports/waapi.ts"],"sourcesContent":["import { memo } from \"motion-utils\"\nimport {\n AnyResolvedKeyframe,\n ValueAnimationOptionsWithRenderContext,\n} from \"../../types\"\nimport { acceleratedValues } from \"../utils/accelerated-values\"\nimport { hasBrowserOnlyColors } from \"../utils/is-browser-color\"\n\nconst colorProperties = new Set([\n \"color\",\n \"backgroundColor\",\n \"outlineColor\",\n \"fill\",\n \"stroke\",\n \"borderColor\",\n \"borderTopColor\",\n \"borderRightColor\",\n \"borderBottomColor\",\n \"borderLeftColor\",\n])\n\nconst supportsWaapi = /*@__PURE__*/ memo(() =>\n Object.hasOwnProperty.call(Element.prototype, \"animate\")\n)\n\nexport function supportsBrowserAnimation<T extends AnyResolvedKeyframe>(\n options: ValueAnimationOptionsWithRenderContext<T>\n) {\n const {\n motionValue,\n name,\n repeatDelay,\n repeatType,\n damping,\n type,\n keyframes,\n } = options\n\n const subject = motionValue?.owner?.current\n\n /**\n * We use this check instead of isHTMLElement() because we explicitly\n * **don't** want elements in different timing contexts (i.e. popups)\n * to be accelerated, as it's not possible to sync these animations\n * properly with those driven from the main window frameloop.\n */\n if (!(subject instanceof HTMLElement)) {\n return false\n }\n\n const { onUpdate, transformTemplate } = motionValue!.owner!.getProps()\n\n return (\n supportsWaapi() &&\n name &&\n /**\n * Force WAAPI for color properties with browser-only color formats\n * (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse.\n */\n (acceleratedValues.has(name) ||\n (colorProperties.has(name) &&\n hasBrowserOnlyColors(keyframes))) &&\n (name !== \"transform\" || !transformTemplate) &&\n /**\n * If we're outputting values to onUpdate then we can't use WAAPI as there's\n * no way to read the value from WAAPI every frame.\n */\n !onUpdate &&\n !repeatDelay &&\n repeatType !== \"mirror\" &&\n damping !== 0 &&\n type !== \"inertia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