@ssgoi/core 5.0.1 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,4 +32,4 @@
32
32
  ${n.left+n.width}px ${n.top}px,
33
33
  ${n.left+n.width}px ${n.top+n.height}px,
34
34
  ${n.left}px ${n.top+n.height}px
35
- )`}function Ct(t,n){t.style.transform=`translateY(${-n.top}px)`}const Ot={spring:{stiffness:300,damping:30}};function St(t,n){return t.querySelector(`[data-hero-key="${n}"]`)}const At=(t={})=>{const n=t.physics??Ot,r=t.maxDistance??700;let c=null,s=E();return{in:async(i,e)=>{const a=i,l=Array.from(a.querySelectorAll("[data-hero-key]"));await s.promise;const y=l.map(o=>{const h=o.getAttribute("data-hero-key");if(!h)return null;const d=St(c,h);if(!d)return null;const u=o,f=x(c,d),p=x(a,u),$=f.left-p.left-e.scrollOffset.x,w=f.top-p.top-e.scrollOffset.y,b=f.width/p.width,C=f.height/p.height,Y=u.style.transform,D=u.style.position,F=u.style.transformOrigin,U=u.style.zIndex,V=u.style.willChange;return{toEl:u,dx:$,dy:w,dw:b,dh:C,originalTransform:Y,originalPosition:D,originalTransformOrigin:F,originalZIndex:U,originalWillChange:V}}).filter(o=>o!==null&&Math.abs(o.dy)<=r);return c=null,s=E(),y.length===0?{physics:n,tick:()=>{}}:{items:y.map(({toEl:o,dx:h,dy:d,dw:u,dh:f})=>({physics:n,tick:p=>{o.style.transform=`translate(${(1-p)*h}px, ${(1-p)*d}px) scale(${p+(1-p)*u}, ${p+(1-p)*f})`}})),schedule:"parallel",prepare:()=>{y.forEach(({toEl:o})=>{o.style.position="relative",o.style.transformOrigin="top left",o.style.zIndex="1000",o.style.willChange="transform"})},onEnd:()=>{y.forEach(({toEl:o,originalTransform:h,originalPosition:d,originalTransformOrigin:u,originalZIndex:f,originalWillChange:p})=>{o.style.transform=h,o.style.position=d,o.style.transformOrigin=u,o.style.zIndex=f,o.style.willChange=p})}}},out:async i=>({physics:n,tick:()=>{},prepare:()=>{c=i,s.resolve(),g(i),i.style.opacity="0"}})}},Tt={spring:{stiffness:220,damping:24,doubleSpring:1}};function Pt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:c}){const s=n.left-t.left+(n.width-t.width)/2-c.x,i=n.top-t.top+(n.height-t.height)/2-c.y,e=n.width/t.width,a=n.height/t.height,l=Math.max(e,a),y=t.top/r.height*100,o=(r.width-(t.left+t.width))/r.width*100,h=(r.height-(t.top+t.height))/r.height*100,d=t.left/r.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:f=>{const p=1-f;return{clipPath:`inset(${y*p}% ${o*p}% ${h*p}% ${d*p}%)`,transform:`translate(${s*p}px, ${i*p}px) scale(${1+(l-1)*p})`}}}}function Lt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:c}){const s=n.left-t.left+(n.width-t.width)/2+c.x,i=n.top-t.top+(n.height-t.height)/2+c.y,e=n.width/t.width,a=n.height/t.height,l=Math.min(e,a),y=t.top/r.height*100,o=(r.width-(t.left+t.width))/r.width*100,h=(r.height-(t.top+t.height))/r.height*100,d=t.left/r.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:f=>{const p=1-f;return{clipPath:`inset(${y*p}% ${o*p}% ${h*p}% ${d*p}%)`,transform:`translate(${s*p-c.x}px, ${i*p-c.y}px) scale(${1+(l-1)*p})`}}}}function kt(t,n,r){const c=t.querySelector("[data-instagram-detail-key]"),s=n.querySelector("[data-instagram-detail-key]");if(t.querySelectorAll("[data-instagram-detail-key]").length>1||n.querySelectorAll("[data-instagram-detail-key]").length>1)return null;let i=null,e=null,a=!1;if(!c&&s){e=s;const o=e.getAttribute("data-instagram-detail-key");if(!o)return null;i=t.querySelector(`[data-instagram-gallery-key="${o}"]`),i&&(a=!0)}else if(c&&!s){e=c;const o=e.getAttribute("data-instagram-detail-key");if(!o)return null;i=n.querySelector(`[data-instagram-gallery-key="${o}"]`),i&&(a=!1)}if(!i||!e)return null;const l=x(a?t:n,i),y=x(a?n:t,e);if(a){const o=Pt({detailRect:y,galleryRect:l,pageRect:n.getBoundingClientRect(),scrollOffset:r});return n.style.transformOrigin=o.transformOrigin,{isEnterMode:!0,inAnimation:o.animate}}else{const o=Lt({detailRect:y,galleryRect:l,pageRect:t.getBoundingClientRect(),scrollOffset:r});return t.style.transformOrigin=o.transformOrigin,{isEnterMode:!1,outAnimation:o.animate}}}const vt=(t={})=>{const n=t.physics??Tt,r=t.timeout??300;let c=null,s=null,i=null,e=null;return{in:async(a,{scrollOffset:l})=>{const y=a;return!await new Promise(h=>{c?h(!0):(s=h,setTimeout(()=>{s=null,h(!1)},r))})||!c?(e==null||e(),e=null,c=null,{physics:n,css:()=>({})}):(i=kt(c,y,l),e==null||e(),e=null,i?(c=null,{physics:n,css:h=>i!=null&&i.inAnimation?i.inAnimation(h):{}}):(c=null,{physics:n,css:()=>({})}))},out:async(a,l)=>{const y=new Promise(o=>{e=o});return{physics:n,prepare:()=>{i!=null&&i.isEnterMode?g(a):(g(a,l),a.style.zIndex="-1")},wait:async()=>{c=a,s&&(s(!0),s=null),await y},css:o=>i!=null&&i.outAnimation?i.outAnimation(o):{}}}}},mt={spring:{stiffness:50,damping:30}};function It(t){const n=x(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:n.width,height:window.innerHeight-n.top}}const _t=(t={})=>{const n=t.physics??mt,r=t.initialRotation??45,c=t.initialScale??.01,s=t.rotationTriggerPoint??.8;return{out:async(i,e)=>{const a=i.style.opacity;return{physics:{spring:{stiffness:80,damping:25}},from:1,to:0,prepare:()=>{g(i,e),i.style.opacity="1"},tick:l=>{i.style.opacity=String(l)},onEnd:()=>{i.style.opacity=a}}},in:async(i,e)=>{const a=It(e),l=i.style.transform,y=i.style.transformOrigin,o=i.style.position,h=i.style.zIndex;return{physics:n,from:0,to:1,prepare:()=>{const d=Math.min(a.width,a.height)*.4;i.style.setProperty("--max-border-radius",`${d}px`),i.style.setProperty("--border-radius-scale","1"),i.style.willChange="transform",i.style.backfaceVisibility="hidden";const u=a.left+a.width/2,f=a.top+a.height/2;i.style.transformOrigin=`${u}px ${f}px`,i.style.position="fixed",i.style.top=`${a.top}px`,i.style.left=`${a.left}px`,i.style.width=`${a.width}px`,i.style.height=`${a.height}px`,i.style.zIndex="1000",i.style.overflow="hidden",i.style.transform=`rotate(${r}deg) scale(${c}) translateZ(0)`,i.style.borderRadius="calc(var(--max-border-radius) * var(--border-radius-scale))",i.style.opacity="1"},tick:d=>{let u;if(d<=.05)u=c;else if(d<=s){const w=(d-.05)/(s-.05),b=Math.pow(w,9);u=c+(.8-c)*b}else{const w=(d-s)/(1-s);u=.8+.2*(1-Math.pow(1-w,3))}let f;const p=.7;if(d<=p)f=r;else{const w=(d-p)/(1-p),b=1-Math.pow(1-w,2);f=r*(1-b)}let $;if(d<=p)$=1;else{const w=(d-p)/(1-p);$=1-Math.pow(w,.5)}i.style.transform=`rotate(${f.toFixed(2)}deg) scale(${u.toFixed(4)}) translateZ(0)`,i.style.setProperty("--border-radius-scale",$.toFixed(4))},onEnd:()=>{i.style.willChange="",i.style.backfaceVisibility="",i.style.removeProperty("--max-border-radius"),i.style.removeProperty("--border-radius-scale"),i.style.transform=l,i.style.transformOrigin=y,i.style.position=o,i.style.zIndex=h,i.style.top="",i.style.left="",i.style.width="",i.style.height="",i.style.overflow="",i.style.borderRadius=""}}}}},Yt={spring:{stiffness:220,damping:24,doubleSpring:1}};function Dt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:c}){const s=n.left-t.left+(n.width-t.width)/2-c.x,i=n.top-t.top+(n.height-t.height)/2-c.y,e=n.width/t.width,a=n.height/t.height,l=Math.max(e,a),y=t.top/r.height*100,o=(r.width-(t.left+t.width))/r.width*100,h=(r.height-(t.top+t.height))/r.height*100,d=t.left/r.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:f=>{const p=1-f;return{clipPath:`inset(${y*p}% ${o*p}% ${h*p}% ${d*p}%)`,transform:`translate(${s*p}px, ${i*p}px) scale(${1+(l-1)*p})`}}}}function Ft({galleryRect:t,detailRect:n,scrollOffset:r}){const c=n.left-t.left+(n.width-t.width)/2+r.x,s=n.top-t.top+(n.height-t.height)/2+r.y,i=n.width/t.width,e=n.height/t.height,a=Math.max(i,e);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:y=>{const o=1-y;return{transform:`translate(${c*o-r.x}px, ${s*o-r.y}px) scale(${1+(a-1)*o})`,opacity:`${1-o}`}}}}function Ut({galleryRect:t,detailRect:n,scrollOffset:r}){const c=n.left-t.left+(n.width-t.width)/2-r.x,s=n.top-t.top+(n.height-t.height)/2-r.y,i=n.width/t.width,e=n.height/t.height,a=Math.max(i,e);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:y=>{const o=1-y,h=y;return{transform:`translate(${c*o}px, ${s*o}px) scale(${1+(a-1)*o})`,opacity:`${h}`}}}}function Vt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:c}){const s=n.left-t.left+(n.width-t.width)/2+c.x,i=n.top-t.top+(n.height-t.height)/2+c.y,e=n.width/t.width,a=n.height/t.height,l=Math.min(e,a),y=t.top/r.height*100,o=(r.width-(t.left+t.width))/r.width*100,h=(r.height-(t.top+t.height))/r.height*100,d=t.left/r.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:f=>{const p=1-f;return{clipPath:`inset(${y*p}% ${o*p}% ${h*p}% ${d*p}%)`,transform:`translate(${s*p-c.x}px, ${i*p-c.y}px) scale(${1+(l-1)*p})`}}}}function Ht(t,n,r){const c=t.querySelector("[data-pinterest-detail-key]"),s=n.querySelector("[data-pinterest-detail-key]");if(t.querySelectorAll("[data-pinterest-detail-key]").length>1||n.querySelectorAll("[data-pinterest-detail-key]").length>1)return null;let i=null,e=null,a=!1;if(!c&&s){e=s;const o=e.getAttribute("data-pinterest-detail-key");if(!o)return null;i=t.querySelector(`[data-pinterest-gallery-key="${o}"]`),i&&(a=!0)}else if(c&&!s){e=c;const o=e.getAttribute("data-pinterest-detail-key");if(!o)return null;i=n.querySelector(`[data-pinterest-gallery-key="${o}"]`),i&&(a=!1)}if(!i||!e)return null;const l=x(a?t:n,i),y=x(a?n:t,e);if(a){const o=Dt({detailRect:y,galleryRect:l,pageRect:n.getBoundingClientRect(),scrollOffset:r}),h=Ft({galleryRect:l,detailRect:y,scrollOffset:r});return n.style.transformOrigin=o.transformOrigin,t.style.transformOrigin=h.transformOrigin,{inAnimation:o.animate,outAnimation:h.animate}}else{const o=Ut({galleryRect:l,detailRect:y,scrollOffset:r}),h=Vt({detailRect:y,galleryRect:l,pageRect:t.getBoundingClientRect(),scrollOffset:r});return n.style.transformOrigin=o.transformOrigin,t.style.transformOrigin=h.transformOrigin,{inAnimation:o.animate,outAnimation:h.animate}}}const Xt=(t={})=>{const n=t.physics??Yt,r=t.timeout??300;let c=null,s=null,i=null,e=null;return{in:async(a,{scrollOffset:l})=>{const y=a;return!await new Promise(h=>{c?h(!0):(s=h,setTimeout(()=>{s=null,h(!1)},r))})||!c?(e==null||e(),e=null,c=null,{physics:n,css:()=>({})}):(i=Ht(c,y,l),e==null||e(),e=null,i?(c=null,{physics:n,css:h=>i?i.inAnimation(h):{}}):(c=null,{physics:n,css:()=>({})}))},out:async a=>{const l=new Promise(y=>{e=y});return{physics:n,prepare:()=>{g(a),a.style.zIndex="-1",c=a,s&&(s(!0),s=null)},wait:async()=>{await l},css:y=>i?i.outAnimation(y):{}}}}},zt={spring:{stiffness:100,damping:30}},Mt=(t={})=>{const n=t.physics??zt;return{in:r=>({physics:n,prepare:()=>{r.style.opacity="0",r.style.transform="rotate(-180deg)",r.style.transformOrigin="center center",r.style.willChange="transform, opacity"},css:c=>({transform:`rotate(${(c-1)*180}deg)`,opacity:c>.5?1:0}),onEnd:()=>{r.style.willChange="auto",r.style.transform="",r.style.transformOrigin="",r.style.opacity=""}}),out:(r,c)=>({physics:n,prepare:()=>{g(r,c),r.style.transformOrigin="center center",r.style.willChange="transform, opacity"},css:s=>({transform:`rotate(${(1-s)*180}deg)`,opacity:s>.5?1:0}),onEnd:()=>{r.style.willChange="auto"}})}},Wt={spring:{stiffness:5,damping:4}},Bt=(t={})=>{const n=t.direction??"up",r=t.physics??Wt,c=n==="up";let s=null,i=null,e=null;const a=()=>{if(s===null||i===null)return null;const l=Math.min(s,i),y=window.innerHeight;return Math.max(l,y)};return{in:l=>(i=l.offsetHeight,s!==null&&(e=a()),{physics:r,prepare:()=>{l.style.willChange="transform",l.style.backfaceVisibility="hidden",l.style.contain="layout paint"},tick:y=>{e===null&&(e=a());const o=e??window.innerHeight,h=c?(1-y)*o:(1-y)*-o;l.style.transform=`translate3d(0, ${h}px, 0)`},onEnd:()=>{l.style.willChange="auto",l.style.backfaceVisibility="",l.style.contain=""}}),out:(l,y)=>({physics:r,tick:o=>{e===null&&(e=a());const h=e??window.innerHeight,d=c?(1-o)*-h:(1-o)*h;l.style.transform=`translate3d(0, ${d}px, 0)`},prepare:()=>{s=l.offsetHeight,i!==null&&(e=a()),g(l,y),l.style.zIndex=c?"-1":"1",l.style.willChange="transform",l.style.backfaceVisibility="hidden",l.style.contain="layout paint",l.style.pointerEvents="none"}})}},qt={spring:{stiffness:200,damping:24}},jt={inertia:{acceleration:25,resistance:1.2}},Nt=.2;function T(t){const n=x(document.body,t.positionedParent),r=t.scroll.y,c=t.scrollingElement.offsetHeight-n.top,s={top:r,left:0,width:n.width,height:c};return{...s,centerX:s.left+s.width/2,centerY:s.top+s.height/2}}const Gt=(t={})=>{const{direction:n="enter"}=t,r=t.physics??(n==="enter"?qt:jt),c=t.scaleOffset??Nt;return n==="enter"?{in:(s,i)=>{const e=T(i);return{physics:r,prepare:()=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.clipPath=`inset(${e.top}px 0 calc(100% - ${e.top+e.height}px) 0)`},css:a=>({transform:`translate3d(0, ${(1-a)*e.height}px, 0)`}),onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.clipPath=""}}},out:(s,i)=>{const e=T(i),a=e.left+e.width/2,l=e.top+e.height/2;return{physics:r,prepare:()=>{g(s,i),s.style.zIndex="-1",s.style.willChange="transform, opacity",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.transformOrigin=`${a}px ${l}px`},css:y=>({transform:`scale(${1-c+y*c})`,opacity:y})}}}:{in:(s,i)=>{const e=T(i),a=e.left+e.width/2,l=e.top+e.height/2;return{physics:r,prepare:()=>{s.style.willChange="transform, opacity",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transformOrigin=`${a}px ${l}px`},css:y=>({transform:`scale(${1-c+y*c})`,opacity:y}),onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.transformOrigin=""}}},out:(s,i)=>{const a=T(i).height,l=i.scroll.y;return{physics:r,prepare:()=>{g(s,i),s.style.zIndex="100",s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.clipPath=`inset(${l}px 0 calc(100% - ${l+a}px) 0)`},css:y=>({transform:`translate3d(0, ${(1-y)*a}px, 0)`})}}}},Zt={spring:{stiffness:170,damping:22,doubleSpring:.8}},Jt=(t={})=>{const n=t.direction??"left",r=t.physics??Zt,c=n==="left";return{in:s=>({physics:r,prepare:()=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint"},css:i=>({transform:`translate3d(${c?(1-i)*100:(1-i)*-100}%, 0, 0)`}),onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}}),out:(s,i)=>({physics:r,css:e=>({transform:`translate3d(${c?(1-e)*-100:(1-e)*100}%, 0, 0)`}),prepare:()=>{g(s,i),s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none"}})}},Kt=8,Qt={spring:{stiffness:400,damping:30,restDelta:.1,restSpeed:1e14}},Rt=(t={})=>{const n=t.direction??"left",r=t.physics??Qt,c=t.translateOffset??Kt,s=n==="left";let{promise:i,resolve:e}=E();return{in:a=>({physics:r,prepare:()=>{a.style.opacity="0",a.style.willChange="transform, opacity",a.style.backfaceVisibility="hidden",a.style.contain="layout paint"},wait:async()=>{if(i){await i;const l=E();i=l.promise,e=l.resolve}},css:l=>{const y=s?(1-l)*c:(1-l)*-c,o=`${l}`;return{transform:`translate3d(${y}px, 0, 0)`,opacity:o}},onEnd:()=>{a.style.opacity="1",a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain=""}}),out:(a,l)=>({physics:r,prepare:()=>{g(a,l),a.style.willChange="transform, opacity",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.pointerEvents="none"},css:y=>{const o=s?(1-y)*-c:(1-y)*c,h=`${y}`;return{transform:`translate3d(${o}px, 0, 0)`,opacity:h}},onEnd:()=>{e&&e(),a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain=""}})}},ts={spring:{stiffness:17,damping:6}},L=20,P=800,ss=(t={})=>{const n=t.physics??ts;let r,c=null;return{in:s=>({physics:n,prepare:()=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transform=`perspective(${P}px) rotateY(${L}deg) translate3d(-100%, 0, 0)`},wait:async()=>{r&&await r},css:i=>{const e=(1-i)*L,a=-(1-i)*100;return{transform:`perspective(${P}px) rotateY(${e}deg) translate3d(${a}%, 0, 0)`}},onEnd:()=>{s.style.transform="",s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}}),out:(s,i)=>(r=new Promise(e=>{c=e}),{physics:n,prepare:()=>{g(s,i),s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.transform=`perspective(${P}px) rotateY(0deg) translate3d(0%, 0, 0)`},css:e=>{const a=1-e,l=a*L,y=a*100;return{transform:`perspective(${P}px) rotateY(${-l}deg) translate3d(${y}%, 0, 0)`}},onEnd:()=>{c&&c(),s.style.transform=""}})}},is={spring:{stiffness:350,damping:32,restDelta:.1,restSpeed:1e14}},ns=.05;function es(t){const n=x(document.body,t.positionedParent),r=t.scroll.y,c=window.innerHeight-n.top;return{top:r,left:0,width:n.width,height:c}}const as=(t={})=>{const n=t.physics??is,r=t.scaleOffset??ns;let{promise:c,resolve:s}=E();return{in:(i,e)=>{const a=es(e),l=a.left+a.width/2,y=a.top+a.height/2;return{physics:n,prepare:()=>{i.style.opacity="0",i.style.willChange="transform, opacity",i.style.backfaceVisibility="hidden",i.style.contain="layout paint",i.style.transformOrigin=`${l}px ${y}px`},wait:async()=>{if(c){await c;const o=E();c=o.promise,s=o.resolve}},css:o=>({transform:`scale(${1-r+o*r})`,opacity:o}),onEnd:()=>{i.style.opacity="1",i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain="",i.style.transformOrigin=""}}},out:(i,e)=>({physics:n,prepare:()=>{g(i,e),i.style.willChange="opacity",i.style.backfaceVisibility="hidden",i.style.contain="layout paint",i.style.pointerEvents="none"},css:a=>({opacity:a}),onEnd:()=>{s&&s()}})}};exports.blind=q;exports.curtainReveal=et;exports.depth=lt;exports.drill=ht;exports.fade=ft;exports.film=bt;exports.hero=At;exports.instagram=vt;exports.jaemin=_t;exports.pinterest=Xt;exports.rotate=Mt;exports.scroll=Bt;exports.sheet=Gt;exports.slide=Jt;exports.snap=Rt;exports.strip=ss;exports.swap=as;
35
+ )`}function Ct(t,n){t.style.transform=`translateY(${-n.top}px)`}const Ot={spring:{stiffness:300,damping:30}};function St(t,n){return t.querySelector(`[data-hero-key="${n}"]`)}const At=(t={})=>{const n=t.physics??Ot,r=t.maxDistance??700;let c=null,s=E();return{in:async(i,e)=>{const a=i,l=Array.from(a.querySelectorAll("[data-hero-key]"));await s.promise;const y=l.map(o=>{const h=o.getAttribute("data-hero-key");if(!h)return null;const d=St(c,h);if(!d)return null;const u=o,f=x(c,d),p=x(a,u),$=f.left-p.left-e.scrollOffset.x,w=f.top-p.top-e.scrollOffset.y,b=f.width/p.width,C=f.height/p.height,Y=u.style.transform,D=u.style.position,F=u.style.transformOrigin,U=u.style.zIndex,V=u.style.willChange;return{toEl:u,dx:$,dy:w,dw:b,dh:C,originalTransform:Y,originalPosition:D,originalTransformOrigin:F,originalZIndex:U,originalWillChange:V}}).filter(o=>o!==null&&Math.abs(o.dy)<=r);return c=null,s=E(),y.length===0?{physics:n,tick:()=>{}}:{items:y.map(({toEl:o,dx:h,dy:d,dw:u,dh:f})=>({physics:n,tick:p=>{o.style.transform=`translate(${(1-p)*h}px, ${(1-p)*d}px) scale(${p+(1-p)*u}, ${p+(1-p)*f})`}})),schedule:"parallel",prepare:()=>{y.forEach(({toEl:o})=>{o.style.position="relative",o.style.transformOrigin="top left",o.style.zIndex="1000",o.style.willChange="transform"})},onEnd:()=>{y.forEach(({toEl:o,originalTransform:h,originalPosition:d,originalTransformOrigin:u,originalZIndex:f,originalWillChange:p})=>{o.style.transform=h,o.style.position=d,o.style.transformOrigin=u,o.style.zIndex=f,o.style.willChange=p})}}},out:async i=>({physics:n,tick:()=>{},prepare:()=>{c=i,s.resolve(),g(i),i.style.opacity="0"}})}},Tt={spring:{stiffness:220,damping:24,doubleSpring:1}};function Pt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:c}){const s=n.left-t.left+(n.width-t.width)/2-c.x,i=n.top-t.top+(n.height-t.height)/2-c.y,e=n.width/t.width,a=n.height/t.height,l=Math.max(e,a),y=t.top/r.height*100,o=(r.width-(t.left+t.width))/r.width*100,h=(r.height-(t.top+t.height))/r.height*100,d=t.left/r.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:f=>{const p=1-f;return{clipPath:`inset(${y*p}% ${o*p}% ${h*p}% ${d*p}%)`,transform:`translate(${s*p}px, ${i*p}px) scale(${1+(l-1)*p})`}}}}function Lt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:c}){const s=n.left-t.left+(n.width-t.width)/2+c.x,i=n.top-t.top+(n.height-t.height)/2+c.y,e=n.width/t.width,a=n.height/t.height,l=Math.min(e,a),y=t.top/r.height*100,o=(r.width-(t.left+t.width))/r.width*100,h=(r.height-(t.top+t.height))/r.height*100,d=t.left/r.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:f=>{const p=1-f;return{clipPath:`inset(${y*p}% ${o*p}% ${h*p}% ${d*p}%)`,transform:`translate(${s*p-c.x}px, ${i*p-c.y}px) scale(${1+(l-1)*p})`}}}}function kt(t,n,r){const c=t.querySelector("[data-instagram-detail-key]"),s=n.querySelector("[data-instagram-detail-key]");if(t.querySelectorAll("[data-instagram-detail-key]").length>1||n.querySelectorAll("[data-instagram-detail-key]").length>1)return null;let i=null,e=null,a=!1;if(!c&&s){e=s;const o=e.getAttribute("data-instagram-detail-key");if(!o)return null;i=t.querySelector(`[data-instagram-gallery-key="${o}"]`),i&&(a=!0)}else if(c&&!s){e=c;const o=e.getAttribute("data-instagram-detail-key");if(!o)return null;i=n.querySelector(`[data-instagram-gallery-key="${o}"]`),i&&(a=!1)}if(!i||!e)return null;const l=x(a?t:n,i),y=x(a?n:t,e);if(a){const o=Pt({detailRect:y,galleryRect:l,pageRect:n.getBoundingClientRect(),scrollOffset:r});return n.style.transformOrigin=o.transformOrigin,{isEnterMode:!0,inAnimation:o.animate}}else{const o=Lt({detailRect:y,galleryRect:l,pageRect:t.getBoundingClientRect(),scrollOffset:r});return t.style.transformOrigin=o.transformOrigin,{isEnterMode:!1,outAnimation:o.animate}}}const vt=(t={})=>{const n=t.physics??Tt,r=t.timeout??300;let c=null,s=null,i=null,e=null;return{in:async(a,{scrollOffset:l})=>{const y=a;return!await new Promise(h=>{c?h(!0):(s=h,setTimeout(()=>{s=null,h(!1)},r))})||!c?(e==null||e(),e=null,c=null,{physics:n,css:()=>({})}):(i=kt(c,y,l),e==null||e(),e=null,i?(c=null,{physics:n,css:h=>i!=null&&i.inAnimation?i.inAnimation(h):{}}):(c=null,{physics:n,css:()=>({})}))},out:async(a,l)=>{const y=new Promise(o=>{e=o});return{physics:n,prepare:()=>{i!=null&&i.isEnterMode?g(a):(g(a,l),a.style.zIndex="-1")},wait:async()=>{c=a,s&&(s(!0),s=null),await y},css:o=>i!=null&&i.outAnimation?i.outAnimation(o):{}}}}},mt={spring:{stiffness:50,damping:30}};function It(t){const n=x(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:n.width,height:window.innerHeight-n.top}}const _t=(t={})=>{const n=t.physics??mt,r=t.initialRotation??45,c=t.initialScale??.01,s=t.rotationTriggerPoint??.8;return{out:async(i,e)=>{const a=i.style.opacity;return{physics:{spring:{stiffness:80,damping:25}},from:1,to:0,prepare:()=>{g(i,e),i.style.opacity="1"},tick:l=>{i.style.opacity=String(l)},onEnd:()=>{i.style.opacity=a}}},in:async(i,e)=>{const a=It(e),l=i.style.transform,y=i.style.transformOrigin,o=i.style.position,h=i.style.zIndex;return{physics:n,from:0,to:1,prepare:()=>{const d=Math.min(a.width,a.height)*.4;i.style.setProperty("--max-border-radius",`${d}px`),i.style.setProperty("--border-radius-scale","1"),i.style.willChange="transform",i.style.backfaceVisibility="hidden";const u=a.left+a.width/2,f=a.top+a.height/2;i.style.transformOrigin=`${u}px ${f}px`,i.style.position="fixed",i.style.top=`${a.top}px`,i.style.left=`${a.left}px`,i.style.width=`${a.width}px`,i.style.height=`${a.height}px`,i.style.zIndex="1000",i.style.overflow="hidden",i.style.transform=`rotate(${r}deg) scale(${c}) translateZ(0)`,i.style.borderRadius="calc(var(--max-border-radius) * var(--border-radius-scale))",i.style.opacity="1"},tick:d=>{let u;if(d<=.05)u=c;else if(d<=s){const w=(d-.05)/(s-.05),b=Math.pow(w,9);u=c+(.8-c)*b}else{const w=(d-s)/(1-s);u=.8+.2*(1-Math.pow(1-w,3))}let f;const p=.7;if(d<=p)f=r;else{const w=(d-p)/(1-p),b=1-Math.pow(1-w,2);f=r*(1-b)}let $;if(d<=p)$=1;else{const w=(d-p)/(1-p);$=1-Math.pow(w,.5)}i.style.transform=`rotate(${f.toFixed(2)}deg) scale(${u.toFixed(4)}) translateZ(0)`,i.style.setProperty("--border-radius-scale",$.toFixed(4))},onEnd:()=>{i.style.willChange="",i.style.backfaceVisibility="",i.style.removeProperty("--max-border-radius"),i.style.removeProperty("--border-radius-scale"),i.style.transform=l,i.style.transformOrigin=y,i.style.position=o,i.style.zIndex=h,i.style.top="",i.style.left="",i.style.width="",i.style.height="",i.style.overflow="",i.style.borderRadius=""}}}}},Yt={spring:{stiffness:220,damping:24,doubleSpring:1}};function Dt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:c}){const s=n.left-t.left+(n.width-t.width)/2-c.x,i=n.top-t.top+(n.height-t.height)/2-c.y,e=n.width/t.width,a=n.height/t.height,l=Math.max(e,a),y=t.top/r.height*100,o=(r.width-(t.left+t.width))/r.width*100,h=(r.height-(t.top+t.height))/r.height*100,d=t.left/r.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:f=>{const p=1-f;return{clipPath:`inset(${y*p}% ${o*p}% ${h*p}% ${d*p}%)`,transform:`translate(${s*p}px, ${i*p}px) scale(${1+(l-1)*p})`}}}}function Ft({galleryRect:t,detailRect:n,scrollOffset:r}){const c=n.left-t.left+(n.width-t.width)/2+r.x,s=n.top-t.top+(n.height-t.height)/2+r.y,i=n.width/t.width,e=n.height/t.height,a=Math.max(i,e);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:y=>{const o=1-y;return{transform:`translate(${c*o-r.x}px, ${s*o-r.y}px) scale(${1+(a-1)*o})`,opacity:`${1-o}`}}}}function Ut({galleryRect:t,detailRect:n,scrollOffset:r}){const c=n.left-t.left+(n.width-t.width)/2-r.x,s=n.top-t.top+(n.height-t.height)/2-r.y,i=n.width/t.width,e=n.height/t.height,a=Math.max(i,e);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:y=>{const o=1-y,h=y;return{transform:`translate(${c*o}px, ${s*o}px) scale(${1+(a-1)*o})`,opacity:`${h}`}}}}function Vt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:c}){const s=n.left-t.left+(n.width-t.width)/2+c.x,i=n.top-t.top+(n.height-t.height)/2+c.y,e=n.width/t.width,a=n.height/t.height,l=Math.min(e,a),y=t.top/r.height*100,o=(r.width-(t.left+t.width))/r.width*100,h=(r.height-(t.top+t.height))/r.height*100,d=t.left/r.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:f=>{const p=1-f;return{clipPath:`inset(${y*p}% ${o*p}% ${h*p}% ${d*p}%)`,transform:`translate(${s*p-c.x}px, ${i*p-c.y}px) scale(${1+(l-1)*p})`}}}}function Ht(t,n,r){const c=t.querySelector("[data-pinterest-detail-key]"),s=n.querySelector("[data-pinterest-detail-key]");if(t.querySelectorAll("[data-pinterest-detail-key]").length>1||n.querySelectorAll("[data-pinterest-detail-key]").length>1)return null;let i=null,e=null,a=!1;if(!c&&s){e=s;const o=e.getAttribute("data-pinterest-detail-key");if(!o)return null;i=t.querySelector(`[data-pinterest-gallery-key="${o}"]`),i&&(a=!0)}else if(c&&!s){e=c;const o=e.getAttribute("data-pinterest-detail-key");if(!o)return null;i=n.querySelector(`[data-pinterest-gallery-key="${o}"]`),i&&(a=!1)}if(!i||!e)return null;const l=x(a?t:n,i),y=x(a?n:t,e);if(a){const o=Dt({detailRect:y,galleryRect:l,pageRect:n.getBoundingClientRect(),scrollOffset:r}),h=Ft({galleryRect:l,detailRect:y,scrollOffset:r});return n.style.transformOrigin=o.transformOrigin,t.style.transformOrigin=h.transformOrigin,{inAnimation:o.animate,outAnimation:h.animate}}else{const o=Ut({galleryRect:l,detailRect:y,scrollOffset:r}),h=Vt({detailRect:y,galleryRect:l,pageRect:t.getBoundingClientRect(),scrollOffset:r});return n.style.transformOrigin=o.transformOrigin,t.style.transformOrigin=h.transformOrigin,{inAnimation:o.animate,outAnimation:h.animate}}}const Xt=(t={})=>{const n=t.physics??Yt,r=t.timeout??300;let c=null,s=null,i=null,e=null;return{in:async(a,{scrollOffset:l})=>{const y=a;return!await new Promise(h=>{c?h(!0):(s=h,setTimeout(()=>{s=null,h(!1)},r))})||!c?(e==null||e(),e=null,c=null,{physics:n,css:()=>({})}):(i=Ht(c,y,l),e==null||e(),e=null,i?(c=null,{physics:n,css:h=>i?i.inAnimation(h):{}}):(c=null,{physics:n,css:()=>({})}))},out:async a=>{const l=new Promise(y=>{e=y});return{physics:n,prepare:()=>{g(a),a.style.zIndex="-1",c=a,s&&(s(!0),s=null)},wait:async()=>{await l},css:y=>i?i.outAnimation(y):{}}}}},zt={spring:{stiffness:100,damping:30}},Mt=(t={})=>{const n=t.physics??zt;return{in:r=>({physics:n,prepare:()=>{r.style.opacity="0",r.style.transform="rotate(-180deg)",r.style.transformOrigin="center center",r.style.willChange="transform, opacity"},css:c=>({transform:`rotate(${(c-1)*180}deg)`,opacity:c>.5?1:0}),onEnd:()=>{r.style.willChange="auto",r.style.transform="",r.style.transformOrigin="",r.style.opacity=""}}),out:(r,c)=>({physics:n,prepare:()=>{g(r,c),r.style.transformOrigin="center center",r.style.willChange="transform, opacity"},css:s=>({transform:`rotate(${(1-s)*180}deg)`,opacity:s>.5?1:0}),onEnd:()=>{r.style.willChange="auto"}})}},Wt={spring:{stiffness:5,damping:4}},Bt=(t={})=>{const n=t.direction??"up",r=t.physics??Wt,c=n==="up";let s=null,i=null,e=null;const a=()=>{if(s===null||i===null)return null;const l=Math.min(s,i),y=window.innerHeight;return Math.max(l,y)};return{in:l=>(i=l.offsetHeight,s!==null&&(e=a()),{physics:r,prepare:()=>{l.style.willChange="transform",l.style.backfaceVisibility="hidden",l.style.contain="layout paint"},tick:y=>{e===null&&(e=a());const o=e??window.innerHeight,h=c?(1-y)*o:(1-y)*-o;l.style.transform=`translate3d(0, ${h}px, 0)`},onEnd:()=>{l.style.willChange="auto",l.style.backfaceVisibility="",l.style.contain=""}}),out:(l,y)=>({physics:r,tick:o=>{e===null&&(e=a());const h=e??window.innerHeight,d=c?(1-o)*-h:(1-o)*h;l.style.transform=`translate3d(0, ${d}px, 0)`},prepare:()=>{s=l.offsetHeight,i!==null&&(e=a()),g(l,y),l.style.zIndex=c?"-1":"1",l.style.willChange="transform",l.style.backfaceVisibility="hidden",l.style.contain="layout paint",l.style.pointerEvents="none"}})}},qt={spring:{stiffness:200,damping:24}},jt={inertia:{acceleration:25,resistance:1.2}},Nt=.2;function T(t){const n=x(document.body,t.positionedParent),r=t.scroll.y,c=t.scrollingElement.offsetHeight-n.top,s={top:r,left:0,width:n.width,height:c};return{...s,centerX:s.left+s.width/2,centerY:s.top+s.height/2}}const Gt=(t={})=>{const{direction:n="enter"}=t,r=t.physics??(n==="enter"?qt:jt),c=t.scaleOffset??Nt;return n==="enter"?{in:(s,i)=>{const e=T(i);return{physics:r,prepare:()=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.clipPath=`inset(${e.top}px 0 calc(100% - ${e.top+e.height}px) 0)`},css:a=>({transform:`translate3d(0, ${(1-a)*e.height}px, 0)`}),onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.clipPath=""}}},out:(s,i)=>{const e=T(i),a=e.left+e.width/2,l=e.top+e.height/2;return{physics:r,prepare:()=>{g(s,i),s.style.zIndex="-1",s.style.willChange="transform, opacity",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.transformOrigin=`${a}px ${l}px`,s.style.clipPath=`inset(${e.top}px 0 calc(100% - ${e.top+e.height}px) 0)`},css:y=>({transform:`scale(${1-c+y*c})`,opacity:y})}}}:{in:(s,i)=>{const e=T(i),a=e.left+e.width/2,l=e.top+e.height/2;return{physics:r,prepare:()=>{s.style.willChange="transform, opacity",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transformOrigin=`${a}px ${l}px`,s.style.clipPath=`inset(${e.top}px 0 calc(100% - ${e.top+e.height}px) 0)`},css:y=>({transform:`scale(${1-c+y*c})`,opacity:y}),onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.transformOrigin="",s.style.clipPath=""}}},out:(s,i)=>{const a=T(i).height,l=i.scroll.y;return{physics:r,prepare:()=>{g(s,i),s.style.zIndex="100",s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.clipPath=`inset(${l}px 0 calc(100% - ${l+a}px) 0)`},css:y=>({transform:`translate3d(0, ${(1-y)*a}px, 0)`})}}}},Zt={spring:{stiffness:170,damping:22,doubleSpring:.8}},Jt=(t={})=>{const n=t.direction??"left",r=t.physics??Zt,c=n==="left";return{in:s=>({physics:r,prepare:()=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint"},css:i=>({transform:`translate3d(${c?(1-i)*100:(1-i)*-100}%, 0, 0)`}),onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}}),out:(s,i)=>({physics:r,css:e=>({transform:`translate3d(${c?(1-e)*-100:(1-e)*100}%, 0, 0)`}),prepare:()=>{g(s,i),s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none"}})}},Kt=8,Qt={spring:{stiffness:400,damping:30,restDelta:.1,restSpeed:1e14}},Rt=(t={})=>{const n=t.direction??"left",r=t.physics??Qt,c=t.translateOffset??Kt,s=n==="left";let{promise:i,resolve:e}=E();return{in:a=>({physics:r,prepare:()=>{a.style.opacity="0",a.style.willChange="transform, opacity",a.style.backfaceVisibility="hidden",a.style.contain="layout paint"},wait:async()=>{if(i){await i;const l=E();i=l.promise,e=l.resolve}},css:l=>{const y=s?(1-l)*c:(1-l)*-c,o=`${l}`;return{transform:`translate3d(${y}px, 0, 0)`,opacity:o}},onEnd:()=>{a.style.opacity="1",a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain=""}}),out:(a,l)=>({physics:r,prepare:()=>{g(a,l),a.style.willChange="transform, opacity",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.pointerEvents="none"},css:y=>{const o=s?(1-y)*-c:(1-y)*c,h=`${y}`;return{transform:`translate3d(${o}px, 0, 0)`,opacity:h}},onEnd:()=>{e&&e(),a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain=""}})}},ts={spring:{stiffness:17,damping:6}},L=20,P=800,ss=(t={})=>{const n=t.physics??ts;let r,c=null;return{in:s=>({physics:n,prepare:()=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transform=`perspective(${P}px) rotateY(${L}deg) translate3d(-100%, 0, 0)`},wait:async()=>{r&&await r},css:i=>{const e=(1-i)*L,a=-(1-i)*100;return{transform:`perspective(${P}px) rotateY(${e}deg) translate3d(${a}%, 0, 0)`}},onEnd:()=>{s.style.transform="",s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}}),out:(s,i)=>(r=new Promise(e=>{c=e}),{physics:n,prepare:()=>{g(s,i),s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.transform=`perspective(${P}px) rotateY(0deg) translate3d(0%, 0, 0)`},css:e=>{const a=1-e,l=a*L,y=a*100;return{transform:`perspective(${P}px) rotateY(${-l}deg) translate3d(${y}%, 0, 0)`}},onEnd:()=>{c&&c(),s.style.transform=""}})}},is={spring:{stiffness:350,damping:32,restDelta:.1,restSpeed:1e14}},ns=.05;function es(t){const n=x(document.body,t.positionedParent),r=t.scroll.y,c=window.innerHeight-n.top;return{top:r,left:0,width:n.width,height:c}}const as=(t={})=>{const n=t.physics??is,r=t.scaleOffset??ns;let{promise:c,resolve:s}=E();return{in:(i,e)=>{const a=es(e),l=a.left+a.width/2,y=a.top+a.height/2;return{physics:n,prepare:()=>{i.style.opacity="0",i.style.willChange="transform, opacity",i.style.backfaceVisibility="hidden",i.style.contain="layout paint",i.style.transformOrigin=`${l}px ${y}px`},wait:async()=>{if(c){await c;const o=E();c=o.promise,s=o.resolve}},css:o=>({transform:`scale(${1-r+o*r})`,opacity:o}),onEnd:()=>{i.style.opacity="1",i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain="",i.style.transformOrigin=""}}},out:(i,e)=>({physics:n,prepare:()=>{g(i,e),i.style.willChange="opacity",i.style.backfaceVisibility="hidden",i.style.contain="layout paint",i.style.pointerEvents="none"},css:a=>({opacity:a}),onEnd:()=>{s&&s()}})}};exports.blind=q;exports.curtainReveal=et;exports.depth=lt;exports.drill=ht;exports.fade=ft;exports.film=bt;exports.hero=At;exports.instagram=vt;exports.jaemin=_t;exports.pinterest=Xt;exports.rotate=Mt;exports.scroll=Bt;exports.sheet=Gt;exports.slide=Jt;exports.snap=Rt;exports.strip=ss;exports.swap=as;
@@ -989,7 +989,7 @@ function Tt({
989
989
  }
990
990
  };
991
991
  }
992
- function Lt({
992
+ function Pt({
993
993
  galleryRect: t,
994
994
  detailRect: n,
995
995
  scrollOffset: r
@@ -1006,7 +1006,7 @@ function Lt({
1006
1006
  }
1007
1007
  };
1008
1008
  }
1009
- function Pt({
1009
+ function Lt({
1010
1010
  galleryRect: t,
1011
1011
  detailRect: n,
1012
1012
  scrollOffset: r
@@ -1074,7 +1074,7 @@ function vt(t, n, r) {
1074
1074
  galleryRect: l,
1075
1075
  pageRect: n.getBoundingClientRect(),
1076
1076
  scrollOffset: r
1077
- }), h = Lt({
1077
+ }), h = Pt({
1078
1078
  galleryRect: l,
1079
1079
  detailRect: y,
1080
1080
  scrollOffset: r
@@ -1084,7 +1084,7 @@ function vt(t, n, r) {
1084
1084
  outAnimation: h.animate
1085
1085
  };
1086
1086
  } else {
1087
- const o = Pt({
1087
+ const o = Lt({
1088
1088
  galleryRect: l,
1089
1089
  detailRect: y,
1090
1090
  scrollOffset: r
@@ -1258,7 +1258,7 @@ const ss = (t = {}) => {
1258
1258
  return {
1259
1259
  physics: r,
1260
1260
  prepare: () => {
1261
- g(s, i), s.style.zIndex = "-1", s.style.willChange = "transform, opacity", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.pointerEvents = "none", s.style.transformOrigin = `${a}px ${l}px`;
1261
+ g(s, i), s.style.zIndex = "-1", s.style.willChange = "transform, opacity", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.pointerEvents = "none", s.style.transformOrigin = `${a}px ${l}px`, s.style.clipPath = `inset(${e.top}px 0 calc(100% - ${e.top + e.height}px) 0)`;
1262
1262
  },
1263
1263
  css: (y) => ({
1264
1264
  transform: `scale(${1 - c + y * c})`,
@@ -1273,14 +1273,14 @@ const ss = (t = {}) => {
1273
1273
  return {
1274
1274
  physics: r,
1275
1275
  prepare: () => {
1276
- s.style.willChange = "transform, opacity", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.transformOrigin = `${a}px ${l}px`;
1276
+ s.style.willChange = "transform, opacity", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.transformOrigin = `${a}px ${l}px`, s.style.clipPath = `inset(${e.top}px 0 calc(100% - ${e.top + e.height}px) 0)`;
1277
1277
  },
1278
1278
  css: (y) => ({
1279
1279
  transform: `scale(${1 - c + y * c})`,
1280
1280
  opacity: y
1281
1281
  }),
1282
1282
  onEnd: () => {
1283
- s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "", s.style.transformOrigin = "";
1283
+ s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "", s.style.transformOrigin = "", s.style.clipPath = "";
1284
1284
  }
1285
1285
  };
1286
1286
  },
@@ -1384,22 +1384,22 @@ const ss = (t = {}) => {
1384
1384
  };
1385
1385
  }, Ht = {
1386
1386
  spring: { stiffness: 17, damping: 6 }
1387
- }, P = 20, L = 800, es = (t = {}) => {
1387
+ }, L = 20, P = 800, es = (t = {}) => {
1388
1388
  const n = t.physics ?? Ht;
1389
1389
  let r, c = null;
1390
1390
  return {
1391
1391
  in: (s) => ({
1392
1392
  physics: n,
1393
1393
  prepare: () => {
1394
- s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.transform = `perspective(${L}px) rotateY(${P}deg) translate3d(-100%, 0, 0)`;
1394
+ s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.transform = `perspective(${P}px) rotateY(${L}deg) translate3d(-100%, 0, 0)`;
1395
1395
  },
1396
1396
  wait: async () => {
1397
1397
  r && await r;
1398
1398
  },
1399
1399
  css: (i) => {
1400
- const e = (1 - i) * P, a = -(1 - i) * 100;
1400
+ const e = (1 - i) * L, a = -(1 - i) * 100;
1401
1401
  return {
1402
- transform: `perspective(${L}px) rotateY(${e}deg) translate3d(${a}%, 0, 0)`
1402
+ transform: `perspective(${P}px) rotateY(${e}deg) translate3d(${a}%, 0, 0)`
1403
1403
  };
1404
1404
  },
1405
1405
  onEnd: () => {
@@ -1411,12 +1411,12 @@ const ss = (t = {}) => {
1411
1411
  }), {
1412
1412
  physics: n,
1413
1413
  prepare: () => {
1414
- g(s, i), s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.pointerEvents = "none", s.style.transform = `perspective(${L}px) rotateY(0deg) translate3d(0%, 0, 0)`;
1414
+ g(s, i), s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.pointerEvents = "none", s.style.transform = `perspective(${P}px) rotateY(0deg) translate3d(0%, 0, 0)`;
1415
1415
  },
1416
1416
  css: (e) => {
1417
- const a = 1 - e, l = a * P, y = a * 100;
1417
+ const a = 1 - e, l = a * L, y = a * 100;
1418
1418
  return {
1419
- transform: `perspective(${L}px) rotateY(${-l}deg) translate3d(${y}%, 0, 0)`
1419
+ transform: `perspective(${P}px) rotateY(${-l}deg) translate3d(${y}%, 0, 0)`
1420
1420
  };
1421
1421
  },
1422
1422
  onEnd: () => {
@@ -1 +1 @@
1
- {"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/sheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAGhB,MAAM,UAAU,CAAC;AA0BlB,UAAU,YAAY;IACpB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AA2BD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,eA2HlD,CAAC"}
1
+ {"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/sheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAGhB,MAAM,UAAU,CAAC;AA0BlB,UAAU,YAAY;IACpB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AA2BD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,eAkIlD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssgoi/core",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "description": "Core animation engine for SSGOI - Native app-like page transitions with spring physics",
5
5
  "private": false,
6
6
  "type": "module",