database-petani-mobile/node_modules/motion-dom/dist/es/view/utils/get-layer-name.mjs
2026-02-23 16:39:35 +07: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 };