Mission Control Dashboard - Initial implementation
This commit is contained in:
12
node_modules/motion-dom/dist/es/view/utils/choose-layer-type.mjs
generated
vendored
Normal file
12
node_modules/motion-dom/dist/es/view/utils/choose-layer-type.mjs
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
function chooseLayerType(valueName) {
|
||||
if (valueName === "layout")
|
||||
return "group";
|
||||
if (valueName === "enter" || valueName === "new")
|
||||
return "new";
|
||||
if (valueName === "exit" || valueName === "old")
|
||||
return "old";
|
||||
return "group";
|
||||
}
|
||||
|
||||
export { chooseLayerType };
|
||||
//# sourceMappingURL=choose-layer-type.mjs.map
|
||||
1
node_modules/motion-dom/dist/es/view/utils/choose-layer-type.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/view/utils/choose-layer-type.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"choose-layer-type.mjs","sources":["../../../../src/view/utils/choose-layer-type.ts"],"sourcesContent":["export function chooseLayerType(\n valueName: \"layout\" | \"enter\" | \"exit\" | \"new\" | \"old\"\n): \"group\" | \"old\" | \"new\" {\n if (valueName === \"layout\") return \"group\"\n if (valueName === \"enter\" || valueName === \"new\") return \"new\"\n if (valueName === \"exit\" || valueName === \"old\") return \"old\"\n\n return \"group\"\n}\n"],"names":[],"mappings":"AAAM,SAAU,eAAe,CAC3B,SAAsD,EAAA;IAEtD,IAAI,SAAS,KAAK,QAAQ;AAAE,QAAA,OAAO,OAAO;AAC1C,IAAA,IAAI,SAAS,KAAK,OAAO,IAAI,SAAS,KAAK,KAAK;AAAE,QAAA,OAAO,KAAK;AAC9D,IAAA,IAAI,SAAS,KAAK,MAAM,IAAI,SAAS,KAAK,KAAK;AAAE,QAAA,OAAO,KAAK;AAE7D,IAAA,OAAO,OAAO;AAClB;;;;"}
|
||||
33
node_modules/motion-dom/dist/es/view/utils/css.mjs
generated
vendored
Normal file
33
node_modules/motion-dom/dist/es/view/utils/css.mjs
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
let pendingRules = {};
|
||||
let style = null;
|
||||
const css = {
|
||||
set: (selector, values) => {
|
||||
pendingRules[selector] = values;
|
||||
},
|
||||
commit: () => {
|
||||
if (!style) {
|
||||
style = document.createElement("style");
|
||||
style.id = "motion-view";
|
||||
}
|
||||
let cssText = "";
|
||||
for (const selector in pendingRules) {
|
||||
const rule = pendingRules[selector];
|
||||
cssText += `${selector} {\n`;
|
||||
for (const [property, value] of Object.entries(rule)) {
|
||||
cssText += ` ${property}: ${value};\n`;
|
||||
}
|
||||
cssText += "}\n";
|
||||
}
|
||||
style.textContent = cssText;
|
||||
document.head.appendChild(style);
|
||||
pendingRules = {};
|
||||
},
|
||||
remove: () => {
|
||||
if (style && style.parentElement) {
|
||||
style.parentElement.removeChild(style);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export { css };
|
||||
//# sourceMappingURL=css.mjs.map
|
||||
1
node_modules/motion-dom/dist/es/view/utils/css.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/view/utils/css.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"css.mjs","sources":["../../../../src/view/utils/css.ts"],"sourcesContent":["let pendingRules: Record<string, Record<string, string>> = {}\n\nlet style: HTMLStyleElement | null = null\n\nexport const css = {\n set: (selector: string, values: Record<string, string>) => {\n pendingRules[selector] = values\n },\n\n commit: () => {\n if (!style) {\n style = document.createElement(\"style\")\n style.id = \"motion-view\"\n }\n\n let cssText = \"\"\n\n for (const selector in pendingRules) {\n const rule = pendingRules[selector]\n cssText += `${selector} {\\n`\n for (const [property, value] of Object.entries(rule)) {\n cssText += ` ${property}: ${value};\\n`\n }\n cssText += \"}\\n\"\n }\n\n style.textContent = cssText\n document.head.appendChild(style)\n\n pendingRules = {}\n },\n\n remove: () => {\n if (style && style.parentElement) {\n style.parentElement.removeChild(style)\n }\n },\n}\n"],"names":[],"mappings":"AAAA,IAAI,YAAY,GAA2C,EAAE;AAE7D,IAAI,KAAK,GAA4B,IAAI;AAElC,MAAM,GAAG,GAAG;AACf,IAAA,GAAG,EAAE,CAAC,QAAgB,EAAE,MAA8B,KAAI;AACtD,QAAA,YAAY,CAAC,QAAQ,CAAC,GAAG,MAAM;IACnC,CAAC;IAED,MAAM,EAAE,MAAK;QACT,IAAI,CAAC,KAAK,EAAE;AACR,YAAA,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AACvC,YAAA,KAAK,CAAC,EAAE,GAAG,aAAa;QAC5B;QAEA,IAAI,OAAO,GAAG,EAAE;AAEhB,QAAA,KAAK,MAAM,QAAQ,IAAI,YAAY,EAAE;AACjC,YAAA,MAAM,IAAI,GAAG,YAAY,CAAC,QAAQ,CAAC;AACnC,YAAA,OAAO,IAAI,CAAA,EAAG,QAAQ,CAAA,IAAA,CAAM;AAC5B,YAAA,KAAK,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;AAClD,gBAAA,OAAO,IAAI,CAAA,EAAA,EAAK,QAAQ,CAAA,EAAA,EAAK,KAAK,KAAK;YAC3C;YACA,OAAO,IAAI,KAAK;QACpB;AAEA,QAAA,KAAK,CAAC,WAAW,GAAG,OAAO;AAC3B,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;QAEhC,YAAY,GAAG,EAAE;IACrB,CAAC;IAED,MAAM,EAAE,MAAK;AACT,QAAA,IAAI,KAAK,IAAI,KAAK,CAAC,aAAa,EAAE;AAC9B,YAAA,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,KAAK,CAAC;QAC1C;IACJ,CAAC;;;;;"}
|
||||
9
node_modules/motion-dom/dist/es/view/utils/get-layer-info.mjs
generated
vendored
Normal file
9
node_modules/motion-dom/dist/es/view/utils/get-layer-info.mjs
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
function getViewAnimationLayerInfo(pseudoElement) {
|
||||
const match = pseudoElement.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);
|
||||
if (!match)
|
||||
return null;
|
||||
return { layer: match[2], type: match[1] };
|
||||
}
|
||||
|
||||
export { getViewAnimationLayerInfo };
|
||||
//# sourceMappingURL=get-layer-info.mjs.map
|
||||
1
node_modules/motion-dom/dist/es/view/utils/get-layer-info.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/view/utils/get-layer-info.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"get-layer-info.mjs","sources":["../../../../src/view/utils/get-layer-info.ts"],"sourcesContent":["export function getViewAnimationLayerInfo(pseudoElement: string) {\n const match = pseudoElement.match(\n /::view-transition-(old|new|group|image-pair)\\((.*?)\\)/\n )\n if (!match) return null\n\n return { layer: match[2], type: match[1] }\n}\n"],"names":[],"mappings":"AAAM,SAAU,yBAAyB,CAAC,aAAqB,EAAA;IAC3D,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,CAC7B,uDAAuD,CAC1D;AACD,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,OAAO,IAAI;AAEvB,IAAA,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE;AAC9C;;;;"}
|
||||
13
node_modules/motion-dom/dist/es/view/utils/get-view-animations.mjs
generated
vendored
Normal file
13
node_modules/motion-dom/dist/es/view/utils/get-view-animations.mjs
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
function filterViewAnimations(animation) {
|
||||
const { effect } = animation;
|
||||
if (!effect)
|
||||
return false;
|
||||
return (effect.target === document.documentElement &&
|
||||
effect.pseudoElement?.startsWith("::view-transition"));
|
||||
}
|
||||
function getViewAnimations() {
|
||||
return document.getAnimations().filter(filterViewAnimations);
|
||||
}
|
||||
|
||||
export { getViewAnimations };
|
||||
//# sourceMappingURL=get-view-animations.mjs.map
|
||||
1
node_modules/motion-dom/dist/es/view/utils/get-view-animations.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/view/utils/get-view-animations.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"get-view-animations.mjs","sources":["../../../../src/view/utils/get-view-animations.ts"],"sourcesContent":["function filterViewAnimations(animation: Animation) {\n const { effect } = animation\n if (!effect) return false\n\n return (\n effect.target === document.documentElement &&\n effect.pseudoElement?.startsWith(\"::view-transition\")\n )\n}\n\nexport function getViewAnimations() {\n return document.getAnimations().filter(filterViewAnimations)\n}\n"],"names":[],"mappings":"AAAA,SAAS,oBAAoB,CAAC,SAAoB,EAAA;AAC9C,IAAA,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS;AAC5B,IAAA,IAAI,CAAC,MAAM;AAAE,QAAA,OAAO,KAAK;AAEzB,IAAA,QACI,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,eAAe;QAC1C,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,mBAAmB,CAAC;AAE7D;SAEgB,iBAAiB,GAAA;IAC7B,OAAO,QAAQ,CAAC,aAAa,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC;AAChE;;;;"}
|
||||
6
node_modules/motion-dom/dist/es/view/utils/has-target.mjs
generated
vendored
Normal file
6
node_modules/motion-dom/dist/es/view/utils/has-target.mjs
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
function hasTarget(target, targets) {
|
||||
return targets.has(target) && Object.keys(targets.get(target)).length > 0;
|
||||
}
|
||||
|
||||
export { hasTarget };
|
||||
//# sourceMappingURL=has-target.mjs.map
|
||||
1
node_modules/motion-dom/dist/es/view/utils/has-target.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/view/utils/has-target.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"has-target.mjs","sources":["../../../../src/view/utils/has-target.ts"],"sourcesContent":["import { ViewTransitionTarget, ViewTransitionTargetDefinition } from \"../types\"\n\nexport function hasTarget(\n target: ViewTransitionTargetDefinition,\n targets: Map<ViewTransitionTargetDefinition, ViewTransitionTarget>\n) {\n return targets.has(target) && Object.keys(targets.get(target)!).length > 0\n}\n"],"names":[],"mappings":"AAEM,SAAU,SAAS,CACrB,MAAsC,EACtC,OAAkE,EAAA;IAElE,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAE,CAAC,CAAC,MAAM,GAAG,CAAC;AAC9E;;;;"}
|
||||
Reference in New Issue
Block a user