UNPKG

lath

Version:

Seamless connection of pages.

1 lines 1.76 kB
import{_ as __awaiter}from"./launcher-f761b2d6.js";import{E as EASE}from"./ease-e997f3dd.js";var grow=d=>__awaiter(void 0,void 0,void 0,function*(){var i=d.applets[d.reverse?1:0],e=i.modality,a=(null==(a=i.config.paperOptions)?void 0:a.clipTop)||"0px",a="string"==typeof a?a:a+"px",t=d["touches"],t=null==t?void 0:t.target,t=null==t?void 0:t.getBoundingClientRect(),l=((null==t?void 0:t.x)||0)+"px",n=`calc(${((null==t?void 0:t.y)||0)+"px"} - ${a})`,o=void 0!==(null==t?void 0:t.width)?(null==t?void 0:t.width)+"px":"100%",t=`calc(${null==t?void 0:t.height}px + ${a})`||"100%",a="IFRAME"===(null==(a=i.view)?void 0:a.tagName)?i.view:null;return e&&(d.reverse?!0===(null==e?void 0:e.visibility)&&(yield null==e?void 0:e.fall()):(a&&(a.style.willChange="min-width, min-height, width, height"),d.view[0].style.willChange="transform, min-width, min-height, width, height, opacity",e.freezeSnap(),yield d.view[0].animate({transform:`translate3d(${l}, ${n}, 500px)`,transformOrigin:"center",backfaceVisibility:"hidden",width:o,height:t,minWidth:"0px",minHeight:"0px",boxShadow:"2px 4px 20px rgb(0, 0, 0, .2)",borderRadius:"16px",opacity:0},{duration:0,fill:"forwards"}).finished,d.view[0].animate({opacity:1},{duration:100,easing:EASE["ease-out-expo"],fill:"forwards"}).play(),yield d.view[0].animate({transform:"translate3d(0px, 0px, 500px)",width:"100%",height:"100%",borderRadius:"0px"},{duration:600,easing:EASE["ease-out-expo"],fill:"forwards"}).finished,yield e.rise(),yield d.view[0].animate({minWidth:"100%",minHeight:"100%",boxShadow:"none",borderRadius:"0px"},{duration:100,easing:EASE["ease-out-expo"],fill:"forwards"}).finished,a&&(a.style.willChange="none"),d.view[0].style.willChange="none",e.activateSnap())),Promise.resolve(!1)});export{grow as default};