@ssgoi/core 4.1.0 → 4.2.0
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.
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +548 -499
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts +4 -1
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -1
- package/dist/ssgoi-transition/navigation-detector-strategy.d.ts +42 -0
- package/dist/ssgoi-transition/navigation-detector-strategy.d.ts.map +1 -0
- package/dist/types.d.ts +19 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/ssgoi-transition/types.d.ts +0 -8
- package/dist/ssgoi-transition/types.d.ts.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var et=Object.defineProperty;var it=(n,i,t)=>i in n?et(n,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[i]=t;var d=(n,i,t)=>it(n,typeof i!="symbol"?i+"":i,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./types.cjs"),x=require("./provider-Cs5iBqRD.cjs");class nt{constructor(){d(this,"listeners",new Set);d(this,"rafId",null);d(this,"isRunning",!1);d(this,"startTime",Date.now());d(this,"lastUpdate",this.startTime);d(this,"elapsed",0);d(this,"lagThreshold",500);d(this,"adjustedLag",33);d(this,"maxDeltaTime",33);d(this,"gap",1e3/240);d(this,"nextTime",this.gap);d(this,"tick",()=>{const i=Date.now();let e=i-this.lastUpdate;e>this.lagThreshold||e<0?(this.startTime+=e-this.adjustedLag,e=this.adjustedLag):e>this.maxDeltaTime&&(e=this.maxDeltaTime),this.lastUpdate=i;const o=i-this.startTime,s=o-this.nextTime;if(s>0){const c=e/1e3;this.elapsed=o/1e3,this.nextTime+=s+(s>=this.gap?4:this.gap-s),this.listeners.forEach(r=>{r(c,this.elapsed)})}this.listeners.size>0?this.rafId=requestAnimationFrame(this.tick):(this.isRunning=!1,this.rafId=null)})}subscribe(i){return this.listeners.add(i),this.isRunning||(this.isRunning=!0,this.rafId=requestAnimationFrame(this.tick)),()=>{this.unsubscribe(i)}}unsubscribe(i){this.listeners.delete(i),this.listeners.size===0&&this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.isRunning=!1,this.rafId=null)}lagSmoothing(i,t){this.lagThreshold=i,this.adjustedLag=Math.min(t,i)}fps(i){this.gap=1e3/i,this.nextTime=this.elapsed*1e3+this.gap}getListenerCount(){return this.listeners.size}getElapsed(){return this.elapsed}}const D=new nt;function rt(n){const{integrator:i,from:t,to:e,velocity:o=0,onUpdate:s,onComplete:c,onStart:r}=n;let a={position:t,velocity:o},u=!0,m=0,g=!1;const y=v=>{if(u){if(g||(g=!0,r==null||r()),a=i.step(a,e,v),i.isSettled(a,e)){if(m+=Math.min(v,.033),m>=x.SETTLE_THRESHOLD){a={position:e,velocity:0},u=!1,s(a.position),D.unsubscribe(y),c();return}}else m=0;s(a.position)}};return D.subscribe(y),{stop:()=>{u&&(u=!1,D.unsubscribe(y))},getPosition:()=>a.position,getVelocity:()=>a.velocity,isRunning:()=>u}}const M=1e3/60;function ot(n,i,t,e=0){let s={position:i,velocity:e},c=0;const r=[];for(let a=0;a<600;a++){const u=a*M;if(r.push({time:u,position:s.position,velocity:s.velocity}),s=n.step(s,t,M/1e3),n.isSettled(s,t)){if(c+=M/1e3,c>=x.SETTLE_THRESHOLD){r.push({time:(a+1)*M,position:t,velocity:0});break}}else c=0}return r}function W(n,i){if(n.length===0)return{position:0,velocity:0};const t=n[0],e=n[n.length-1];if(i<=0)return{position:t.position,velocity:t.velocity};if(i>=e.time)return{position:e.position,velocity:e.velocity};let o=0,s=n.length-1;for(;o<s-1;){const u=Math.floor((o+s)/2);n[u].time<=i?o=u:s=u}const c=n[o],r=n[s],a=(i-c.time)/(r.time-c.time);return{position:c.position+(r.position-c.position)*a,velocity:c.velocity+(r.velocity-c.velocity)*a}}function st(n,i){return n.map(t=>i(t.position))}function at(n){const{integrator:i,element:t,from:e,to:o,velocity:s=0,style:c,onComplete:r,onStart:a}=n,u=ot(i,e,o,s);if(u.length===0)return a==null||a(),r(),{stop:()=>{},getPosition:()=>o,getVelocity:()=>0,isRunning:()=>!1};const m=st(u,c),g=u[u.length-1],y=g.time,v=m[0];if(v)for(const C of Object.keys(v))t.style[C]="";const f=t.animate(m,{duration:y,fill:"forwards",easing:"linear",composite:"replace"});let l=!0;const T=performance.now();return a==null||a(),f.onfinish=()=>{l&&(l=!1,r())},{stop:()=>{l&&(l=!1,f.cancel())},getPosition:()=>{if(!l)return g.position;const C=performance.now()-T;return W(u,C).position},getVelocity:()=>{if(!l)return 0;const C=performance.now()-T;return W(u,C).velocity},isRunning:()=>l}}class ct{static from(i){const{tick:t,css:e}=i;if(t&&e)throw new Error("Cannot use both 'tick' and 'css' options together");return e?o=>at({...o,element:e.element,style:e.style}):t?o=>rt({...o,onUpdate:t}):null}}class G{}const lt={stiffness:300,damping:30};class j extends G{constructor(t){super();d(this,"options");d(this,"runner");d(this,"controls",null);d(this,"isAnimating",!1);d(this,"currentValue");d(this,"currentVelocity",0);d(this,"updateFn");if(this.options={from:t.from??0,to:t.to??1,physics:t.physics,onComplete:t.onComplete??(()=>{}),onStart:t.onStart},this.currentValue=this.options.from,t.tick)this.updateFn=e=>{var o;return(o=t.tick)==null?void 0:o.call(t,e)};else if(t.css){const{element:e,style:o}=t.css;this.updateFn=s=>{const c=o(s);for(const[r,a]of Object.entries(c))e.style[r]=typeof a=="number"?String(a):a}}else this.updateFn=()=>{};this.runner=ct.from({tick:t.tick,css:t.css})}syncState(){var t;(t=this.updateFn)==null||t.call(this,this.currentValue)}createIntegrator(){const t=this.options.physics;return t!=null&&t.integrator?t.integrator():t!=null&&t.spring||t!=null&&t.inertia?x.IntegratorProvider.from({spring:t.spring,inertia:t.inertia}):new x.SpringIntegrator(lt)}runAnimation(t){var e,o;if(this.isAnimating=!0,!this.runner){(o=(e=this.options).onStart)==null||o.call(e),this.currentValue=t,this.currentVelocity=0,this.isAnimating=!1,this.options.onComplete();return}this.controls=this.runner({integrator:this.createIntegrator(),from:this.currentValue,to:t,velocity:this.currentVelocity,onStart:this.options.onStart,onComplete:()=>{this.currentValue=t,this.currentVelocity=0,this.isAnimating=!1,this.controls=null,this.options.onComplete()}})}forward(){this.stop(),this.runAnimation(this.options.to)}backward(){this.stop(),this.runAnimation(this.options.from)}reverse(){const t=this.options.from;this.options.from=this.options.to,this.options.to=t,this.isAnimating&&(this.stop(),this.runAnimation(this.options.to))}stop(){this.controls&&(this.currentValue=this.controls.getPosition(),this.currentVelocity=this.controls.getVelocity(),this.controls.stop(),this.controls=null),this.isAnimating=!1}getVelocity(){var t;return((t=this.controls)==null?void 0:t.getVelocity())??this.currentVelocity}getCurrentValue(){var t;return((t=this.controls)==null?void 0:t.getPosition())??this.currentValue}getIsAnimating(){return this.isAnimating}getCurrentState(){return{position:this.getCurrentValue(),velocity:this.getVelocity(),from:this.options.from,to:this.options.to}}setValue(t){this.currentValue=t}setVelocity(t){this.currentVelocity=t}updateOptions(t){this.options={...this.options,...t}}}class z extends G{constructor(t){super();d(this,"config");d(this,"animators",new Map);d(this,"itemOrder",[]);d(this,"completedCount",0);d(this,"completedAnimators",new Set);d(this,"direction","forward");d(this,"idCounter",0);d(this,"rafId",null);d(this,"from");d(this,"to");d(this,"initialState");this.config=t.config,this.from=t.from,this.to=t.to,this.initialState=t.state??{position:t.from,velocity:0},this.initializeAnimators()}generateId(){return`spring_${this.idCounter++}`}initializeAnimators(){this.config.items.forEach((t,e)=>{const o=this.generateId(),s=new j({from:this.from,to:this.to,physics:t.physics,tick:t.tick,css:t.css,onComplete:()=>this.onAnimatorComplete(o),onStart:t.onStart});(e===0||t.normalizedOffset===0)&&(s.setValue(this.initialState.position),s.setVelocity(this.initialState.velocity),s.syncState()),this.animators.set(o,{id:o,item:t,animator:s,started:!1}),this.itemOrder.push(o)})}getAnimatorProgress(t){const e=t.animator.getCurrentState(),o=Math.abs(e.to-e.from);return o===0?1:Math.abs(e.position-e.from)/o}getOrderedIds(){return this.direction==="forward"?this.itemOrder:[...this.itemOrder].reverse()}onAnimatorComplete(t){var o,s,c,r,a,u;const e=this.animators.get(t);!e||this.completedAnimators.has(t)||(this.completedAnimators.add(t),this.completedCount++,(s=(o=e.item).onComplete)==null||s.call(o),(r=(c=this.config).onProgress)==null||r.call(c,this.completedCount,this.config.items.length),this.completedCount===this.config.items.length&&(this.stopScheduler(),(u=(a=this.config).onEnd)==null||u.call(a)))}checkAndStartSprings(){const t=this.getOrderedIds();for(let e=0;e<t.length;e++){const o=t[e],s=this.animators.get(o);if(!s||s.started)continue;if(e===0){this.startAnimator(o);continue}const c=t[e-1],r=this.animators.get(c);if(!r||!r.started)continue;const a=this.getAnimatorProgress(r),u=s.item.normalizedOffset;a>=u&&this.startAnimator(o)}}startAnimator(t){const e=this.animators.get(t);!e||e.started||(e.started=!0,this.direction==="forward"?e.animator.forward():e.animator.backward())}startScheduler(){const t=()=>{this.checkAndStartSprings(),this.getIsAnimating()&&(this.rafId=requestAnimationFrame(t))};t()}stopScheduler(){this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null)}getFirstAnimator(){var e;const t=this.itemOrder[0];return t?((e=this.animators.get(t))==null?void 0:e.animator)??null:null}forward(){var t,e;this.stop(),this.direction="forward",this.completedCount=0,this.completedAnimators.clear(),this.resetStartedFlags(),(e=(t=this.config).onStart)==null||e.call(t),this.startScheduler()}backward(){var t,e;this.stop(),this.direction="backward",this.completedCount=0,this.completedAnimators.clear(),this.resetStartedFlags(),(e=(t=this.config).onStart)==null||e.call(t),this.startScheduler()}resetStartedFlags(){this.animators.forEach(t=>{t.started=!1})}stop(){this.stopScheduler(),this.animators.forEach(t=>{t.animator.stop(),t.started=!1})}reverse(){this.direction=this.direction==="forward"?"backward":"forward",this.animators.forEach(t=>{if(!t.started)return;const e=t.animator.getCurrentState();if(e.position===e.to){const s=new j({from:this.to,to:this.from,physics:t.item.physics,tick:t.item.tick,css:t.item.css,onComplete:()=>this.onAnimatorComplete(t.id),onStart:t.item.onStart});s.setValue(this.to),s.setVelocity(0),s.syncState(),s.forward(),t.animator=s}else t.animator.reverse()})}getCurrentState(){const t=this.getFirstAnimator();return t?t.getCurrentState():{position:0,velocity:0,from:0,to:1}}getCurrentValue(){const t=this.getFirstAnimator();return(t==null?void 0:t.getCurrentValue())??0}getVelocity(){const t=this.getFirstAnimator();return(t==null?void 0:t.getVelocity())??0}setValue(t){const e=this.getFirstAnimator();e==null||e.setValue(t)}setVelocity(t){const e=this.getFirstAnimator();e==null||e.setVelocity(t)}getIsAnimating(){for(const t of this.animators.values())if(t.animator.getIsAnimating())return!0;return!1}static fromState(t,e){return new z({...e,state:t})}}const U=Symbol.for("TRANSITION_STRATEGY"),$=n=>({runIn:async i=>{const{currentAnimation:t}=n;if(t&&t.direction==="out"){const o=t.controller.getCurrentValue(),s=t.controller.getVelocity();if(t.controller.stop(),i.out)return{config:await i.out,state:{position:o,velocity:s},from:1,to:0,direction:"backward"}}return i.in?{config:await i.in,state:{position:0,velocity:0},from:0,to:1,direction:"forward"}:{state:{position:0,velocity:0},from:0,to:1,direction:"forward"}},runOut:async i=>{const{currentAnimation:t}=n;if(t&&t.direction==="in"){const o=t.controller.getCurrentValue(),s=t.controller.getVelocity();if(t.controller.stop(),i.in)return{config:await i.in,state:{position:o,velocity:s},from:0,to:1,direction:"backward"}}return i.out?{config:await i.out,state:{position:1,velocity:0},from:1,to:0,direction:"forward"}:{state:{position:1,velocity:0},from:1,to:0,direction:"forward"}}}),K=()=>({runIn:async n=>n.in?{config:await n.in,state:{position:0,velocity:0},from:0,to:1,direction:"forward"}:{state:{position:0,velocity:0},from:0,to:1,direction:"forward"},runOut:async n=>n.out?{config:await n.out,state:{position:1,velocity:0},from:1,to:0,direction:"forward"}:{state:{position:1,velocity:0},from:1,to:0,direction:"forward"}}),H="data-ssgoi-scope",Y="data-ssgoi-scope-ready";function ut(){return n=>{if(n)return n.setAttribute(H,""),queueMicrotask(()=>{queueMicrotask(()=>{n.setAttribute(Y,"true")})}),()=>{}}}function B(n){return n.hasAttribute(Y)}function J(n){return n.closest(`[${H}]`)}const ft=n=>{let i=n.parentElement;for(;i&&i!==document.body;){const t=window.getComputedStyle(i),e=t.overflow+t.overflowY+t.overflowX;if(e.includes("auto")||e.includes("scroll")||i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth)return i;i=i.parentElement}return document.documentElement},dt=n=>{let i=n.parentElement;for(;i&&i!==document.body;){const t=window.getComputedStyle(i).position;if(t==="relative"||t==="absolute"||t==="fixed"||t==="sticky")return i;i=i.parentElement}return document.body};function X(n){return new Promise(i=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{i()})})})}function mt(n,i){var v;let t=null,e=null,o=null,s=null;const c={get currentAnimation(){return t}},r=((v=i==null?void 0:i.strategy)==null?void 0:v.call(i,c))||$(c),a=async f=>{var E;e&&(e.remove(),e=null);const l=n(),T=l.in&&l.in(f),C=!(i!=null&&i.strategy)&&l.out?l.out(f):void 0;if(!T)return;const V={in:b.normalizeToMultiAnimation(T),out:C?b.normalizeToMultiAnimation(C):void 0},S=await r.runIn(V);if(!S.config){t&&(t.direction="in");return}const p=S.config;(E=p.prepare)==null||E.call(p);const w=b.normalizeSchedule({...p,onEnd:()=>{var A;t=null,(A=p.onEnd)==null||A.call(p)}},f);p.wait&&await p.wait();const h=z.fromState(S.state,{config:w,from:S.from,to:S.to});t={controller:h,direction:"in"},await X(),S.direction==="forward"?h.forward():h.backward()},u=async f=>{var A;e=f;const l=n(),T=!(i!=null&&i.strategy)&&l.in?l.in(f):void 0,C=l.out&&l.out(f);if(!C)return;const V={in:T?b.normalizeToMultiAnimation(T):void 0,out:b.normalizeToMultiAnimation(C)},S=await r.runOut(V);if(!S.config){t&&(t.direction="out"),e&&(e.remove(),e=null);return}const p=S.config;E(),(A=p.prepare)==null||A.call(p);const w=b.normalizeSchedule({...p,onEnd:()=>{var P,I;(P=p.onEnd)==null||P.call(p),e&&(e.remove(),e=null),t=null,(I=i==null?void 0:i.onCleanupEnd)==null||I.call(i)}},f);p.wait&&await p.wait();const h=z.fromState(S.state,{config:w,from:S.from,to:S.to});t={controller:h,direction:"out"},await X(),S.direction==="forward"?h.forward():h.backward();function E(){!o||!e||(s&&o.contains(s)?o.insertBefore(e,s):o.appendChild(e))}};let m=null,g=!1;const y=f=>()=>{if(g)return;g=!0;const l=f.cloneNode(!0);m?queueMicrotask(()=>{document.contains(m)&&u(l)}):u(l)};return f=>{if(f)return requestAnimationFrame(()=>{o=f.parentElement,s=f.nextElementSibling}),g=!1,(i==null?void 0:i.scope)==="local"?queueMicrotask(()=>{m=J(f),!(m&&!B(m))&&a(f)}):a(f),y(f)}}const R=new Map;let k=null,_=!1;function Q(n){if(n instanceof HTMLElement&&R.has(n)){const t=R.get(n);R.delete(n),queueMicrotask(()=>{t()})}const i=n.childNodes;for(let t=0;t<i.length;t++){const e=i[t];e&&Q(e)}}function ht(){_||typeof document>"u"||(_=!0,k=new MutationObserver(n=>{for(const i of n){const t=i.removedNodes;for(let e=0;e<t.length;e++){const o=t[e];o&&Q(o)}}}),document.body?k.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",()=>{k==null||k.observe(document.body,{childList:!0,subtree:!0})},{once:!0}))}function Z(n,i){ht(),R.set(n,i)}function gt(n){return R.has(n)}function pt(){return R.size}function wt(n){const i=R.get(n);return i?(R.delete(n),i(),!0):!1}function yt(){R.clear(),k==null||k.disconnect(),k=null,_=!1}const F=new Map,q=new Map,N=new Map;function St(n,i,t){F.set(n,i);let e=q.get(n);if(e)return e;const o=i;return e=mt(()=>{const s=F.get(n);return s||(console.warn(`Transition "${String(n)}" not found`),{})},{strategy:t==null?void 0:t.strategy,scope:t==null?void 0:t.scope,onCleanupEnd:()=>{F.get(n)===o&&vt(n)}}),q.set(n,e),e}function vt(n){F.delete(n),q.delete(n),N.delete(n)}function At(n,i="manual"){const t=St(n.key,{in:n.in,out:n.out},{strategy:n[U],scope:n.scope});if(i==="manual")return t;let e=N.get(n.key);return e||(e=o=>{if(o){const s=t(o);s&&Z(o,s)}},N.set(n.key,e),e)}function Ct(n){const i=n.filter(t=>t.symmetric).map(t=>({from:t.to,to:t.from,transition:t.transition}));return[...n,...i]}function Tt(n){let i=!1,t=0,e=0,o=!1;const s=50,c=f=>{if(!n)return;const l=f.touches[0];l&&(o=l.clientX<s,o&&(t=l.clientX,e=l.clientY))},r=f=>{if(!n||!o)return;const l=f.touches[0];if(!l)return;const T=l.clientX-t,C=l.clientY-e;T>window.outerWidth/2-5&&Math.abs(T)>Math.abs(C)?i=!0:i=!1},a=()=>{n&&(o=!1,t=0,e=0)},u=()=>i,m=()=>{typeof window>"u"||n&&(window.addEventListener("touchstart",c,{passive:!0}),window.addEventListener("touchmove",r,{passive:!0}),window.addEventListener("touchend",a,{passive:!0}))},g=()=>{typeof window>"u"||(window.removeEventListener("touchstart",c),window.removeEventListener("touchmove",r),window.removeEventListener("touchend",a))};let y=0;return{initialize:m,cleanup:g,isSwipePending:u,resetSwipeDetection:()=>{y++,y>1&&(y=0,i=!1)}}}function Et(){let n=null,i=null;const t=new Map;let e=null;const o=()=>{n&&e&&t.set(e,{x:n.scrollLeft,y:n.scrollTop})};return{initializeContext:(m,g)=>{i=m,n||(n=ft(m),(n===document.documentElement?window:n).addEventListener("scroll",o,{passive:!0})),e=g},calculateScrollOffset:(m,g)=>{const y=m&&t.has(m)?t.get(m):{x:0,y:0},v=g&&t.has(g)?t.get(g):{x:0,y:0};return{x:-v.x+y.x,y:-v.y+y.y}},getScrollContainer:()=>n,getPositionedParentElement:()=>i?dt(i):document.body,getScrollPosition:m=>m&&t.has(m)?t.get(m):{x:0,y:0}}}function O(n,i){if(i==="*")return!0;if(i.endsWith("/*")){const t=i.slice(0,-2);return n===t||n.startsWith(t+"/")}return n===i}function bt(n,i,t){for(const e of t)if(O(n,e.from)&&O(i,e.to))return e.transition;for(const e of t)if((e.from==="*"||O(n,e.from))&&(e.to==="*"||O(i,e.to)))return e.transition;return null}function kt(n,i){const{transitions:t=[],defaultTransition:e,middleware:o=(w,h)=>({from:w,to:h}),skipOnIosSwipe:s=!0}=n,{outFirst:c=!0}=i||{};let r=null;const a=Ct(t),{initializeContext:u,calculateScrollOffset:m,getScrollContainer:g,getPositionedParentElement:y,getScrollPosition:v}=Et(),f=Tt(s);f.initialize();function l(){if(r!=null&&r.from&&(r!=null&&r.to)){const{from:w,to:h}=o(r.from,r.to),A=bt(w,h,a)||e,P=m(r.from,r.to),I={scrollOffset:P,scroll:v(r.from),get scrollingElement(){return g()||document.documentElement},get positionedParent(){return y()}},tt={scrollOffset:P,get scroll(){return r?v(r.to):{x:0,y:0}},get scrollingElement(){return g()||document.documentElement},get positionedParent(){return y()}};A&&(A.out&&r.outResolve&&r.outResolve(L=>A.out(L,I)),A.in&&r.inResolve&&r.inResolve(L=>A.in(L,tt))),r=null}}function T(){r&&(r.inResolve&&r.inResolve(()=>({})),r.outResolve&&r.outResolve(()=>({})),r=null)}const S=c?async(w,h)=>f.isSwipePending()?(f.resetSwipeDetection(),()=>({})):h==="in"&&(!r||!r.from)?()=>({}):(r||(r={}),h==="out"?(r.from=w,new Promise(E=>{r.outResolve=E,l()})):(r.to=w,new Promise(E=>{r.inResolve=E,l()}))):async(w,h)=>f.isSwipePending()?(f.resetSwipeDetection(),()=>({})):(r&&(h==="out"&&r.from&&r.from!==w||h==="in"&&r.to&&r.to!==w)&&T(),r||(r={}),h==="out"?(r.from=w,new Promise(A=>{r.outResolve=A,l()})):(r.to=w,new Promise(A=>{r.inResolve=A,l()})));return w=>({key:w,in:async h=>(u(h,w),(await S(w,"in"))(h)),out:async h=>(await S(w,"out"))(h),[U]:K})}exports.isCssAnimation=b.isCssAnimation;exports.isMultiAnimation=b.isMultiAnimation;exports.isSingleAnimation=b.isSingleAnimation;exports.isTickAnimation=b.isTickAnimation;exports.normalizeSchedule=b.normalizeSchedule;exports.normalizeToMultiAnimation=b.normalizeToMultiAnimation;exports.SCOPE_ATTR=H;exports.SCOPE_READY_ATTR=Y;exports.TRANSITION_STRATEGY=U;exports.createDefaultStrategy=$;exports.createPageTransitionStrategy=K;exports.createSggoiTransitionContext=kt;exports.createTransitionScope=ut;exports.findScope=J;exports.getWatchedCount=pt;exports.isScopeReady=B;exports.isWatched=gt;exports.resetObserver=yt;exports.transition=At;exports.triggerUnmount=wt;exports.watchUnmount=Z;
|
|
1
|
+
"use strict";var st=Object.defineProperty;var at=(e,n,t)=>n in e?st(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var m=(e,n,t)=>at(e,typeof n!="symbol"?n+"":n,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./types.cjs"),z=require("./provider-Cs5iBqRD.cjs");class ct{constructor(){m(this,"listeners",new Set);m(this,"rafId",null);m(this,"isRunning",!1);m(this,"startTime",Date.now());m(this,"lastUpdate",this.startTime);m(this,"elapsed",0);m(this,"lagThreshold",500);m(this,"adjustedLag",33);m(this,"maxDeltaTime",33);m(this,"gap",1e3/240);m(this,"nextTime",this.gap);m(this,"tick",()=>{const n=Date.now();let i=n-this.lastUpdate;i>this.lagThreshold||i<0?(this.startTime+=i-this.adjustedLag,i=this.adjustedLag):i>this.maxDeltaTime&&(i=this.maxDeltaTime),this.lastUpdate=n;const r=n-this.startTime,o=r-this.nextTime;if(o>0){const c=i/1e3;this.elapsed=r/1e3,this.nextTime+=o+(o>=this.gap?4:this.gap-o),this.listeners.forEach(a=>{a(c,this.elapsed)})}this.listeners.size>0?this.rafId=requestAnimationFrame(this.tick):(this.isRunning=!1,this.rafId=null)})}subscribe(n){return this.listeners.add(n),this.isRunning||(this.isRunning=!0,this.rafId=requestAnimationFrame(this.tick)),()=>{this.unsubscribe(n)}}unsubscribe(n){this.listeners.delete(n),this.listeners.size===0&&this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.isRunning=!1,this.rafId=null)}lagSmoothing(n,t){this.lagThreshold=n,this.adjustedLag=Math.min(t,n)}fps(n){this.gap=1e3/n,this.nextTime=this.elapsed*1e3+this.gap}getListenerCount(){return this.listeners.size}getElapsed(){return this.elapsed}}const N=new ct;function lt(e){const{integrator:n,from:t,to:i,velocity:r=0,onUpdate:o,onComplete:c,onStart:a}=e;let s={position:t,velocity:r},u=!0,h=0,p=!1;const w=S=>{if(u){if(p||(p=!0,a==null||a()),s=n.step(s,i,S),n.isSettled(s,i)){if(h+=Math.min(S,.033),h>=z.SETTLE_THRESHOLD){s={position:i,velocity:0},u=!1,o(s.position),N.unsubscribe(w),c();return}}else h=0;o(s.position)}};return N.subscribe(w),{stop:()=>{u&&(u=!1,N.unsubscribe(w))},getPosition:()=>s.position,getVelocity:()=>s.velocity,isRunning:()=>u}}const F=1e3/60;function ut(e,n,t,i=0){let o={position:n,velocity:i},c=0;const a=[];for(let s=0;s<600;s++){const u=s*F;if(a.push({time:u,position:o.position,velocity:o.velocity}),o=e.step(o,t,F/1e3),e.isSettled(o,t)){if(c+=F/1e3,c>=z.SETTLE_THRESHOLD){a.push({time:(s+1)*F,position:t,velocity:0});break}}else c=0}return a}function G(e,n){if(e.length===0)return{position:0,velocity:0};const t=e[0],i=e[e.length-1];if(n<=0)return{position:t.position,velocity:t.velocity};if(n>=i.time)return{position:i.position,velocity:i.velocity};let r=0,o=e.length-1;for(;r<o-1;){const u=Math.floor((r+o)/2);e[u].time<=n?r=u:o=u}const c=e[r],a=e[o],s=(n-c.time)/(a.time-c.time);return{position:c.position+(a.position-c.position)*s,velocity:c.velocity+(a.velocity-c.velocity)*s}}function ft(e,n){return e.map(t=>n(t.position))}function mt(e){const{integrator:n,element:t,from:i,to:r,velocity:o=0,style:c,onComplete:a,onStart:s}=e,u=ut(n,i,r,o);if(u.length===0)return s==null||s(),a(),{stop:()=>{},getPosition:()=>r,getVelocity:()=>0,isRunning:()=>!1};const h=ft(u,c),p=u[u.length-1],w=p.time,S=h[0];if(S)for(const y of Object.keys(S))t.style[y]="";const d=t.animate(h,{duration:w,fill:"forwards",easing:"linear",composite:"replace"});let l=!0;const A=performance.now();return s==null||s(),d.onfinish=()=>{l&&(l=!1,a())},{stop:()=>{l&&(l=!1,d.cancel())},getPosition:()=>{if(!l)return p.position;const y=performance.now()-A;return G(u,y).position},getVelocity:()=>{if(!l)return 0;const y=performance.now()-A;return G(u,y).velocity},isRunning:()=>l}}class dt{static from(n){const{tick:t,css:i}=n;if(t&&i)throw new Error("Cannot use both 'tick' and 'css' options together");return i?r=>mt({...r,element:i.element,style:i.style}):t?r=>lt({...r,onUpdate:t}):null}}class J{}const ht={stiffness:300,damping:30};class $ extends J{constructor(t){super();m(this,"options");m(this,"runner");m(this,"controls",null);m(this,"isAnimating",!1);m(this,"currentValue");m(this,"currentVelocity",0);m(this,"updateFn");if(this.options={from:t.from??0,to:t.to??1,physics:t.physics,onComplete:t.onComplete??(()=>{}),onStart:t.onStart},this.currentValue=this.options.from,t.tick)this.updateFn=i=>{var r;return(r=t.tick)==null?void 0:r.call(t,i)};else if(t.css){const{element:i,style:r}=t.css;this.updateFn=o=>{const c=r(o);for(const[a,s]of Object.entries(c))i.style[a]=typeof s=="number"?String(s):s}}else this.updateFn=()=>{};this.runner=dt.from({tick:t.tick,css:t.css})}syncState(){var t;(t=this.updateFn)==null||t.call(this,this.currentValue)}createIntegrator(){const t=this.options.physics;return t!=null&&t.integrator?t.integrator():t!=null&&t.spring||t!=null&&t.inertia?z.IntegratorProvider.from({spring:t.spring,inertia:t.inertia}):new z.SpringIntegrator(ht)}runAnimation(t){var i,r;if(this.isAnimating=!0,!this.runner){(r=(i=this.options).onStart)==null||r.call(i),this.currentValue=t,this.currentVelocity=0,this.isAnimating=!1,this.options.onComplete();return}this.controls=this.runner({integrator:this.createIntegrator(),from:this.currentValue,to:t,velocity:this.currentVelocity,onStart:this.options.onStart,onComplete:()=>{this.currentValue=t,this.currentVelocity=0,this.isAnimating=!1,this.controls=null,this.options.onComplete()}})}forward(){this.stop(),this.runAnimation(this.options.to)}backward(){this.stop(),this.runAnimation(this.options.from)}reverse(){const t=this.options.from;this.options.from=this.options.to,this.options.to=t,this.isAnimating&&(this.stop(),this.runAnimation(this.options.to))}stop(){this.controls&&(this.currentValue=this.controls.getPosition(),this.currentVelocity=this.controls.getVelocity(),this.controls.stop(),this.controls=null),this.isAnimating=!1}getVelocity(){var t;return((t=this.controls)==null?void 0:t.getVelocity())??this.currentVelocity}getCurrentValue(){var t;return((t=this.controls)==null?void 0:t.getPosition())??this.currentValue}getIsAnimating(){return this.isAnimating}getCurrentState(){return{position:this.getCurrentValue(),velocity:this.getVelocity(),from:this.options.from,to:this.options.to}}setValue(t){this.currentValue=t}setVelocity(t){this.currentVelocity=t}updateOptions(t){this.options={...this.options,...t}}}class D extends J{constructor(t){super();m(this,"config");m(this,"animators",new Map);m(this,"itemOrder",[]);m(this,"completedCount",0);m(this,"completedAnimators",new Set);m(this,"direction","forward");m(this,"idCounter",0);m(this,"rafId",null);m(this,"from");m(this,"to");m(this,"initialState");this.config=t.config,this.from=t.from,this.to=t.to,this.initialState=t.state??{position:t.from,velocity:0},this.initializeAnimators()}generateId(){return`spring_${this.idCounter++}`}initializeAnimators(){this.config.items.forEach((t,i)=>{const r=this.generateId(),o=new $({from:this.from,to:this.to,physics:t.physics,tick:t.tick,css:t.css,onComplete:()=>this.onAnimatorComplete(r),onStart:t.onStart});(i===0||t.normalizedOffset===0)&&(o.setValue(this.initialState.position),o.setVelocity(this.initialState.velocity),o.syncState()),this.animators.set(r,{id:r,item:t,animator:o,started:!1}),this.itemOrder.push(r)})}getAnimatorProgress(t){const i=t.animator.getCurrentState(),r=Math.abs(i.to-i.from);return r===0?1:Math.abs(i.position-i.from)/r}getOrderedIds(){return this.direction==="forward"?this.itemOrder:[...this.itemOrder].reverse()}onAnimatorComplete(t){var r,o,c,a,s,u;const i=this.animators.get(t);!i||this.completedAnimators.has(t)||(this.completedAnimators.add(t),this.completedCount++,(o=(r=i.item).onComplete)==null||o.call(r),(a=(c=this.config).onProgress)==null||a.call(c,this.completedCount,this.config.items.length),this.completedCount===this.config.items.length&&(this.stopScheduler(),(u=(s=this.config).onEnd)==null||u.call(s)))}checkAndStartSprings(){const t=this.getOrderedIds();for(let i=0;i<t.length;i++){const r=t[i],o=this.animators.get(r);if(!o||o.started)continue;if(i===0){this.startAnimator(r);continue}const c=t[i-1],a=this.animators.get(c);if(!a||!a.started)continue;const s=this.getAnimatorProgress(a),u=o.item.normalizedOffset;s>=u&&this.startAnimator(r)}}startAnimator(t){const i=this.animators.get(t);!i||i.started||(i.started=!0,this.direction==="forward"?i.animator.forward():i.animator.backward())}startScheduler(){const t=()=>{this.checkAndStartSprings(),this.getIsAnimating()&&(this.rafId=requestAnimationFrame(t))};t()}stopScheduler(){this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null)}getFirstAnimator(){var i;const t=this.itemOrder[0];return t?((i=this.animators.get(t))==null?void 0:i.animator)??null:null}forward(){var t,i;this.stop(),this.direction="forward",this.completedCount=0,this.completedAnimators.clear(),this.resetStartedFlags(),(i=(t=this.config).onStart)==null||i.call(t),this.startScheduler()}backward(){var t,i;this.stop(),this.direction="backward",this.completedCount=0,this.completedAnimators.clear(),this.resetStartedFlags(),(i=(t=this.config).onStart)==null||i.call(t),this.startScheduler()}resetStartedFlags(){this.animators.forEach(t=>{t.started=!1})}stop(){this.stopScheduler(),this.animators.forEach(t=>{t.animator.stop(),t.started=!1})}reverse(){this.direction=this.direction==="forward"?"backward":"forward",this.animators.forEach(t=>{if(!t.started)return;const i=t.animator.getCurrentState();if(i.position===i.to){const o=new $({from:this.to,to:this.from,physics:t.item.physics,tick:t.item.tick,css:t.item.css,onComplete:()=>this.onAnimatorComplete(t.id),onStart:t.item.onStart});o.setValue(this.to),o.setVelocity(0),o.syncState(),o.forward(),t.animator=o}else t.animator.reverse()})}getCurrentState(){const t=this.getFirstAnimator();return t?t.getCurrentState():{position:0,velocity:0,from:0,to:1}}getCurrentValue(){const t=this.getFirstAnimator();return(t==null?void 0:t.getCurrentValue())??0}getVelocity(){const t=this.getFirstAnimator();return(t==null?void 0:t.getVelocity())??0}setValue(t){const i=this.getFirstAnimator();i==null||i.setValue(t)}setVelocity(t){const i=this.getFirstAnimator();i==null||i.setVelocity(t)}getIsAnimating(){for(const t of this.animators.values())if(t.animator.getIsAnimating())return!0;return!1}static fromState(t,i){return new D({...i,state:t})}}const W=Symbol.for("TRANSITION_STRATEGY"),Q=e=>({runIn:async n=>{const{currentAnimation:t}=e;if(t&&t.direction==="out"){const r=t.controller.getCurrentValue(),o=t.controller.getVelocity();if(t.controller.stop(),n.out)return{config:await n.out,state:{position:r,velocity:o},from:1,to:0,direction:"backward"}}return n.in?{config:await n.in,state:{position:0,velocity:0},from:0,to:1,direction:"forward"}:{state:{position:0,velocity:0},from:0,to:1,direction:"forward"}},runOut:async n=>{const{currentAnimation:t}=e;if(t&&t.direction==="in"){const r=t.controller.getCurrentValue(),o=t.controller.getVelocity();if(t.controller.stop(),n.in)return{config:await n.in,state:{position:r,velocity:o},from:0,to:1,direction:"backward"}}return n.out?{config:await n.out,state:{position:1,velocity:0},from:1,to:0,direction:"forward"}:{state:{position:1,velocity:0},from:1,to:0,direction:"forward"}}}),Z=()=>({runIn:async e=>e.in?{config:await e.in,state:{position:0,velocity:0},from:0,to:1,direction:"forward"}:{state:{position:0,velocity:0},from:0,to:1,direction:"forward"},runOut:async e=>e.out?{config:await e.out,state:{position:1,velocity:0},from:1,to:0,direction:"forward"}:{state:{position:1,velocity:0},from:1,to:0,direction:"forward"}}),j="data-ssgoi-scope",X="data-ssgoi-scope-ready";function gt(){return e=>{if(e)return e.setAttribute(j,""),queueMicrotask(()=>{queueMicrotask(()=>{e.setAttribute(X,"true")})}),()=>{}}}function tt(e){return e.hasAttribute(X)}function et(e){return e.closest(`[${j}]`)}const pt=e=>{let n=e.parentElement;for(;n&&n!==document.body;){const t=window.getComputedStyle(n),i=t.overflow+t.overflowY+t.overflowX;if(i.includes("auto")||i.includes("scroll")||n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.parentElement}return document.documentElement},wt=e=>{let n=e.parentElement;for(;n&&n!==document.body;){const t=window.getComputedStyle(n).position;if(t==="relative"||t==="absolute"||t==="fixed"||t==="sticky")return n;n=n.parentElement}return document.body};function K(e){return new Promise(n=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{n()})})})}function yt(e,n){var S;let t=null,i=null,r=null,o=null;const c={get currentAnimation(){return t}},a=((S=n==null?void 0:n.strategy)==null?void 0:S.call(n,c))||Q(c),s=async d=>{var k;i&&(i.remove(),i=null);const l=e(),A=l.in&&l.in(d),y=!(n!=null&&n.strategy)&&l.out?l.out(d):void 0;if(!A)return;const V={in:C.normalizeToMultiAnimation(A),out:y?C.normalizeToMultiAnimation(y):void 0},g=await a.runIn(V);if(!g.config){t&&(t.direction="in");return}const f=g.config;(k=f.prepare)==null||k.call(f);const v=C.normalizeSchedule({...f,onEnd:()=>{var R;t=null,(R=f.onEnd)==null||R.call(f)}},d);f.wait&&await f.wait();const T=D.fromState(g.state,{config:v,from:g.from,to:g.to});t={controller:T,direction:"in"},await K(),g.direction==="forward"?T.forward():T.backward()},u=async d=>{var R;i=d;const l=e(),A=!(n!=null&&n.strategy)&&l.in?l.in(d):void 0,y=l.out&&l.out(d);if(!y)return;const V={in:A?C.normalizeToMultiAnimation(A):void 0,out:C.normalizeToMultiAnimation(y)},g=await a.runOut(V);if(!g.config){t&&(t.direction="out"),i&&(i.remove(),i=null);return}const f=g.config;k(),(R=f.prepare)==null||R.call(f);const v=C.normalizeSchedule({...f,onEnd:()=>{var P,I;(P=f.onEnd)==null||P.call(f),i&&(i.remove(),i=null),t=null,(I=n==null?void 0:n.onCleanupEnd)==null||I.call(n)}},d);f.wait&&await f.wait();const T=D.fromState(g.state,{config:v,from:g.from,to:g.to});t={controller:T,direction:"out"},await K(),g.direction==="forward"?T.forward():T.backward();function k(){!r||!i||(o&&r.contains(o)?r.insertBefore(i,o):r.appendChild(i))}};let h=null,p=!1;const w=d=>()=>{if(p)return;p=!0;const l=d.cloneNode(!0);h?queueMicrotask(()=>{document.contains(h)&&u(l)}):u(l)};return d=>{if(d)return requestAnimationFrame(()=>{r=d.parentElement,o=d.nextElementSibling}),p=!1,(n==null?void 0:n.scope)==="local"?queueMicrotask(()=>{h=et(d),!(h&&!tt(h))&&s(d)}):s(d),w(d)}}const b=new Map;let E=null,U=!1;function it(e){if(e instanceof HTMLElement&&b.has(e)){const t=b.get(e);b.delete(e),queueMicrotask(()=>{t()})}const n=e.childNodes;for(let t=0;t<n.length;t++){const i=n[t];i&&it(i)}}function St(){U||typeof document>"u"||(U=!0,E=new MutationObserver(e=>{for(const n of e){const t=n.removedNodes;for(let i=0;i<t.length;i++){const r=t[i];r&&it(r)}}}),document.body?E.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",()=>{E==null||E.observe(document.body,{childList:!0,subtree:!0})},{once:!0}))}function nt(e,n){St(),b.set(e,n)}function vt(e){return b.has(e)}function At(){return b.size}function Ct(e){const n=b.get(e);return n?(b.delete(e),n(),!0):!1}function Tt(){b.clear(),E==null||E.disconnect(),E=null,U=!1}const x=new Map,H=new Map,Y=new Map;function Et(e,n,t){x.set(e,n);let i=H.get(e);if(i)return i;const r=n;return i=yt(()=>{const o=x.get(e);return o||(console.warn(`Transition "${String(e)}" not found`),{})},{strategy:t==null?void 0:t.strategy,scope:t==null?void 0:t.scope,onCleanupEnd:()=>{x.get(e)===r&&bt(e)}}),H.set(e,i),i}function bt(e){x.delete(e),H.delete(e),Y.delete(e)}function kt(e,n="manual"){const t=Et(e.key,{in:e.in,out:e.out},{strategy:e[W],scope:e.scope});if(n==="manual")return t;let i=Y.get(e.key);return i||(i=r=>{if(r){const o=t(r);o&&nt(r,o)}},Y.set(e.key,i),i)}function Rt(e){const n=e.filter(t=>t.symmetric).map(t=>({from:t.to,to:t.from,transition:t.transition}));return[...e,...n]}function Pt(e){let n=!1,t=0,i=0,r=!1;const o=50,c=d=>{if(!e)return;const l=d.touches[0];l&&(r=l.clientX<o,r&&(t=l.clientX,i=l.clientY))},a=d=>{if(!e||!r)return;const l=d.touches[0];if(!l)return;const A=l.clientX-t,y=l.clientY-i;A>window.outerWidth/2-5&&Math.abs(A)>Math.abs(y)?n=!0:n=!1},s=()=>{e&&(r=!1,t=0,i=0)},u=()=>n,h=()=>{typeof window>"u"||e&&(window.addEventListener("touchstart",c,{passive:!0}),window.addEventListener("touchmove",a,{passive:!0}),window.addEventListener("touchend",s,{passive:!0}))},p=()=>{typeof window>"u"||(window.removeEventListener("touchstart",c),window.removeEventListener("touchmove",a),window.removeEventListener("touchend",s))};let w=0;return{initialize:h,cleanup:p,isSwipePending:u,resetSwipeDetection:()=>{w++,w>1&&(w=0,n=!1)}}}function Vt(){let e=null,n=null;const t=new Map;let i=null;const r=()=>{e&&i&&t.set(i,{x:e.scrollLeft,y:e.scrollTop})};return{initializeContext:(h,p)=>{n=h,e||(e=pt(h),(e===document.documentElement?window:e).addEventListener("scroll",r,{passive:!0})),i=p},calculateScrollOffset:(h,p)=>{const w=h&&t.has(h)?t.get(h):{x:0,y:0},S=p&&t.has(p)?t.get(p):{x:0,y:0};return{x:-S.x+w.x,y:-S.y+w.y}},getScrollContainer:()=>e,getPositionedParentElement:()=>n?wt(n):document.body,getScrollPosition:h=>h&&t.has(h)?t.get(h):{x:0,y:0}}}function O(e,n){if(n==="*")return!0;if(n.endsWith("/*")){const t=n.slice(0,-2);return e===t||e.startsWith(t+"/")}return e===n}function B(e,n,t){for(const i of t)if(O(e,i.from)&&O(n,i.to))return i.transition;for(const i of t)if((i.from==="*"||O(e,i.from))&&(i.to==="*"||O(n,i.to)))return i.transition;return null}function rt(){let e=null;function n(){if(e!=null&&e.from&&(e!=null&&e.to)&&(e!=null&&e.outResolve)&&(e!=null&&e.inResolve)){const t={from:e.from,to:e.to};e.outResolve(t),e.inResolve(t),e=null}}return{trigger(t,i){e||(e={}),i==="out"?e.from=t:e.to=t},get(t){return t==="in"&&(!e||!e.from)?Promise.resolve(null):new Promise(i=>{e||(e={}),t==="out"?e.outResolve=i:e.inResolve=i,n()})}}}function ot(){let e=null;function n(){var i,r;e&&((i=e.outResolve)==null||i.call(e,null),(r=e.inResolve)==null||r.call(e,null),e=null)}function t(){if(e!=null&&e.from&&(e!=null&&e.to)&&(e!=null&&e.outResolve)&&(e!=null&&e.inResolve)){const i={from:e.from,to:e.to};e.outResolve(i),e.inResolve(i),e=null}}return{trigger(i,r){e&&(r==="out"&&e.from&&e.from!==i||r==="in"&&e.to&&e.to!==i)&&n(),e||(e={}),r==="out"?e.from=i:e.to=i},get(i){return new Promise(r=>{e||(e={}),i==="out"?e.outResolve=r:e.inResolve=r,t()})}}}function It(e,n){const{transitions:t=[],defaultTransition:i,middleware:r=(g,f)=>({from:g,to:f}),skipOnIosSwipe:o=!0}=e,{outFirst:c=!0,createNavigationDetector:a}=n||{},s=(a==null?void 0:a())??(c?rt():ot()),u=Rt(t),{initializeContext:h,calculateScrollOffset:p,getScrollContainer:w,getPositionedParentElement:S,getScrollPosition:d}=Vt(),l=Pt(o);l.initialize();const A=async(g,f)=>{if(l.isSwipePending())return l.resetSwipeDetection(),()=>({});s.trigger(g,f);const v=await s.get(f);if(!v)return()=>({});const{from:T,to:k}=r(v.from,v.to),P=B(T,k,u)||i;if(!P)return()=>({});const I=p(v.from,v.to);if(f==="out"){const L={scrollOffset:I,scroll:d(v.from),get scrollingElement(){return w()||document.documentElement},get positionedParent(){return S()}};return M=>P.out(M,L)}else{const L={scrollOffset:I,get scroll(){return d(v.to)},get scrollingElement(){return w()||document.documentElement},get positionedParent(){return S()}};return async M=>{const _=await Promise.resolve(P.in(M,L)),q=_.onStart;return _.onStart=()=>{M.style.visibility="visible",q==null||q()},_}}},y=g=>({key:g,in:async f=>(h(f,g),(await A(g,"in"))(f)),out:async f=>(await A(g,"out"))(f),[W]:Z}),V=(g,f)=>{const{from:v,to:T}=r(g,f);return!!(B(v,T,u)||i)};return a?{getTransition:y,hasMatchingTransition:V}:y}exports.isCssAnimation=C.isCssAnimation;exports.isMultiAnimation=C.isMultiAnimation;exports.isSingleAnimation=C.isSingleAnimation;exports.isTickAnimation=C.isTickAnimation;exports.normalizeSchedule=C.normalizeSchedule;exports.normalizeToMultiAnimation=C.normalizeToMultiAnimation;exports.SCOPE_ATTR=j;exports.SCOPE_READY_ATTR=X;exports.TRANSITION_STRATEGY=W;exports.createAnyOrderDetector=ot;exports.createDefaultStrategy=Q;exports.createOutFirstDetector=rt;exports.createPageTransitionStrategy=Z;exports.createSggoiTransitionContext=It;exports.createTransitionScope=gt;exports.findScope=et;exports.getWatchedCount=At;exports.isScopeReady=tt;exports.isWatched=vt;exports.resetObserver=Tt;exports.transition=kt;exports.triggerUnmount=Ct;exports.watchUnmount=nt;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ export * from './transition/transition';
|
|
|
3
3
|
export * from './transition/transition-scope';
|
|
4
4
|
export * from './transition/unmount-observer';
|
|
5
5
|
export * from './ssgoi-transition/create-ssgoi-transition-context';
|
|
6
|
+
export * from './ssgoi-transition/navigation-detector-strategy';
|
|
6
7
|
export * from './transition/transition-strategy';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oDAAoD,CAAC;AACnE,cAAc,kCAAkC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oDAAoD,CAAC;AACnE,cAAc,iDAAiD,CAAC;AAChE,cAAc,kCAAkC,CAAC"}
|