Files
SerpentRace/node_modules/motion-dom/dist/es/view/utils/get-layer-name.mjs
T
2025-08-23 00:05:18 +02:00

9 lines
248 B
JavaScript

function getLayerName(pseudoElement) {
const match = pseudoElement.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);
if (!match)
return null;
return { layer: match[2], type: match[1] };
}
export { getLayerName };