@infinityfx/lively 5.0.0-alpha.0 → 5.0.0-alpha.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.
package/dist/animate.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsx as t}from"react/jsx-runtime";import{createContext as e,useId as n,use as r,useRef as i,useImperativeHandle as o,useLayoutEffect as a,useEffect as s,Children as c,isValidElement as m,cloneElement as l}from"react";import f from"./core/animator.js";import u from"./core/clip.js";import{serializeTriggers as d,getLifeCycleAnimations as p,forEachTrigger as g,mergeStyles as y,getInitialStyleFromLinks as h,mergeRefs as k,shouldTrigger as j}from"./core/utils.js";import{LayoutGroupContext as v}from"./layout-group.js";import{registerAsMorph as w,getMorphTarget as L,deleteMorphTarget as E,registerToLayoutGroup as S,unregisterFromLayoutGroup as T}from"./core/state.js";const D=e("");function x({ref:e,children:x,inherit:z=!1,initial:A={},animate:I={},triggers:_={animate:["mount"]},stagger:b=.07,staggerLimit:C=10,ignoreScaleDeformation:O=!1,transition:P={},morph:q,clips:B,paused:F=!1,onAnimationEnd:G}){const H=_._livelyId??"_la"+n(),J=r(D),K=r(v),M=i(0),N=i(d(_)),Q=i(null);if(!Q.current){const t={animate:I instanceof u?I:new u(I,A)};for(const e in B)t[e]=B[e]instanceof u?B[e]:new u(B[e],A);const e=Q.current=new f({id:H,clips:t,lifeCycleAnimations:p(_),ignoreScaleDeformation:O,transition:P,stagger:b,staggerLimit:C});e.register(J,z),e.addLinks(I)}const{current:R}=Q;return o(e,(()=>R),[]),a((()=>{if(R.register(J,z),R.addLinks(I),q){clearTimeout(M.current),w(q,R);const t=L(q,H);t&&(R.transition(t),E(q,t),R.state="mounted")}S(K,H)&&(R.state="mounted"),document.fonts.ready.finally((()=>R.mount()));const t=()=>R.forEachTrack((t=>t.snapshot()));return window.addEventListener("resize",t),()=>{R.dispose(),T(K,H),q&&(M.current=E(q,R,1)),window.removeEventListener("resize",t)}}),[]),s((()=>{const t=d(_);g(_,((e,n,r)=>{j(N.current[e],t[e])})),N.current=t}),[_]),s((()=>{if(!(I instanceof u||"mounted"!==R.state))for(const t in I){const e=I[t];t in R.links&&"object"!=typeof e&&R.links[t].set(e,R.defaultTransitionOptions)}}),[I]),s((()=>(G&&R.on("animationend",G),()=>{G&&R.off("animationend",G)})),[G]),s((()=>R.setPlayState(F)),[F]),t(D,{value:H,children:c.map(x,((t,e)=>{if(!m(t))return t;let{ref:n,style:r}=t.props;return r=y(r,R.mergeInitialStyles(A),h(R.links,e)),l(t,{ref:k(n||null,(t=>R.addTrack(t,e))),style:r,pathLength:"strokeDasharray"in r?1:void 0,"data-lively":!0})}))})}export{D as AnimateContext,x as default};
2
+ import{jsx as t}from"react/jsx-runtime";import{createContext as n,useId as e,use as r,useRef as i,useImperativeHandle as o,useLayoutEffect as s,useEffect as a,Children as c,isValidElement as m,cloneElement as d}from"react";import l from"./core/animator.js";import f from"./core/clip.js";import{serializeTriggers as u,getLifeCycleAnimations as p,forEachTrigger as g,mergeStyles as y,getInitialStyleFromLinks as h,mergeRefs as k,shouldTrigger as j}from"./core/utils.js";import{LayoutGroupContext as v}from"./layout-group.js";import{registerToLayoutGroup as w,getMorphTarget as L,deleteMorphTarget as E,unregisterFromLayoutGroup as C}from"./core/state.js";const x=n("");function z({ref:n,children:z,inherit:A=!1,initial:I={},animate:S={},triggers:T={animate:["mount"]},stagger:_=.07,staggerLimit:b=10,deformCorrection:D,transition:P,morph:q,clips:B,paused:F=!1,onAnimationEnd:G}){const H=T._livelyId??"_la"+e(),J=r(x),K=r(v),M=i(u(T)),N=i(null);if(!N.current){const t={animate:S instanceof f?S:new f(S,I)};for(const n in B)t[n]=B[n]instanceof f?B[n]:new f(B[n],I);const n=N.current=new l({id:H,clips:t,lifeCycleAnimations:p(T),deformCorrection:D,transition:P,stagger:_,staggerLimit:b});n.register(J,A),n.addLinks(S)}const{current:O}=N,Q=w(K,H);return o(n,(()=>O),[]),s((()=>{if(O.register(J,A,q),O.addLinks(S),q){const t=L(q,H);t&&(O.transition(t),E(q,t.id),O.state="mounted")}w(K,H)&&(O.state="mounted"),document.fonts.ready.finally((()=>O.mount()));const t=()=>O.forEachTrack((t=>t.snapshot()));return window.addEventListener("resize",t),()=>{O.dispose(q),C(K,H),window.removeEventListener("resize",t)}}),[]),a((()=>{const t=u(T);g(T,((n,e,r)=>{j(M.current[n],t[n])})),M.current=t}),[T]),a((()=>{if(!(S instanceof f||"mounted"!==O.state))for(const t in S){const n=S[t];t in O.links&&"object"!=typeof n&&O.links[t].set(n,{duration:S.duration,easing:S.easing})}}),[S]),a((()=>(G&&O.on("animationend",G),()=>{G&&O.off("animationend",G)})),[G]),a((()=>O.setPlayState(F)),[F]),t(x,{value:H,children:c.map(z,((t,n)=>{if(!m(t))return t;let{ref:e,style:r}=t.props;return r=y(r,O.mergeInitialStyles(I,Q),h(O.links,n)),d(t,{ref:k(e||null,(t=>O.addTrack(t,n))),style:r,pathLength:"strokeDasharray"in r?1:void 0,"data-lively":H})}))})}export{x as AnimateContext,z as default};
3
3
  //# sourceMappingURL=animate.js.map
@@ -1,2 +1,2 @@
1
- import t from"./clip.js";import{isRegistered as i,registerAnimator as s,getParentAnimator as e,unregisterAnimator as a}from"./state.js";import n from"./track.js";import{extractAnimationLinks as r}from"./utils.js";class h{constructor({id:t,clips:i,lifeCycleAnimations:s,ignoreScaleDeformation:e,transition:a,stagger:n,staggerLimit:r}){this.parent=null,this.dependents=new Set,this.links={},this.onDisposeLinks=null,this.tracks=new Set,this.trackList=[],this.initialStyles=null,this.eventListeners={},this.state="unmounted",this.paused=!1,this.frame=0;const{cache:h,...o}=a;this.id=t,this.clips=i,this.lifeCycleAnimations=s,this.ignoreScaleDeformation=e,this.defaultTransitionOptions=o,this.cache=h??["x","y","sx","sy","rotate","borderRadius"],this.stagger=n,this.staggerLimit=r}register(t,a){i(this.id)||(s(this.id,this),t&&!1!==a&&(this.parent=e(t,"boolean"==typeof a?0:a)),this.parent&&this.parent.dependents.add(this))}mount(){"unmounted"===this.state&&this.trigger("mount"),this.state="mounted",cancelAnimationFrame(this.frame),this.tick()}dispose(){this.stop(),this.onDisposeLinks?.(),cancelAnimationFrame(this.frame),this.parent&&this.parent.dependents.delete(this),this.trackList.forEach((t=>t.cache=t.snapshot())),this.state="unmounted",a(this.id)}on(t,i){t in this.eventListeners||(this.eventListeners[t]=new Set),this.eventListeners[t].add(i)}off(t,i){this.eventListeners[t]?.delete(i)}dispatch(t,...i){this.eventListeners[t]?.forEach((t=>t(...i)))}tick(){this.paused||this.trackList.forEach((t=>{!this.ignoreScaleDeformation&&t.animations.length&&t.correct()})),this.frame=requestAnimationFrame(this.tick.bind(this))}addLinks(i){const[s,e]=r(i,((i,s)=>{this.forEachTrack(((e,a)=>{const n=new t({...s.options,composite:"override",[i]:s.get(a)});e.push(n,{},a===this.tracks.size?()=>this.dispatch("animationend"):void 0)}))}));this.links=s,this.onDisposeLinks=e}addTrack(t,i){if(!(t instanceof HTMLElement||t instanceof SVGElement)||this.tracks.has(t))return;const s=new n(t,this.cache),e=this.lifeCycleAnimations.mount;this.tracks.add(t),this.trackList.splice(i,0,s),"mounted"===this.state&&e&&e.forEach((t=>s.push(this.clips[t])))}mergeInitialStyles(i){if(this.initialStyles)return this.initialStyles;const s=(this.lifeCycleAnimations.mount||[]).map((t=>this.clips[t]));return s.length?i=t.mergeInitialStyles(s,i):this.parent&&(i=this.parent.mergeInitialStyles(i)),this.initialStyles=i}pretime(t,i){if(t.isEmpty)return 0;const{duration:s,delay:e,iterations:a}=t.getConfig(i);return s*a+e+Math.max(Math.min(this.tracks.size,this.staggerLimit)-1,0)*this.stagger}trigger(t,i={}){let s=this.lifeCycleAnimations[t],e=0;return s&&s.forEach((t=>e=Math.max(this.play(t,i),e))),e}play(t,{cascade:i="forward",delay:s=0,tag:e,...a}={}){if(this.paused||this.parent&&!e)return 0;let n="string"==typeof t?this.clips[t]:t;e&&e in this.clips&&(n=this.clips[e]),e||"string"!=typeof t||(e=t);const r=this.pretime(n,a),h=this.cascade(n,{...a,delay:"reverse"===i?s:r+s,tag:e});return this.push(n,{...a,delay:"reverse"===i?h+s:s,tag:e})}cascade(t,i){let s=0;return this.dependents.forEach((e=>{s=Math.max(s,e.play(t,i))})),s}forEachTrack(t){let i=0;for(;i<this.tracks.size;){const s=this.trackList[i];s.element.isConnected?t(s,i++):(this.tracks.delete(s.element),this.trackList.splice(i,1))}}push(t,{override:i,delay:s=0,tag:e,...a}){if(t.isEmpty)return 0;let n=0;return this.forEachTrack(((r,h)=>{i&&r.clear();const o=r.push(t,{...a,delay:s+Math.min(h,this.staggerLimit-1)*this.stagger},h===this.tracks.size?()=>this.dispatch("animationend",e):void 0);n=Math.max(n,o)})),n}transition(t,i=this.defaultTransitionOptions){this.paused||(this.trackList.forEach(((s,e)=>{const{cache:a}=t&&e<t.tracks.size?t.trackList[e]:{};s.transition(a,i)})),this.dispatch("transitionstart"))}setPlayState(t){this.trackList.forEach((i=>i.toggle(t))),this.paused=t,this.dependents.forEach((i=>i.setPlayState(t)))}stop(t){this.trackList.forEach((i=>i.clear(t)))}}export{h as default};
1
+ import t from"./clip.js";import{registerAnimator as i,registerAsMorph as s,getParentAnimator as e,unregisterAnimator as a,deleteMorphTarget as n}from"./state.js";import r from"./track.js";import{extractAnimationLinks as h}from"./utils.js";class o{constructor({id:t,clips:i,lifeCycleAnimations:s,deformCorrection:e,transition:a,stagger:n,staggerLimit:r}){this.parent=null,this.dependents=new Set,this.inherit=[],this.links={},this.onDisposeLinks=null,this.tracks=new Set,this.trackList=[],this.initialStyles={},this.eventListeners={},this.state="unmounted",this.paused=!1,this.timeout=0,this.frame=0;const{cache:h,...o}=a||{};this.id=t,this.clips=i,this.lifeCycleAnimations=s,this.ignoreScaleDeformation=void 0!==e&&!e,this.defaultTransitionOptions=o,this.cache=h||["x","y","sx","sy","rotate","borderRadius"],this.align="object"==typeof e?e:{x:"left",y:"top"},this.stagger=n,this.staggerLimit=r,void 0===e&&this.inherit.push("ignoreScaleDeformation"),void 0===e&&this.inherit.push("align"),a||this.inherit.push("defaultTransitionOptions"),h||this.inherit.push("cache")}register(t,a,n){if(clearTimeout(this.timeout),i(this.id,this),n&&s(n,this.id),t&&!1!==a&&(this.parent=e(t,"boolean"==typeof a?0:a)),this.parent){this.parent.dependents.add(this);for(const t of this.inherit)this[t]=this.parent[t]}}mount(){"unmounted"===this.state&&this.trigger("mount"),this.state="mounted",cancelAnimationFrame(this.frame),this.tick()}dispose(t){this.stop(),this.onDisposeLinks?.(),cancelAnimationFrame(this.frame),this.trackList.forEach((t=>t.cache=t.snapshot())),this.state="unmounted",this.timeout=setTimeout((()=>{a(this.id),t&&n(t,this.id),this.parent&&this.parent.dependents.delete(this)}),1)}on(t,i){t in this.eventListeners||(this.eventListeners[t]=new Set),this.eventListeners[t].add(i)}off(t,i){this.eventListeners[t]?.delete(i)}dispatch(t,...i){this.eventListeners[t]?.forEach((t=>t(...i)))}tick(){this.paused||this.trackList.forEach((t=>{this.ignoreScaleDeformation||t.correct()})),this.frame=requestAnimationFrame(this.tick.bind(this))}addLinks(i){const[s,e]=h(i,((i,s)=>{this.forEachTrack(((e,a)=>{const n=new t({...s.options,composite:"override",[i]:s.get(a)});e.push(n)}))}));this.links=s,this.onDisposeLinks=e}addTrack(t,i){if(!(t instanceof HTMLElement||t instanceof SVGElement)||this.tracks.has(t))return;const s=new r(t,this.cache,this.align),e=this.lifeCycleAnimations.mount;this.tracks.add(t),this.trackList.splice(i,0,s),"mounted"===this.state&&e&&e.forEach((t=>s.push(this.clips[t])))}mergeInitialStyles(i,s=!1){const e=s?"mounted":"unmounted";if(e in this.initialStyles)return this.initialStyles[e];const a=(this.lifeCycleAnimations.mount||[]).map((t=>this.clips[t])).filter((t=>!t.isEmpty));return a.length?i=t.mergeInitialStyles(a,i,s):this.parent&&(i=this.parent.mergeInitialStyles(i,s)),this.initialStyles[e]=i}pretime(t,i){if(t.isEmpty)return 0;const{duration:s,delay:e,iterations:a}=t.getConfig(i);return(s*a+e)/1e3+Math.max(Math.min(this.tracks.size,this.staggerLimit)-1,0)*this.stagger}trigger(t,i={}){let s=this.lifeCycleAnimations[t],e=0;return s&&s.forEach((t=>e=Math.max(this.play(t,i),e))),e}play(t,{cascade:i="forward",delay:s=0,tag:e,...a}={}){if(this.paused||this.parent&&!e)return 0;let n="string"==typeof t?this.clips[t]:t;e&&e in this.clips&&(n=this.clips[e]),e||"string"!=typeof t||(e=t);const r=this.pretime(n,a),h=this.cascade(n,{...a,delay:"reverse"===i?s:r+s,tag:e});return this.push(n,{...a,delay:"reverse"===i?h+s:s,tag:e})}cascade(t,i){let s=0;return this.dependents.forEach((e=>{s=Math.max(s,e.play(t,i))})),s}forEachTrack(t){let i=0;for(;i<this.tracks.size;){const s=this.trackList[i];s.element.isConnected?t(s,i++):(this.tracks.delete(s.element),this.trackList.splice(i,1))}}push(t,{override:i,delay:s=0,tag:e,...a}){if(t.isEmpty)return 0;let n=0;return this.forEachTrack(((r,h)=>{i&&r.clear();const o=r.push(t,{...a,delay:s+Math.min(h,this.staggerLimit-1)*this.stagger},h===this.tracks.size-1?()=>this.dispatch("animationend",e):void 0);n=Math.max(n,o)})),n}transition(t,i=this.defaultTransitionOptions){this.paused||(this.trackList.forEach(((s,e)=>{const{cache:a}=t&&e<t.tracks.size?t.trackList[e]:{};s.transition(a,i)})),this.dispatch("transitionstart"))}setPlayState(t){this.trackList.forEach((i=>i.toggle(t))),this.paused=t,this.dependents.forEach((i=>i.setPlayState(t)))}stop(t){this.trackList.forEach((i=>i.clear(t)))}}export{o as default};
2
2
  //# sourceMappingURL=animator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"animator.js","sources":["../../src/core/animator.ts"],"sourcesContent":[null],"names":["Animator","constructor","id","clips","lifeCycleAnimations","ignoreScaleDeformation","transition","stagger","staggerLimit","this","parent","dependents","Set","links","onDisposeLinks","tracks","trackList","initialStyles","eventListeners","state","paused","frame","cache","options","defaultTransitionOptions","register","parentId","inherit","isRegistered","registerAnimator","getParentAnimator","add","mount","trigger","cancelAnimationFrame","tick","dispose","stop","delete","forEach","track","snapshot","unregisterAnimator","on","event","callback","off","dispatch","args","animations","length","correct","requestAnimationFrame","bind","addLinks","animate","disposeLinks","extractAnimationLinks","key","link","forEachTrack","i","clip","Clip","composite","get","push","size","undefined","addTrack","element","index","HTMLElement","SVGElement","has","Track","splice","animation","mergeInitialStyles","styles","map","pretime","isEmpty","duration","delay","iterations","getConfig","Math","max","min","elapsed","play","cascade","tag","cascadeDelay","animator","isConnected","override","clear","added","from","setPlayState","toggle"],"mappings":"qNAmBc,MAAOA,EA8BjB,WAAAC,EAAYC,GAAEA,EAAEC,MAAEA,EAAKC,oBAAEA,EAAmBC,uBAAEA,EAAsBC,WAAEA,EAAUC,QAAEA,EAAOC,aAAEA,IA3B3FC,KAAAC,OAA+B,KAC/BD,KAAAE,WAAiC,IAAIC,IAOrCH,KAAAI,MAEI,CAAA,EACJJ,KAAAK,eAAsC,KACtCL,KAAAM,OAAuB,IAAIH,IAC3BH,KAAAO,UAAqB,GAMrBP,KAAAQ,cAAqC,KACrCR,KAAAS,eAEI,CAAA,EACJT,KAAAU,MAAgD,YAChDV,KAAAW,QAAS,EACTX,KAAAY,MAAQ,EAiBJ,MAAMC,MAAEA,KAAUC,GAAYjB,EAE9BG,KAAKP,GAAKA,EACVO,KAAKN,MAAQA,EACbM,KAAKL,oBAAsBA,EAC3BK,KAAKJ,uBAAyBA,EAC9BI,KAAKe,yBAA2BD,EAChCd,KAAKa,MAAQA,GAAS,CAAC,IAAK,IAAK,KAAM,KAAM,SAAU,gBACvDb,KAAKF,QAAUA,EACfE,KAAKD,aAAeA,CACxB,CAEA,QAAAiB,CAASC,EAAkBC,GACnBC,EAAanB,KAAKP,MAEtB2B,EAAiBpB,KAAKP,GAAIO,MAEtBiB,IAAwB,IAAZC,IACZlB,KAAKC,OAASoB,EAAkBJ,EAA6B,kBAAZC,EAAwB,EAAIA,IAE7ElB,KAAKC,QACLD,KA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AAOA,EAAQG,KAAKE,IAAI5B,EAAGpD,KAAKD,aAAe,GAAKC,KAAKF,SAC1DsD,IAAMpD,KAAKM,OAAOoD,KAAO,IAAM1D,KAAKsC,SAAS,eAAgB8C,QAAOzB,GAEvEsB,EAAUH,KAAKC,IAAIE,EAASS,EAAM,IAG/BT,CACX,CAEA,UAAApF,CAAW8F,EAAsB7E,EAA6Bd,KAAKe,0BAC3Df,KAAKW,SAETX,KAAKO,UAAUuB,SAAQ,CAACC,EAAOqB,KAC3B,MAAMvC,MAAEA,GAAU8E,GAAQvC,EAAIuC,EAAKrF,OAAOoD,KAAOiC,EAAKpF,UAAU6C,GAAK,CAAA,EAErErB,EAAMlC,WAAWgB,EAAOC,EAAQ,IAGpCd,KAAKsC,SAAS,mBAClB,CAEA,YAAAsD,CAAajF,GACTX,KAAKO,UAAUuB,SAAQC,GAASA,EAAM8D,OAAOlF,KAC7CX,KAAKW,OAASA,EAEdX,KAAKE,WAAW4B,SAAQwD,GAAYA,EAASM,aAAajF,IAC9D,CAEA,IAAAiB,CAAKwC,GACDpE,KAAKO,UAAUuB,SAAQC,GAASA,EAAM0D,MAAMrB,IAChD"}
1
+ {"version":3,"file":"animator.js","sources":["../../src/core/animator.ts"],"sourcesContent":[null],"names":["Animator","constructor","id","clips","lifeCycleAnimations","deformCorrection","transition","stagger","staggerLimit","this","parent","dependents","Set","inherit","links","onDisposeLinks","tracks","trackList","initialStyles","eventListeners","state","paused","timeout","frame","cache","options","ignoreScaleDeformation","undefined","defaultTransitionOptions","align","x","y","push","register","parentId","morph","clearTimeout","registerAnimator","registerAsMorph","getParentAnimator","add","key","mount","trigger","cancelAnimationFrame","tick","dispose","stop","forEach","track","snapshot","setTimeout","unregisterAnimator","deleteMorphTarget","delete","on","event","callback","off","dispatch","args","correct","requestAnimationFrame","bind","addLinks","animate","disposeLinks","extractAnimationLinks","link","forEachTrack","i","clip","Clip","composite","get","addTrack","element","index","HTMLElement","SVGElement","has","Track","animations","splice","animation","mergeInitialStyles","styles","mounted","map","filter","isEmpty","length","pretime","duration","delay","iterations","getConfig","Math","max","min","size","elapsed","play","cascade","tag","cascadeDelay","animator","isConnected","override","clear","added","from","setPlayState","toggle"],"mappings":"+OAmBc,MAAOA,EAoCjB,WAAAC,EAAYC,GAAEA,EAAEC,MAAEA,EAAKC,oBAAEA,EAAmBC,iBAAEA,EAAgBC,WAAEA,EAAUC,QAAEA,EAAOC,aAAEA,IAjCrFC,KAAAC,OAA+B,KAC/BD,KAAAE,WAAiC,IAAIC,IACrCH,KAAAI,QAAyF,GAOzFJ,KAAAK,MAEI,CAAA,EACJL,KAAAM,eAAsC,KACtCN,KAAAO,OAAuB,IAAIJ,IAC3BH,KAAAQ,UAAqB,GAOrBR,KAAAS,cAGI,CAAA,EACJT,KAAAU,eAEI,CAAA,EACJV,KAAAW,MAAgD,YAChDX,KAAAY,QAAS,EACTZ,KAAAa,QAAU,EACVb,KAAAc,MAAQ,EAiBJ,MAAMC,MAAEA,KAAUC,GAAYnB,GAAc,CAAA,EAE5CG,KAAKP,GAAKA,EACVO,KAAKN,MAAQA,EACbM,KAAKL,oBAAsBA,EAC3BK,KAAKiB,4BAA8CC,IAArBtB,IAA0CA,EACxEI,KAAKmB,yBAA2BH,EAChChB,KAAKe,MAAQA,GAAS,CAAC,IAAK,IAAK,KAAM,KAAM,SAAU,gBACvDf,KAAKoB,MAAoC,iBAArBxB,EAAgCA,EAAmB,CAAEyB,EAAG,OAAQC,EAAG,OACvFtB,KAAKF,QAAUA,EACfE,KAAKD,aAAeA,OAEKmB,IAArBtB,GAAgCI,KAAKI,QAAQmB,KAAK,+BAC7BL,IAArBtB,GAAgCI,KAAKI,QAAQmB,KAAK,SACjD1B,GAAYG,KAAKI,QAAQmB,KAAK,4BAC9BR,GAAOf,KAAKI,QAAQmB,KAAK,QAClC,CAEA,QAAAC,CAASC,EAAkBrB,EAA2BsB,GAQlD,GAPAC,aAAa3B,KAAKa,SAClBe,EAAiB5B,KAAKP,GAAIO,MACt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0,repeat:i=1,alternate:a=!1,reverse:r=!1,easing:n="ease",composite:o="none",...l},c={}){this.duration=t,this.delay=s,this.repeat=i,this.alternate=a,this.reverse=r,this.easing=n,this.composite=o,this.keyframes=e(l,c),this.isEmpty=!this.keyframes.length}getConfig({delay:e=0,repeat:t=this.repeat,alternate:s=this.alternate,reverse:i=this.reverse,composite:a=this.composite,commit:r=!0}){return{duration:1e3*this.duration,delay:1e3*(this.delay+e),iterations:t,directions:s?i?"alternate-reverse":"alternate":i?"reverse":"normal",easing:this.easing,composite:"combine"===a?"accumulate":"replace",blendmode:a,commit:r}}static mergeInitialStyles(e,t){const s={backfaceVisibility:"hidden",willChange:"transform"};for(const t of e)if(!t.isEmpty){const{offset:e,...i}=t.keyframes[0];Object.assign(s,i)}return Object.assign(s,t)}}export{t as default};
1
+ import{parseClipKeyframes as e}from"./utils.js";class t{constructor({duration:t=.5,delay:s=0,repeat:i=1,alternate:a=!1,reverse:r=!1,easing:n="ease",composite:o="none",...l},c={}){this.duration=t,this.delay=s,this.repeat=i,this.alternate=a,this.reverse=r,this.easing=n,this.composite=o,this.keyframes=e(l,c),this.isEmpty=!this.keyframes.length}getConfig({delay:e=0,repeat:t=this.repeat,alternate:s=this.alternate,reverse:i=this.reverse,composite:a=this.composite,commit:r=!0}){return{duration:1e3*this.duration,delay:1e3*(this.delay+e),iterations:t,directions:s?i?"alternate-reverse":"alternate":i?"reverse":"normal",easing:this.easing,composite:"combine"===a?"accumulate":"replace",blendmode:a,commit:r}}static mergeInitialStyles(e,t,s=!1){const i={backfaceVisibility:"hidden",willChange:"transform"};for(const t of e){const e=s!==t.reverse?t.keyframes.length-1:0,{offset:a,...r}=t.keyframes[e];Object.assign(i,r)}return Object.assign(i,t)}}export{t as default};
2
2
  //# sourceMappingURL=clip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"clip.js","sources":["../../src/core/clip.ts"],"sourcesContent":[null],"names":["Clip","constructor","duration","delay","repeat","alternate","reverse","easing","composite","keyframes","initial","this","parseClipKeyframes","isEmpty","length","getConfig","commit","iterations","directions","blendmode","mergeInitialStyles","clips","styles","merged","backfaceVisibility","willChange","clip","offset","Object","assign"],"mappings":"gDAoCc,MAAOA,EAYjB,WAAAC,EAAYC,SACRA,EAAW,GAAEC,MACbA,EAAQ,EAACC,OACTA,EAAS,EAACC,UACVA,GAAY,EAAKC,QACjBA,GAAU,EAAKC,OACfA,EAAS,OAAMC,UACfA,EAAY,UACTC,GACSC,EAAwB,IACpCC,KAAKT,SAAWA,EAChBS,KAAKR,MAAQA,EACbQ,KAAKP,OAASA,EACdO,KAAKN,UAAYA,EACjBM,KAAKL,QAAUA,EACfK,KAAKJ,OAASA,EACdI,KAAKH,UAAYA,EAEjBG,KAAKF,UAAYG,EAAmBH,EAAWC,GAC/CC,KAAKE,SAAWF,KAAKF,UAAUK,MACnC,CAEA,SAAAC,EAAUZ,MACNA,EAAQ,EAACC,OACTA,EAASO,KAAKP,OAAMC,UACpBA,EAAYM,KAAKN,UAASC,QAC1BA,EAAUK,KAAKL,QAAOE,UACtBA,EAAYG,KAAKH,UAASQ,OAC1BA,GAAS,IAGT,MAAO,CACHd,SAA0B,IAAhBS,KAAKT,SACfC,MAA8B,KAAtBQ,KAAKR,MAAQA,GACrBc,WAAYb,EACZc,WAAYb,EACPC,EAAU,oBAA+B,YACzCA,EAAU,UAAqB,SACpCC,OAAQI,KAAKJ,OACbC,UAAyB,YAAdA,EAA0B,aAAwB,UAC7DW,UAAWX,EACXQ,SAER,CAEA,yBAAOI,CAAmBC,EAAeC,GACrC,MAAMC,EAAS,CACXC,mBAAoB,SACpBC,WAAY,aAGhB,IAAK,MAAMC,KAAQL,EACf,IAAKK,EAAKb,QAAS,CACf,MAAMc,OAAEA,KAAWL,GAAWI,EAAKjB,UAAU,GAC7CmB,OAAOC,OAAON,EAAQD,EAC1B,CAGJ,OAAOM,OAAOC,OAAON,EAAQD,EACjC"}
1
+ {"version":3,"file":"clip.js","sources":["../../src/core/clip.ts"],"sourcesContent":[null],"names":["Clip","constructor","duration","delay","repeat","alternate","reverse","easing","composite","keyframes","initial","this","parseClipKeyframes","isEmpty","length","getConfig","commit","iterations","directions","blendmode","mergeInitialStyles","clips","styles","mounted","merged","backfaceVisibility","willChange","clip","index","offset","Object","assign"],"mappings":"gDAoCc,MAAOA,EAYjB,WAAAC,EAAYC,SACRA,EAAW,GAAEC,MACbA,EAAQ,EAACC,OACTA,EAAS,EAACC,UACVA,GAAY,EAAKC,QACjBA,GAAU,EAAKC,OACfA,EAAS,OAAMC,UACfA,EAAY,UACTC,GACSC,EAAwB,IACpCC,KAAKT,SAAWA,EAChBS,KAAKR,MAAQA,EACbQ,KAAKP,OAASA,EACdO,KAAKN,UAAYA,EACjBM,KAAKL,QAAUA,EACfK,KAAKJ,OAASA,EACdI,KAAKH,UAAYA,EAEjBG,KAAKF,UAAYG,EAAmBH,EAAWC,GAC/CC,KAAKE,SAAWF,KAAKF,UAAUK,MACnC,CAEA,SAAAC,EAAUZ,MACNA,EAAQ,EAACC,OACTA,EAASO,KAAKP,OAAMC,UACpBA,EAAYM,KAAKN,UAASC,QAC1BA,EAAUK,KAAKL,QAAOE,UACtBA,EAAYG,KAAKH,UAASQ,OAC1BA,GAAS,IAGT,MAAO,CACHd,SAA0B,IAAhBS,KAAKT,SACfC,MAA8B,KAAtBQ,KAAKR,MAAQA,GACrBc,WAAYb,EACZc,WAAYb,EACPC,EAAU,oBAA+B,YACzCA,EAAU,UAAqB,SACpCC,OAAQI,KAAKJ,OACbC,UAAyB,YAAdA,EAA0B,aAAwB,UAC7DW,UAAWX,EACXQ,SAER,CAEA,yBAAOI,CAAmBC,EAAeC,EAAsBC,GAAU,GACrE,MAAMC,EAAS,CACXC,mBAAoB,SACpBC,WAAY,aAGhB,IAAK,MAAMC,KAAQN,EAAO,CACtB,MAAMO,EAAQL,IAAYI,EAAKrB,QAAUqB,EAAKlB,UAAUK,OAAS,EAAI,GAC/De,OAAEA,KAAWP,GAAWK,EAAKlB,UAAUmB,GAC7CE,OAAOC,OAAOP,EAAQF,EAC1B,CAEA,OAAOQ,OAAOC,OAAOP,EAAQF,EACjC"}
@@ -1,2 +1,2 @@
1
- const t=new Map,n=new Map,e=new Map;function o(n,e){let o=t.get(n)||null;for(let t=0;t<e;t++){if(!o)return null;o=o.parent}return o}function u(n){return t.has(n)}function i(n,e){t.set(n,e)}function r(n){t.delete(n)}function c(t,e){const o=n.get(t)||{animators:new Set,skipInitialMount:e};return n.set(t,o),o}function s(t){n.delete(t)}function f(t,e){const o=n.get(t);return!!o&&(o.animators.add(e),o.skipInitialMount)}function a(t,e){const o=n.get(t);o&&o.animators.delete(e)}function l(n,e){n.forEach((n=>{const o=t.get(n);o&&e(o)}))}function d(t,n){const o=e.get(t)||new Set;o.add(n),e.set(t,o)}function g(t,n){const o=e.get(t);if(!o)return null;for(const t of o)if(t&&t.id!==n&&"unmounted"===t.state)return t;return null}function p(t,n,o=0){const u=e.get(t);return u&&o?setTimeout((()=>u.delete(n))):(u&&u.delete(n),0)}export{p as deleteMorphTarget,l as forEachAnimator,g as getMorphTarget,o as getParentAnimator,u as isRegistered,i as registerAnimator,d as registerAsMorph,c as registerLayoutGroup,f as registerToLayoutGroup,r as unregisterAnimator,a as unregisterFromLayoutGroup,s as unregisterLayoutGroup};
1
+ const t=new Map,n=new Map,e=new Map;function o(n,e){let o=t.get(n)||null;for(let t=0;t<e;t++){if(!o)return null;o=o.parent}return o}function u(n,e){t.set(n,e)}function i(n){t.delete(n)}function r(t,e){const o=n.get(t)||{animators:new Set,skipInitialMount:e};return n.set(t,o),o}function c(t){n.delete(t)}function s(t,e){const o=n.get(t);return!!o&&(o.animators.add(e),o.skipInitialMount)}function f(t,e){const o=n.get(t);o&&o.animators.delete(e)}function a(n,e){n.forEach((n=>{const o=t.get(n);o&&e(o)}))}function l(t,n){const o=e.get(t)||new Set;o.add(n),e.set(t,o)}function d(n,o){const u=e.get(n);if(!u)return null;for(const n of u){const e=t.get(n);if(e&&e.id!==o&&"unmounted"===e.state)return e}return null}function g(t,n){const o=e.get(t);return o&&o.delete(n),0}export{g as deleteMorphTarget,a as forEachAnimator,d as getMorphTarget,o as getParentAnimator,u as registerAnimator,l as registerAsMorph,r as registerLayoutGroup,s as registerToLayoutGroup,i as unregisterAnimator,f as unregisterFromLayoutGroup,c as unregisterLayoutGroup};
2
2
  //# sourceMappingURL=state.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"state.js","sources":["../../src/core/state.ts"],"sourcesContent":[null],"names":["registeredAnimators","Map","registeredLayoutGroups","morphGroups","getParentAnimator","id","stepsRemoved","parent","get","i","isRegistered","has","registerAnimator","animator","set","unregisterAnimator","delete","registerLayoutGroup","skipInitialMount","data","animators","Set","unregisterLayoutGroup","registerToLayoutGroup","layoutId","layoutGroup","add","unregisterFromLayoutGroup","forEachAnimator","ids","callback","forEach","registerAsMorph","morphId","group","getMorphTarget","receiverId","targets","state","deleteMorphTarget","delay","setTimeout"],"mappings":"AAEA,MAAMA,EAAsB,IAAIC,IAE1BC,EAAyB,IAAID,IAK7BE,EAAc,IAAIF,IAElB,SAAUG,EAAkBC,EAAYC,GAC1C,IAAIC,EAASP,EAAoBQ,IAAIH,IAAO,KAE5C,IAAK,IAAII,EAAI,EAAGA,EAAIH,EAAcG,IAAK,CACnC,IAAKF,EAAQ,OAAO,KAEpBA,EAASA,EAAOA,MACpB,CAEA,OAAOA,CACX,CAEM,SAAUG,EAAaL,GACzB,OAAOL,EAAoBW,IAAIN,EACnC,CAEM,SAAUO,EAAiBP,EAAYQ,GACzCb,EAAoBc,IAAIT,EAAIQ,EAChC,CAEM,SAAUE,EAAmBV,GAC/BL,EAAoBgB,OAAOX,EAC/B,CAEM,SAAUY,EAAoBZ,EAAYa,GAC5C,MAAMC,EAAOjB,EAAuBM,IAAIH,IAAO,CAC3Ce,UAAW,IAAIC,IACfH,oBAKJ,OAFAhB,EAAuBY,IAAIT,EAAIc,GAExBA,CACX,CAGM,SAAUG,EAAsBjB,GAClCH,EAAuBc,OAAOX,EAClC,CAEM,SAAUkB,EAAsBC,EAAkBnB,GACpD,MAAMoB,EAAcvB,EAAuBM,IAAIgB,GAE/C,QAAIC,IACAA,EAAYL,UAAUM,IAAIrB,GACnBoB,EAAYP,iBAI3B,CAEM,SAAUS,EAA0BH,EAAkBnB,GACxD,MAAMoB,EAAcvB,EAAuBM,IAAIgB,GAE3CC,GAAaA,EAAYL,UAAUJ,OAAOX,EAClD,CAEM,SAAUuB,EAAgBC,EAAkBC,GAC9CD,EAAIE,SAAQ1B,IACR,MAAMQ,EAAWb,EAAoBQ,IAAIH,GACrCQ,GAAUiB,EAASjB,EAAS,GAExC,CAEM,SAAUmB,EAAgBC,EAAiBpB,GAC7C,MAAMqB,EAAQ/B,EAAYK,IAAIyB,IAAY,IAAIZ,IAC9Ca,EAAMR,IAAIb,GAEVV,EAAYW,IAAImB,EAASC,EAC7B,CAEM,SAAUC,EAAeF,EAAiBG,GAC5C,MAAMC,EAAUlC,EAAYK,IAAIyB,GAChC,IAAKI,EAAS,OAAO,KAErB,IAAK,MAAMxB,KAAYwB,EACnB,GAAIxB,GAAYA,EAASR,KAAO+B,GAAiC,cAAnBvB,EAASyB,MAAuB,OAAOzB,EAGzF,OAAO,IACX,CAEM,SAAU0B,EAAkBN,EAAiBpB,EAAyB2B,EAAQ,GAChF,MAAMN,EAAQ/B,EAAYK,IAAIyB,GAC9B,OAAIC,GAASM,EAAcC,YAAW,IAAMP,EAAMlB,OAAOH,MACrDqB,GAAOA,EAAMlB,OAAOH,GAEjB,EACX"}
1
+ {"version":3,"file":"state.js","sources":["../../src/core/state.ts"],"sourcesContent":[null],"names":["registeredAnimators","Map","registeredLayoutGroups","morphGroups","getParentAnimator","id","stepsRemoved","parent","get","i","registerAnimator","animator","set","unregisterAnimator","delete","registerLayoutGroup","skipInitialMount","data","animators","Set","unregisterLayoutGroup","registerToLayoutGroup","layoutId","layoutGroup","add","unregisterFromLayoutGroup","forEachAnimator","ids","callback","forEach","registerAsMorph","morphId","group","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KI,EAAS,OAAO,KAErB,IAAK,MAAM9B,KAAM8B,EAAS,CACtB,MAAMxB,EAAWX,EAAoBQ,IAAIH,GACzC,GAAIM,GAAYA,EAASN,KAAO6B,GAAiC,cAAnBvB,EAASyB,MAAuB,OAAOzB,CACzF,CAEA,OAAO,IACX,CAEM,SAAU0B,EAAkBN,EAAiB1B,GAC/C,MAAM2B,EAAQ7B,EAAYK,IAAIuB,GAG9B,OAFIC,GAAOA,EAAMlB,OAAOT,GAEjB,CACX"}
@@ -1,2 +1,2 @@
1
- import t from"./clip.js";import{clampLowerBound as e,scaleCorrectShadow as s,scaleCorrectRadius as i}from"./utils.js";class n{constructor(t,e){this.scale=[1,1],this.correctionAnimation=null,this.queue=[],this.animations=[],this.active=0,this.element=t,this.shouldCache=e,this.styles=getComputedStyle(t),this.cache=this.snapshot(),this.corrected={borderRadius:this.styles.borderRadius,boxShadow:this.styles.boxShadow}}snapshot(){const t={x:0,y:0,sx:1,sy:1};if(this.element instanceof SVGElement)return t;for(const e of this.shouldCache)t[e]=this.styles[e];const{width:e,height:s,x:i,y:n}=this.element.getBoundingClientRect();t.sx=e,t.sy=s,t.x=i+e/2,t.y=n+s/2;let a=this.element;for(;a=a?.parentElement;)if(a.dataset.lively){const{x:e,y:s}=a.getBoundingClientRect();t.x-=e,t.y-=s;break}return t}push(t,e={},s){const{commit:i,blendmode:n,...a}=t.getConfig(e),o=this.element.animate(t.keyframes,a);return o.name=e.tag,o.blendmode=n,o.onfinish=()=>{try{i&&o.commitStyles()}catch{}finally{o.cancel(),this.advance(),s?.()}},this.active&&"none"===n?(o.pause(),this.queue.push(o),0):(this.animations.push(o),"none"===n&&this.active++,(a.duration*a.iterations+a.delay)/1e3)}advance(){--this.active>0||(this.animations=this.animations.filter((t=>"running"===t.playState)),this.animations.push(...this.queue.splice(0,1)),this.active=this.animations.filter((t=>"none"===t.blendmode)).length,this.animations.length||this.correct())}transition(s=this.cache,i={}){const n=this.snapshot(),a=i,o=[1,1],h=[0,0];for(const t of this.shouldCache)switch(t){case"x":case"y":h["x"===t?0:1]=s[t]-n[t];break;case"sx":case"sy":o["sx"===t?0:1]=s[t]/e(n[t]);break;case"borderRadius":case"boxShadow":a[t]=[s[t],n[t]];break;default:a[t]=[s[t],null]}a.scale=[o.join(" "),null],a.translate=[h.map((t=>`${t}px`)).join(" "),null];const l=new t(a);l.isEmpty||(this.cache=n,this.push(l,{commit:!1,composite:"override"}))}clear(t){this.active&&(this.animations.forEach((e=>{if(!t||e.name===t){e.onfinish=null;try{e.finish()}catch{e.cancel()}}})),this.animations=this.animations.filter((t=>"running"===t.playState)),this.active=this.animations.filter((t=>"none"===t.blendmode)).length)}toggle(t){this.animations.forEach((e=>e[t?"pause":"play"]()))}correct(){for(let t=0;t<this.element.children.length;t++){const e=this.element.children[t],s=e.offsetLeft,i=e.offsetTop,n=e.offsetWidth,a=e.offsetHeight,[o,h]=this.scale,[l,c]=getComputedStyle(e).translate.split(" ").map(parseFloat);e.style.transform=`translate(${-l||0}px, ${-c||0}px) scale(${1/o}, ${1/h}) translate(${s*(1-o)+n/2*(1-o)+(l||0)}px, ${i*(1-h)+a/2*(1-h)+(c||0)}px)`}if(this.element instanceof SVGElement||"0px"===this.styles.borderRadius&&"none"===this.styles.boxShadow)return;this.correctionAnimation?.cancel();const t=this.styles.borderRadius!==this.corrected.borderRadius?[1,1]:this.scale,n=this.styles.boxShadow!==this.corrected.boxShadow?[1,1]:this.scale,{width:a,height:o}=this.element.getBoundingClientRect();this.scale=[a/e(this.element.offsetWidth),o/e(this.element.offsetHeight)],this.corrected={borderRadius:i(this.styles.borderRadius,this.scale,t),boxShadow:s(this.styles.boxShadow,this.scale,n)},this.correctionAnimation=this.element.animate(this.corrected,{duration:0,fill:"forwards"})}}export{n as default};
1
+ import t from"./clip.js";import{clampLowerBound as e,correctForParentScale as s,scaleCorrectShadow as i,scaleCorrectRadius as n}from"./utils.js";class a{constructor(t,e,s){this.scale=[1,1],this.correctionAnimation=null,this.queue=[],this.animations=[],this.active=0,this.timeout=0,this.correctAfterEnded=!1,this.element=t,this.shouldCache=e,this.align=s,this.styles=getComputedStyle(t),this.cache=this.snapshot(),this.corrected={borderRadius:this.styles.borderRadius,boxShadow:this.styles.boxShadow}}snapshot(){const t={x:0,y:0,sx:1,sy:1};if(this.element instanceof SVGElement)return t;for(const e of this.shouldCache)t[e]=this.styles[e];const{width:e,height:s,x:i,y:n}=this.element.getBoundingClientRect();t.sx=e,t.sy=s,t.x=i+e/2,t.y=n+s/2;let a=this.element;for(;a=a?.parentElement;)if(a.dataset.lively){const{x:e,y:s}=a.getBoundingClientRect();t.x-=e,t.y-=s;break}return t}push(t,e={},s){const{commit:i,blendmode:n,...a}=t.getConfig(e),o=this.element.animate(t.keyframes,a);return o.name=e.tag,o.blendmode=n,o.onfinish=()=>{try{i&&o.commitStyles()}catch{}finally{o.cancel(),this.advance(),s?.()}},this.active&&"none"===n?(o.pause(),this.queue.push(o),0):(this.animations.push(o),"none"===n&&this.active++,(a.duration*a.iterations+a.delay)/1e3)}advance(){clearTimeout(this.timeout),this.timeout=setTimeout((()=>this.cache=this.snapshot()),1/120),--this.active>0||(this.animations=this.animations.filter((t=>"running"===t.playState)),this.animations.push(...this.queue.splice(0,1)),this.active=this.animations.filter((t=>"none"===t.blendmode)).length,this.correctAfterEnded=!0)}transition(s=this.cache,i={}){const n=this.snapshot(),a={...i,composite:"override"},o=[1,1],h=[0,0];for(const t of this.shouldCache)switch(t){case"x":case"y":h["x"===t?0:1]=s[t]-n[t];break;case"sx":case"sy":o["sx"===t?0:1]=s[t]/e(n[t]);break;case"borderRadius":case"boxShadow":a[t]=[s[t],n[t]];break;default:a[t]=[s[t],null]}[new t(a),new t({...i,scale:[o.join(" "),null],translate:[h.map((t=>`${t}px`)).join(" "),null],composite:"combine"})].filter((t=>!t.isEmpty)).forEach((t=>this.push(t,{commit:!1}))),this.cache=n}clear(t){this.active&&(this.animations.forEach((e=>{if(!t||e.name===t){e.onfinish=null;try{e.finish()}catch{e.cancel()}}})),this.animations=this.animations.filter((t=>"running"===t.playState)),this.active=this.animations.filter((t=>"none"===t.blendmode)).length)}toggle(t){this.animations.forEach((e=>e[t?"pause":"play"]()))}correct(){if(this.element instanceof SVGElement)return;const t=(/none|0px/.test(this.styles.translate)?"0 0":this.styles.translate).split(" ").map(parseFloat);if(s(this.element,t,this.align),!this.animations.length&&!this.correctAfterEnded)return;this.correctAfterEnded=!1,this.correctionAnimation?.cancel();const a=this.styles.borderRadius!==this.corrected.borderRadius?[1,1]:this.scale,o=this.styles.boxShadow!==this.corrected.boxShadow?[1,1]:this.scale,{width:h,height:c}=this.element.getBoundingClientRect();this.scale=[e(h/this.element.offsetWidth),e(c/this.element.offsetHeight)],this.corrected={borderRadius:n(this.styles.borderRadius,this.scale,a),boxShadow:i(this.styles.boxShadow,this.scale,o)},this.corrected.borderRadius===this.styles.borderRadius&&this.corrected.boxShadow===this.styles.boxShadow||(this.correctionAnimation=this.element.animate(this.corrected,{duration:0,fill:"forwards"}))}}export{a as default};
2
2
  //# sourceMappingURL=track.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"track.js","sources":["../../src/core/track.ts"],"sourcesContent":[null],"names":["Track","constructor","element","shouldCache","this","scale","correctionAnimation","queue","animations","active","styles","getComputedStyle","cache","snapshot","corrected","borderRadius","boxShadow","data","x","y","sx","sy","SVGElement","key","width","height","getBoundingClientRect","parent","parentElement","dataset","lively","push","clip","options","onEnded","commit","blendmode","config","getConfig","animation","animate","keyframes","name","tag","onfinish","commitStyles","cancel","advance","pause","duration","iterations","delay","filter","playState","splice","length","correct","transition","from","translate","clampLowerBound","join","map","num","Clip","isEmpty","composite","clear","forEach","entry","finish","toggle","paused","i","children","child","l","offsetLeft","t","offsetTop","w","offsetWidth","h","offsetHeight","tx","ty","split","parseFloat","style","transform","previousRadiusScale","previousShadowScale","scaleCorrectRadius","scaleCorrectShadow","fill"],"mappings":"sHAqBc,MAAOA,EAgBjB,WAAAC,CAAYC,EAAmCC,GAV/C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AKM,OAAOK,eAAiBX,KAAKU,UAAUC,aAAe,CAAC,EAAG,GAAKX,KAAKC,MAC3GsF,EAAkCvF,KAAKM,OAAOM,YAAcZ,KAAKU,UAAUE,UAAY,CAAC,EAAG,GAAKZ,KAAKC,OAErGmB,MAAEA,EAAKC,OAAEA,GAAWrB,KAAKF,QAAQwB,wBACvCtB,KAAKC,MAAQ,CACTmB,EAAQoC,EAAgBxD,KAAKF,QAAQ+E,aACrCxD,EAASmC,EAAgBxD,KAAKF,QAAQiF,eAG1C/E,KAAKU,UAAY,CACbC,aAAc6E,EAAmBxF,KAAKM,OAAOK,aAAcX,KAAKC,MAAOqF,GACvE1E,UAAW6E,EAAmBzF,KAAKM,OAAOM,UAAWZ,KAAKC,MAAOsF,IAErEvF,KAAKE,oBAAsBF,KAAKF,QAAQsC,QAAQpC,KAAKU,UAAW,CAC5DmC,SAAU,EACV6C,KAAM,YAEd"}
1
+ {"version":3,"file":"track.js","sources":["../../src/core/track.ts"],"sourcesContent":[null],"names":["Track","constructor","element","shouldCache","align","this","scale","correctionAnimation","queue","animations","active","timeout","correctAfterEnded","styles","getComputedStyle","cache","snapshot","corrected","borderRadius","boxShadow","data","x","y","sx","sy","SVGElement","key","width","height","getBoundingClientRect","parent","parentElement","dataset","lively","push","clip","options","onEnded","commit","blendmode","config","getConfig","animation","animate","keyframes","name","tag","onfinish","commitStyles","cancel","advance","pause","duration","iterations","delay","clearTimeout","setTimeout","filter","playState","splice","length","transition","from","composite","translate","clampLowerBound","Clip","join","map","num","isEmpty","forEach","clear","entry","finish","toggle","paused","correct","offset","test","split","parseFloat","correctForParentScale","previousRadiusScale","previousShadowScale","offsetWidth","offsetHeight","scaleCorrectRadius","scaleCorrectShadow","fill"],"mappings":"iJA0Bc,MAAOA,EAmBjB,WAAAC,CAAYC,EAAmCC,EAAyBC,GAZxEC,KAAAC,MAAoB,CAAC,EAAG,GAKxBD,KAAAE,oBAAwC,KACxCF,KAAAG,MAA0B,GAC1BH,KAAAI,W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ACT2D,EAAgBtC,EAAQtB,KAAKH,QAAQmF,aACrCpB,EAAgBrC,EAASvB,KAAKH,QAAQoF,eAG1CjF,KAAKY,UAAY,CACbC,aAAcqE,EAAmBlF,KAAKQ,OAAOK,aAAcb,KAAKC,MAAO6E,GACvEhE,UAAWqE,EAAmBnF,KAAKQ,OAAOM,UAAWd,KAAKC,MAAO8E,IAGjE/E,KAAKY,UAAUC,eAAiBb,KAAKQ,OAAOK,cAC5Cb,KAAKY,UAAUE,YAAcd,KAAKQ,OAAOM,YAAWd,KAAKE,oBAAsBF,KAAKH,QAAQyC,QAAQtC,KAAKY,UAAW,CAChHmC,SAAU,EACVqC,KAAM,aAElB"}
@@ -1,2 +1,2 @@
1
- import{isValidElement as t}from"react";import n from"./clip.js";import o from"./animation-link.js";const e=1e-4,r=(t,n=8)=>Math.sign(t)*Math.max(Math.abs(t),1/Math.pow(10,n)),s=t=>Array.isArray(t)?t:[t];function i(...t){return n=>{t.forEach((t=>{t&&"current"in t&&(t.current=n),t instanceof Function&&t(n)}))}}function f(...t){const n={};for(const o of t)Object.assign(n,o);return"strokeLength"in n&&(n.strokeDashoffset=2-n.strokeLength,delete n.strokeLength),"strokeDashoffset"in n&&(n.strokeDasharray=2),n}function c(t,n){for(const o in t){const e=t[o];if("object"!=typeof e)continue;const{on:r,...s}="on"in e?e:{on:e};n(o,r,s)}}function a(t){const n={};return c(t,((t,o)=>{n[t]=o})),n}function u(t,n){return t.forEach(((t,o)=>{if(t!==n[o]&&!1!==n[o])return!0})),!1}function l(t){const n={};return c(t,((t,o)=>{["mount","unmount"].forEach((e=>{o.includes(e)&&(e in n||(n[e]=[]),n[e].push(t))}))})),n}function h(t){let n,o=[],r=0;for(let s=0;s<t.length;s++){const i=t[s],f=Math.round(s/(t.length-1)/e)*e;if(null===i)continue;const c="object"!=typeof i?{offset:f,to:i}:i;"offset"in c||(c.offset=f),o.push(c);const a=c.to||c.after;n===a&&r++,n=a}return r===o.length?null:o}function p(t,n,o,e){t.has(n)||t.set(n,{offset:n});const r=t.get(n);if("strokeLength"===o)return r.strokeDashoffset=2-e;r[o]=e}function g(t,n){const r=new Map;for(const s in t){const i=t[s];if(i instanceof o)continue;const f=Array.isArray(i)?i:[i];f.length<2&&f.unshift(n[s]??null);const c=h(f);if(c)for(let{to:t,after:n,offset:o}of c)void 0!==n&&(1===o&&(o-=e),p(r,o+e,s,n)),void 0!==t&&p(r,o,s,t)}return Array.from(r.values()).sort(((t,n)=>t.offset-n.offset))}function m(t,n,o){const e=t.split(/\s*\/\s*/);return e.length<2&&(e[1]=e[0]),e.map(((t,e)=>t.split(" ").map((t=>parseFloat(t)*o[e]/n[e]+(t.match(/[^\d\.]+$/)?.[0]||"px"))).join(" "))).join("/")}function y(t,n,o){const[e,r,s]=t.split(/(?<=px),\s?/)[0].split(/(?<=\))\s|\s(?=inset)/);if(!r)return"";const[i,f,c,a]=r.split(" ").map(parseFloat),u=Math.max(...o)/Math.max(...n),l=new Array(3).fill([i*o[0]/n[0],f*o[1]/n[1],c*u,a*u]);return n[0]<n[1]?(l[1][0]-=1/n[0],l[2][0]+=1/n[0]):(l[1][1]-=1/n[1],l[2][1]+=1/n[1]),l.map((t=>`${e} ${t.map((t=>`${t}px`)).join(" ")}${s?" inset":""}`)).join(", ")}function d(n,o,e="_la"){const r=Array.isArray(n)?n:[n];for(let n=0;n<r.length;n++){if(!t(r[n]))continue;const{props:s,key:i}=r[n],f=e+(null!==i?`${i}_`:n);"object"==typeof s.triggers&&(s.triggers._livelyId=f,o.delete(f)),d(s.children,o,f)}return o}const j={duration:0,delay:1,repeat:2,alternate:3,reverse:4,easing:5,composite:6};function k(t,e){const r={},s=[];if(!(t instanceof n))for(const n in t){let i=t[n];"object"==typeof i||n in j||(i=new o(i)),i instanceof o&&(s.push(i.on("change",(()=>e(n,i)))),r[n]=i)}return[r,()=>s.forEach((t=>t()))]}function A(t,n){const o={};for(const e in t)o[e]=t[e].get(n);return o}export{j as ClipConfigKeys,p as addKeyframeEntry,s as asArray,r as clampLowerBound,k as extractAnimationLinks,d as filterRemovedAnimators,c as forEachTrigger,A as getInitialStyleFromLinks,l as getLifeCycleAnimations,e as keyframeEpsilon,i as mergeRefs,f as mergeStyles,g as parseClipKeyframes,m as scaleCorrectRadius,y as scaleCorrectShadow,a as serializeTriggers,u as shouldTrigger,h as transformKeyframeList};
1
+ import{isValidElement as t}from"react";import n from"./clip.js";import e from"./animation-link.js";import{getParentAnimator as o}from"./state.js";const r=1e-4;function s(t,n=8){const e=1/Math.pow(10,n);return isNaN(t)?e:(t<0?-1:1)*Math.max(Math.abs(t),e)}const i=t=>Array.isArray(t)?t:[t];function f(...t){return n=>{t.forEach((t=>{t&&"current"in t&&(t.current=n),t instanceof Function&&t(n)}))}}function c(...t){const n={};for(const e of t)Object.assign(n,e);return"strokeLength"in n&&(n.strokeDashoffset=2-n.strokeLength,delete n.strokeLength),"strokeDashoffset"in n&&(n.strokeDasharray=2),n}function a(t,n){for(const e in t){const o=t[e];if("object"!=typeof o)continue;const{on:r,...s}="on"in o?o:{on:o};n(e,r,s)}}function u(t){const n={};return a(t,((t,e)=>{n[t]=e})),n}function l(t,n){return t.forEach(((t,e)=>{if(t!==n[e]&&!1!==n[e])return!0})),!1}function h(t){const n={};return a(t,((t,e)=>{["mount","unmount"].forEach((o=>{e.includes(o)&&(o in n||(n[o]=[]),n[o].push(t))}))})),n}function p(t){let n,e=[],o=0;for(let s=0;s<t.length;s++){const i=t[s],f=Math.round(s/(t.length-1)/r)*r;if(null===i)continue;const c="object"!=typeof i?{offset:f,to:i}:i;"offset"in c||(c.offset=f),e.push(c);const a=c.to||c.after;n===a&&o++,n=a}return o===e.length?null:e}function g(t,n,e,o){t.has(n)||t.set(n,{offset:n});const r=t.get(n);if("strokeLength"===e)return r.strokeDashoffset=2-o;r[e]=o}function m(t,n){const o=new Map;for(const s in t){const i=t[s];if(i instanceof e)continue;const f=Array.isArray(i)?i:[i];f.length<2&&f.unshift(n[s]??null);const c=p(f);if(c)for(let{to:t,after:n,offset:e}of c)void 0!==n&&(1===e&&(e-=r),g(o,e+r,s,n)),void 0!==t&&g(o,e,s,t)}return Array.from(o.values()).sort(((t,n)=>t.offset-n.offset))}function y(t,n,e){if(/^\s*$|0px/.test(t))return t;const o=t.split(/\s*\/\s*/);return o.length<2&&(o[1]=o[0]),o.map(((t,o)=>t.split(" ").map((t=>parseFloat(t)*e[o]/n[o]+(t.match(/[^\d\.]+$/)?.[0]||"px"))).join(" "))).join("/")}function d(t,n,e){if(/^\s*$|none/.test(t))return t;const[o,r,s]=t.split(/(?<=px),\s?/)[0].split(/(?<=\))\s|\s(?=inset)/);if(!r)return"";const[i,f,c,a]=r.split(" ").map(parseFloat),u=Math.max(...e)/Math.max(...n),l=new Array(3).fill([i*e[0]/n[0],f*e[1]/n[1],c*u,a*u]);return n[0]<n[1]?(l[1][0]-=1/n[0],l[2][0]+=1/n[0]):(l[1][1]-=1/n[1],l[2][1]+=1/n[1]),l.map((t=>`${o} ${t.map((t=>`${t}px`)).join(" ")}${s?" inset":""}`)).join(", ")}function $(t,n,e){let r,i=t;for(;i=i?.parentElement;)if(i.dataset.lively){r=o(i.dataset.lively,0);break}if(!i||!r||!r.trackList.some((t=>t.animations.length||t.correctAfterEnded)))return;const{width:f,height:c}=i.getBoundingClientRect(),a=s(i.offsetWidth/f),u=s(i.offsetHeight/c),l="center"===e.x?0:(t.offsetWidth-t.offsetWidth*a)/2*("right"===e.x?1:-1),h="center"===e.y?0:(t.offsetHeight-t.offsetHeight*u)/2*("bottom"===e.y?1:-1);t.style.transform=`translate(${l-2*n[0]}px, ${h-2*n[1]}px) scale(${a}, ${u}) translate(${n[0]/a}px, ${n[1]/u}px)`}function x(n,e,o="_la"){const r=Array.isArray(n)?n:[n];for(let n=0;n<r.length;n++){if(!t(r[n]))continue;const{props:s,key:i}=r[n],f=o+(null!==i?`${i}_`:n);"object"==typeof s.triggers&&(s.triggers._livelyId=f,e.delete(f)),x(s.children,e,f)}return e}function k(n,e){const o=Array.isArray(n)?n:[n],r=[];for(let n=0;n<o.length;n++){if(!t(o[n]))continue;const{key:s}=o[n],i="_la"+(null!==s?`${s}_`:n);e.has(i)&&r.push([n,o[n]])}return r}const j={duration:0,delay:1,repeat:2,alternate:3,reverse:4,easing:5,composite:6};function A(t,o){const r={},s=[];if(!(t instanceof n))for(const n in t){let i=t[n];"object"==typeof i||n in j||(i=new e(i)),i instanceof e&&(s.push(i.on("change",(()=>o(n,i)))),r[n]=i)}return[r,()=>s.forEach((t=>t()))]}function b(t,n){const e={};for(const o in t)e[o]=t[o].get(n);return e}export{j as ClipConfigKeys,g as addKeyframeEntry,i as asArray,s as clampLowerBound,$ as correctForParentScale,A as extractAnimationLinks,x as filterRemovedAnimators,a as forEachTrigger,b as getInitialStyleFromLinks,h as getLifeCycleAnimations,k as getRemovedAnimators,r as keyframeEpsilon,f as mergeRefs,c as mergeStyles,m as parseClipKeyframes,y as scaleCorrectRadius,d as scaleCorrectShadow,u as serializeTriggers,l as shouldTrigger,p as transformKeyframeList};
2
2
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../src/core/utils.ts"],"sourcesContent":[null],"names":["keyframeEpsilon","clampLowerBound","num","precision","Math","sign","max","abs","pow","asArray","value","Array","isArray","mergeRefs","refs","forEach","ref","current","Function","mergeStyles","stylesList","merged","styles","Object","assign","strokeDashoffset","strokeLength","strokeDasharray","forEachTrigger","triggers","callback","key","entry","on","options","serializeTriggers","serialized","list","shouldTrigger","previous","prev","i","getLifeCycleAnimations","animations","trigger","includes","push","transformKeyframeList","last","keyframes","equal","length","offset","round","keyframe","to","after","addKeyframeEntry","map","prop","has","set","get","parseClipKeyframes","initial","Map","AnimationLink","array","unshift","transformed","undefined","from","values","sort","a","b","scaleCorrectRadius","radius","scale","previousScale","split","axis","parseFloat","match","join","scaleCorrectShadow","shadow","color","params","inset","ofx","ofy","blr","spr","ratio","shadows","fill","val","filterRemovedAnimators","children","animatorIds","prefix","isValidElement","props","id","_livelyId","delete","ClipConfigKeys","duration","delay","repeat","alternate","reverse","easing","composite","extractAnimationLinks","animate","links","callbacks","Clip","remove","getInitialStyleFromLinks","index"],"mappings":"mGAMO,MAAMA,EAAkB,KAElBC,EAAkB,CAACC,EAAaC,EAAY,IAAMC,KAAKC,KAAKH,GAAOE,KAAKE,IAAIF,KAAKG,IAAIL,GAAM,EAAIE,KAAKI,IAAI,GAAIL,IAE5GM,EAAWC,GAA6BC,MAAMC,QAAQF,GAASA,EAAQ,CAACA,GAE/E,SAAUG,KAAaC,GACzB,OAAQJ,IACJI,EAAKC,SAAQC,IACLA,GAAO,YAAaA,IAAKA,EAAIC,QAAUP,GACvCM,aAAeE,UAAUF,EAAIN,EAAM,GACzC,CAEV,CAEM,SAAUS,KAAeC,GAC3B,MAAMC,EAA8B,CAAA,EAEpC,IAAK,MAAMC,KAAUF,EAAYG,OAAOC,OAAOH,EAAQC,GAOvD,MANI,iBAAkBD,IAClBA,EAAOI,iBAAmB,EAAKJ,EAAOK,oBAC/BL,EAAOK,cAEd,qBAAsBL,IAAQA,EAAOM,gBAAkB,GAEpDN,CACX,CAEM,SAAUO,EAAiCC,EAA8BC,GAC3E,IAAK,MAAMC,KAAOF,EAAU,CACxB,MAAMG,EAAQH,EAASE,GACvB,GAAqB,iBAAVC,EAAoB,SAE/B,MAAMC,GAAEA,KAAOC,GAAY,OAAQF,EAAQA,EAAQ,CAAEC,GAAID,GAEzDF,EAASC,EAAKE,EAAIC,EACtB,CACJ,CAEM,SAAUC,EAAoCN,GAChD,MAAMO,EAEF,CAAA,EAMJ,OAJAR,EAAeC,GAAU,CAACE,EAAKM,KAC3BD,EAAWL,GAAOM,CAAI,IAGnBD,CACX,CAEM,SAAUE,EAAcC,EAAiBtB,GAK3C,OAJAsB,EAASxB,SAAQ,CAACyB,EAAMC,KACpB,GAAID,IAASvB,EAAQwB,KAAqB,IAAfxB,EAAQwB,GAAc,OAAO,CAAI,KAGzD,CACX,CAEM,SAAUC,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7B,IAAK,MAAMS,KAAOsF,EACd/F,EAAOS,GAAkBsF,EAAMtF,GAAiB+B,IAAI4D,GAGxD,OAAOpG,CACX"}
1
+ {"version":3,"file":"utils.js","sources":["../../src/core/utils.ts"],"sourcesContent":[null],"names":["keyframeEpsilon","clampLowerBound","num","precision","lowerBound","Math","pow","isNaN","max","abs","asArray","value","Array","isArray","mergeRefs","refs","forEach","ref","current","Function","mergeStyles","stylesList","merged","styles","Object","assign","strokeDashoffset","strokeLength","strokeDasharray","forEachTrigger","triggers","callback","key","entry","on","options","serializeTriggers","serialized","list","shouldTrigger","previous","prev","i","getLifeCycleAnimations","animations","trigger","includes","push","transformKeyframeList","last","keyframes","equal","length","offset","round","keyframe","to","after","addKeyframeEntry","map","prop","has","set","get","parseClipKeyframes","initial","Map","AnimationLink","array","unshift","transformed","undefined","from","values","sort","a","b","scaleCorrectRadius","radius","scale","previousScale","test","split","axis","parseFloat","match","join","scaleCorrectShadow","shadow","color","params","inset","ofx","ofy","blr","spr","ratio","shadows","fill","val","correctForParentScale","element","align","animator","parent","parentElement","dataset","lively","getParentAnimator","trackList","some","track","correctAfterEnded","width","height","getBoundingClientRect","x","offsetWidth","y","offsetHeight","dx","dy","style","transform","filterRemovedAnimators","children","toRemove","prefix","isValidElement","props","id","_livelyId","delete","getRemovedAnimators","removed","animators","ClipConfigKeys","duration","delay","repeat","alternate","reverse","easing","composite","extractAnimationLinks","animate","links","callbacks","Clip","remove","getInitialStyleFromLinks","index"],"mappings":"kJAQO,MAAMA,EAAkB,cAEfC,EAAgBC,EAAaC,EAAY,GACrD,MAAMC,EAAa,EAAIC,KAAKC,IAAI,GAAIH,GAEpC,OAAII,MAAML,GAAaE,GAEfF,EAAM,GAAI,EAAK,GAAKG,KAAKG,IAAIH,KAAKI,IAAIP,GAAME,EACxD,CAEO,MAAMM,EAAWC,GAA6BC,MAAMC,QAAQF,GAASA,EAAQ,CAACA,GAE/E,SAAUG,KAAaC,GACzB,OAAQJ,IACJI,EAAKC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AW,CAACA,GAC9CU,EAAiD,GAEvD,IAAK,IAAI7F,EAAI,EAAGA,EAAI0B,EAAMhB,OAAQV,IAAK,CACnC,IAAKsF,EAAe5D,EAAM1B,IAAK,SAE/B,MAAMV,IAAEA,GAAQoC,EAAM1B,GAChBwF,EAAK,OAAiB,OAARlG,EAAe,GAAGA,KAASU,GAE3C4F,EAAQzE,IAAIqE,IAAKK,EAAUxF,KAAK,CAACL,EAAG0B,EAAM1B,IAClD,CAEA,OAAO6F,CACX,CAEO,MAAMC,EAET,CACAC,SAAU,EACVC,MAAO,EACPC,OAAQ,EACRC,UAAW,EACXC,QAAS,EACTC,OAAQ,EACRC,UAAW,GAGT,SAAUC,EAAsBC,EAA6BlH,GAC/D,MAAMmH,EAEF,CAAA,EACEC,EAA4B,GAGlC,KAAMF,aAAmBG,GACrB,IAAK,MAAMpH,KAAOiH,EAAS,CACvB,IAAItI,EAAQsI,EAAQjH,GACC,iBAAVrB,GAAwBqB,KAAOwG,IAAiB7H,EAAQ,IAAIwD,EAAcxD,IAEjFA,aAAiBwD,IACjBgF,EAAUpG,KAAKpC,EAAMuB,GAAG,UAAU,IAAMH,EAASC,EAAgBrB,MAEjEuI,EAAMlH,GAAkBrB,EAEhC,CAGJ,MAAO,CAACuI,EAfa,IAAMC,EAAUnI,SAAQqI,GAAUA,MAgB3D,CAEM,SAAUC,EAAyBJ,EAEtCK,GACC,MAAMhI,EAAuB,CAAA,EAE7B,IAAK,MAAMS,KAAOkH,EACd3H,EAAOS,GAAkBkH,EAAMlH,GAAiB+B,IAAIwF,GAGxD,OAAOhI,CACX"}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{useRef as n,useState as r,useEffect as t}from"react";function e(){const e=n(null),[o,i]=r(!1);return t((()=>{if(!e.current)return;const n=new AbortController;return e.current.addEventListener("pointerdown",(()=>i(!0)),{signal:n.signal}),e.current.addEventListener("pointerup",(()=>i(!1)),{signal:n.signal}),()=>n.abort()}),[]),[e,o]}export{e as default};
2
+ import{useRef as n,useState as r,useEffect as t}from"react";function e(){const e=n(null),[o,i]=r(!1);return t((()=>{if(!e.current)return;const n=new AbortController;return e.current.addEventListener("pointerdown",(()=>i(!0)),{signal:n.signal}),window.addEventListener("pointerup",(()=>i(!1)),{signal:n.signal}),()=>n.abort()}),[]),[e,o]}export{e as default};
3
3
  //# sourceMappingURL=use-tap.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsx as t}from"react/jsx-runtime";import{createContext as e,useId as r,useRef as n,useState as o,useLayoutEffect as i,useEffect as a}from"react";import{filterRemovedAnimators as u}from"./core/utils.js";import{registerLayoutGroup as m,forEachAnimator as s,unregisterLayoutGroup as c}from"./core/state.js";const d=e("");function l({children:e,skipInitialMount:l=!1,mode:p="wait"}){const f="_lg"+r(),g=n(0),h=n(0),v=n(e),w=m(f,l),[x,M]=o(0),j=u(e,new Set(w.animators));if(j.size){let t=0;s(j,(e=>{"mounted"===e.state&&(t=Math.max(t,e.trigger("unmount",{cascade:"reverse",composite:"override"})),e.state="unmounting",e.dispatch("unmount"))})),h.current=Math.max(h.current,Date.now()+1e3*t)}clearTimeout(g.current);const T=h.current-Date.now();return T>0?(s(w.animators,(t=>{"unmounting"!==t.state||j.has(t.id)||(t.trigger("mount",{override:!0}),t.state="mounted")})),g.current=setTimeout((()=>{v.current=e,M((t=>t+1))}),T)):v.current=e,i((()=>{s(w.animators,(t=>{"mounted"===t.state&&t.transition()}))})),a((()=>(w.skipInitialMount=!1,()=>{c(f),clearTimeout(g.current)})),[]),t(d,{value:f,children:v.current})}export{d as LayoutGroupContext,l as default};
2
+ import{jsx as t}from"react/jsx-runtime";import{createContext as r,useId as e,useRef as n,useState as o,useLayoutEffect as i,useEffect as a}from"react";import{filterRemovedAnimators as u,getRemovedAnimators as s}from"./core/utils.js";import{registerLayoutGroup as c,forEachAnimator as m,unregisterLayoutGroup as l}from"./core/state.js";const d=r("");function f({children:r,skipInitialMount:f=!1,mode:p="wait"}){const g="_lg"+e(),h=n(0),w=n(0),v=n(r),x=c(g,f),[M,j]=o(0),y=u(r,new Set(x.animators));if(y.size){if("sync"===p){const t=Array.isArray(r)?r.slice():[r];for(const[r,e]of s(v.current,y))t.splice(r,0,e);v.current=t}let t=0;m(y,(r=>{"mounted"===r.state&&(t=Math.max(t,r.trigger("unmount",{cascade:"reverse",composite:"override"})),r.state="unmounting",r.dispatch("unmount"))})),w.current=Math.max(w.current,Date.now()+1e3*t)}clearTimeout(h.current);const T=w.current-Date.now();return T>0?(m(x.animators,(t=>{"unmounting"!==t.state||y.has(t.id)||(t.trigger("mount",{override:!0}),t.state="mounted")})),h.current=setTimeout((()=>{v.current=r,j((t=>t+1))}),T)):"wait"===p&&(v.current=r),i((()=>{m(x.animators,(t=>{"mounted"===t.state&&t.transition()}))}),[r]),a((()=>(x.skipInitialMount=!1,()=>{l(g),clearTimeout(h.current)})),[]),t(d,{value:g,children:v.current})}export{d as LayoutGroupContext,f as default};
3
3
  //# sourceMappingURL=layout-group.js.map
@@ -1,6 +1,6 @@
1
1
  import Animator, { AnimationOptions, AnimationTrigger } from "./core/animator";
2
2
  import Clip, { ClipInitials, ClipOptions } from "./core/clip";
3
- import { CacheKey } from "./core/track";
3
+ import { CacheKey, CorrectionAlignment } from "./core/track";
4
4
  import { TransitionOptions } from "./core/animation-link";
5
5
  export type AnimateTriggers<T extends string> = {
6
6
  [key in T]?: AnimationTrigger[] | ({
@@ -19,7 +19,7 @@ export type AnimateProps<T extends string> = {
19
19
  triggers?: AnimateTriggers<T | 'animate'>;
20
20
  stagger?: number;
21
21
  staggerLimit?: number;
22
- ignoreScaleDeformation?: boolean;
22
+ deformCorrection?: CorrectionAlignment | boolean;
23
23
  transition?: TransitionOptions & {
24
24
  cache?: CacheKey[];
25
25
  };
@@ -28,4 +28,4 @@ export type AnimateProps<T extends string> = {
28
28
  onAnimationEnd?: (animation?: T) => void;
29
29
  };
30
30
  export declare const AnimateContext: import("react").Context<string>;
31
- export default function Animate<T extends string>({ ref, children, inherit, initial, animate, triggers, stagger, staggerLimit, ignoreScaleDeformation, transition, morph, clips, paused, onAnimationEnd }: AnimateProps<T>): import("react/jsx-runtime").JSX.Element;
31
+ export default function Animate<T extends string>({ ref, children, inherit, initial, animate, triggers, stagger, staggerLimit, deformCorrection, transition, morph, clips, paused, onAnimationEnd }: AnimateProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import AnimationLink, { TransitionOptions } from "./animation-link";
2
2
  import Clip, { ClipConfig, ClipInitials, ClipKey, ClipOptions } from "./clip";
3
- import Track, { CacheKey } from "./track";
3
+ import Track, { CacheKey, CorrectionAlignment } from "./track";
4
4
  export type LifeCycleTrigger = 'mount' | 'unmount';
5
5
  export type AnimationTrigger = LifeCycleTrigger | boolean | number;
6
6
  export type AnimationOptions = Omit<ClipConfig, 'duration' | 'easing'> & {
@@ -14,6 +14,7 @@ export default class Animator<T extends string> {
14
14
  id: string;
15
15
  parent: Animator<any> | null;
16
16
  dependents: Set<Animator<any>>;
17
+ inherit: ('ignoreScaleDeformation' | 'defaultTransitionOptions' | 'cache' | 'align')[];
17
18
  clips: {
18
19
  [key in T]: Clip;
19
20
  };
@@ -29,16 +30,21 @@ export default class Animator<T extends string> {
29
30
  ignoreScaleDeformation: boolean;
30
31
  defaultTransitionOptions: TransitionOptions;
31
32
  cache: CacheKey[];
33
+ align: CorrectionAlignment;
32
34
  stagger: number;
33
35
  staggerLimit: number;
34
- initialStyles: ClipInitials | null;
36
+ initialStyles: {
37
+ mounted?: ClipInitials;
38
+ unmounted?: ClipInitials;
39
+ };
35
40
  eventListeners: {
36
41
  [key in AnimatorEvent]?: Set<(...args: any) => void>;
37
42
  };
38
43
  state: 'unmounted' | 'unmounting' | 'mounted';
39
44
  paused: boolean;
45
+ timeout: number;
40
46
  frame: number;
41
- constructor({ id, clips, lifeCycleAnimations, ignoreScaleDeformation, transition, stagger, staggerLimit }: {
47
+ constructor({ id, clips, lifeCycleAnimations, deformCorrection, transition, stagger, staggerLimit }: {
42
48
  id: string;
43
49
  clips: {
44
50
  [key in T]: Clip;
@@ -46,23 +52,23 @@ export default class Animator<T extends string> {
46
52
  lifeCycleAnimations: {
47
53
  [key in LifeCycleTrigger]?: T[];
48
54
  };
49
- ignoreScaleDeformation: boolean;
50
- transition: TransitionOptions & {
55
+ deformCorrection?: CorrectionAlignment | boolean;
56
+ transition?: TransitionOptions & {
51
57
  cache?: CacheKey[];
52
58
  };
53
59
  stagger: number;
54
60
  staggerLimit: number;
55
61
  });
56
- register(parentId: string, inherit: boolean | number): void;
62
+ register(parentId: string, inherit: boolean | number, morph?: string): void;
57
63
  mount(): void;
58
- dispose(): void;
64
+ dispose(morph?: string): void;
59
65
  on<K extends (...args: any) => void>(event: AnimatorEvent, callback: K): void;
60
66
  off<K extends (...args: any) => void>(event: AnimatorEvent, callback: K): void;
61
67
  dispatch(event: AnimatorEvent, ...args: any): void;
62
68
  tick(): void;
63
69
  addLinks(animate: Clip | ClipOptions): void;
64
70
  addTrack(element: any, index: number): void;
65
- mergeInitialStyles(styles: ClipInitials): ClipInitials;
71
+ mergeInitialStyles(styles: ClipInitials, mounted?: boolean): ClipInitials;
66
72
  pretime(clip: Clip, options: AnimationOptions): number;
67
73
  trigger(on: LifeCycleTrigger, options?: AnimationOptions): number;
68
74
  play(animation: T | Clip, { cascade, delay, tag, ...options }?: AnimationOptions): number;
@@ -39,11 +39,11 @@ export default class Clip {
39
39
  duration: number;
40
40
  delay: number;
41
41
  iterations: number;
42
- directions: "normal" | "alternate" | "alternate-reverse" | "reverse";
42
+ directions: "reverse" | "alternate" | "alternate-reverse" | "normal";
43
43
  easing: Easing;
44
44
  composite: "accumulate" | "replace";
45
45
  blendmode: BlendMode;
46
46
  commit: boolean;
47
47
  };
48
- static mergeInitialStyles(clips: Clip[], styles: ClipInitials): ClipInitials;
48
+ static mergeInitialStyles(clips: Clip[], styles: ClipInitials, mounted?: boolean): ClipInitials;
49
49
  }
@@ -1,6 +1,5 @@
1
1
  import Animator from "./animator";
2
2
  export declare function getParentAnimator(id: string, stepsRemoved: number): Animator<any> | null;
3
- export declare function isRegistered(id: string): boolean;
4
3
  export declare function registerAnimator(id: string, animator: Animator<any>): void;
5
4
  export declare function unregisterAnimator(id: string): void;
6
5
  export declare function registerLayoutGroup(id: string, skipInitialMount: boolean): {
@@ -11,6 +10,6 @@ export declare function unregisterLayoutGroup(id: string): void;
11
10
  export declare function registerToLayoutGroup(layoutId: string, id: string): boolean;
12
11
  export declare function unregisterFromLayoutGroup(layoutId: string, id: string): void;
13
12
  export declare function forEachAnimator(ids: Set<string>, callback: (animator: Animator<any>) => void): void;
14
- export declare function registerAsMorph(morphId: string, animator: Animator<any>): void;
13
+ export declare function registerAsMorph(morphId: string, id: string): void;
15
14
  export declare function getMorphTarget(morphId: string, receiverId: string): Animator<any> | null;
16
- export declare function deleteMorphTarget(morphId: string, animator: Animator<any>, delay?: number): number;
15
+ export declare function deleteMorphTarget(morphId: string, id: string): number;
@@ -15,9 +15,14 @@ export type TrackAnimation = Animation & {
15
15
  name?: string;
16
16
  blendmode: BlendMode;
17
17
  };
18
+ export type CorrectionAlignment = {
19
+ x: 'left' | 'center' | 'right';
20
+ y: 'top' | 'center' | 'bottom';
21
+ };
18
22
  export default class Track {
19
23
  element: HTMLElement | SVGElement;
20
24
  shouldCache: CacheKey[];
25
+ align: CorrectionAlignment;
21
26
  styles: CSSStyleDeclaration;
22
27
  cache: StyleCache;
23
28
  scale: ScaleTuple;
@@ -29,7 +34,9 @@ export default class Track {
29
34
  queue: TrackAnimation[];
30
35
  animations: TrackAnimation[];
31
36
  active: number;
32
- constructor(element: HTMLElement | SVGElement, shouldCache: CacheKey[]);
37
+ timeout: number;
38
+ correctAfterEnded: boolean;
39
+ constructor(element: HTMLElement | SVGElement, shouldCache: CacheKey[], align: CorrectionAlignment);
33
40
  snapshot(): StyleCache;
34
41
  push(clip: Clip, options?: AnimationOptions, onEnded?: () => void): number;
35
42
  advance(): void;
@@ -2,8 +2,9 @@ import { AnimationOptions, AnimationTrigger } from "./animator";
2
2
  import Clip, { ClipConfig, ClipInitials, ClipKey, ClipKeyframe, ClipKeyframes, ClipOptions } from "./clip";
3
3
  import { AnimateTriggers } from "../animate";
4
4
  import AnimationLink from "./animation-link";
5
+ import { CorrectionAlignment } from "./track";
5
6
  export declare const keyframeEpsilon = 0.0001;
6
- export declare const clampLowerBound: (num: number, precision?: number) => number;
7
+ export declare function clampLowerBound(num: number, precision?: number): number;
7
8
  export declare const asArray: (value: number | number[]) => number[];
8
9
  export declare function mergeRefs(...refs: React.Ref<any>[]): (value: any) => void;
9
10
  export declare function mergeStyles(...stylesList: (ClipInitials | undefined)[]): import("react").CSSProperties;
@@ -26,39 +27,13 @@ export declare function parseClipKeyframes(keyframes: ClipKeyframes, initial: Cl
26
27
  export type ScaleTuple = readonly [number, number];
27
28
  export declare function scaleCorrectRadius(radius: string, scale: ScaleTuple, previousScale: ScaleTuple): string;
28
29
  export declare function scaleCorrectShadow(shadow: string, scale: ScaleTuple, previousScale: ScaleTuple): string;
29
- export declare function filterRemovedAnimators(children: React.ReactNode, animatorIds: Set<string>, prefix?: string): Set<string>;
30
+ export declare function correctForParentScale(element: HTMLElement, offset: [number, number], align: CorrectionAlignment): void;
31
+ export declare function filterRemovedAnimators(children: React.ReactNode, toRemove: Set<string>, prefix?: string): Set<string>;
32
+ export declare function getRemovedAnimators(children: React.ReactNode, removed: Set<string>): [number, import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>][];
30
33
  export declare const ClipConfigKeys: {
31
34
  [key in keyof Required<ClipConfig>]: number;
32
35
  };
33
36
  export declare function extractAnimationLinks(animate: Clip | ClipOptions, callback: (key: ClipKey, link: AnimationLink<any>) => void): readonly [{
34
- strokeLength?: AnimationLink<any, any> | undefined;
35
- strokeDashoffset?: AnimationLink<any, any> | undefined;
36
- all?: AnimationLink<any, any> | undefined;
37
- contain?: AnimationLink<any, any> | undefined;
38
- color?: AnimationLink<any, any> | undefined;
39
- overlay?: AnimationLink<any, any> | undefined;
40
- left?: AnimationLink<any, any> | undefined;
41
- right?: AnimationLink<any, any> | undefined;
42
- bottom?: AnimationLink<any, any> | undefined;
43
- top?: AnimationLink<any, any> | undefined;
44
- inset?: AnimationLink<any, any> | undefined;
45
- page?: AnimationLink<any, any> | undefined;
46
- content?: AnimationLink<any, any> | undefined;
47
- flex?: AnimationLink<any, any> | undefined;
48
- grid?: AnimationLink<any, any> | undefined;
49
- position?: AnimationLink<any, any> | undefined;
50
- fill?: AnimationLink<any, any> | undefined;
51
- clip?: AnimationLink<any, any> | undefined;
52
- stroke?: AnimationLink<any, any> | undefined;
53
- x?: AnimationLink<any, any> | undefined;
54
- y?: AnimationLink<any, any> | undefined;
55
- caret?: AnimationLink<any, any> | undefined;
56
- zoom?: AnimationLink<any, any> | undefined;
57
- clear?: AnimationLink<any, any> | undefined;
58
- border?: AnimationLink<any, any> | undefined;
59
- padding?: AnimationLink<any, any> | undefined;
60
- filter?: AnimationLink<any, any> | undefined;
61
- offset?: AnimationLink<any, any> | undefined;
62
37
  accentColor?: AnimationLink<any, any> | undefined;
63
38
  alignContent?: AnimationLink<any, any> | undefined;
64
39
  alignItems?: AnimationLink<any, any> | undefined;
@@ -134,6 +109,7 @@ export declare function extractAnimationLinks(animate: Clip | ClipOptions, callb
134
109
  borderTopRightRadius?: AnimationLink<any, any> | undefined;
135
110
  borderTopStyle?: AnimationLink<any, any> | undefined;
136
111
  borderTopWidth?: AnimationLink<any, any> | undefined;
112
+ bottom?: AnimationLink<any, any> | undefined;
137
113
  boxDecorationBreak?: AnimationLink<any, any> | undefined;
138
114
  boxShadow?: AnimationLink<any, any> | undefined;
139
115
  boxSizing?: AnimationLink<any, any> | undefined;
@@ -143,8 +119,10 @@ export declare function extractAnimationLinks(animate: Clip | ClipOptions, callb
143
119
  captionSide?: AnimationLink<any, any> | undefined;
144
120
  caretColor?: AnimationLink<any, any> | undefined;
145
121
  caretShape?: AnimationLink<any, any> | undefined;
122
+ clear?: AnimationLink<any, any> | undefined;
146
123
  clipPath?: AnimationLink<any, any> | undefined;
147
124
  clipRule?: AnimationLink<any, any> | undefined;
125
+ color?: AnimationLink<any, any> | undefined;
148
126
  colorAdjust?: AnimationLink<any, any> | undefined;
149
127
  colorInterpolationFilters?: AnimationLink<any, any> | undefined;
150
128
  colorScheme?: AnimationLink<any, any> | undefined;
@@ -156,12 +134,14 @@ export declare function extractAnimationLinks(animate: Clip | ClipOptions, callb
156
134
  columnRuleWidth?: AnimationLink<any, any> | undefined;
157
135
  columnSpan?: AnimationLink<any, any> | undefined;
158
136
  columnWidth?: AnimationLink<any, any> | undefined;
137
+ contain?: AnimationLink<any, any> | undefined;
159
138
  containIntrinsicBlockSize?: AnimationLink<any, any> | undefined;
160
139
  containIntrinsicHeight?: AnimationLink<any, any> | undefined;
161
140
  containIntrinsicInlineSize?: AnimationLink<any, any> | undefined;
162
141
  containIntrinsicWidth?: AnimationLink<any, any> | undefined;
163
142
  containerName?: AnimationLink<any, any> | undefined;
164
143
  containerType?: AnimationLink<any, any> | undefined;
144
+ content?: AnimationLink<any, any> | undefined;
165
145
  contentVisibility?: AnimationLink<any, any> | undefined;
166
146
  counterIncrement?: AnimationLink<any, any> | undefined;
167
147
  counterReset?: AnimationLink<any, any> | undefined;
@@ -175,8 +155,10 @@ export declare function extractAnimationLinks(animate: Clip | ClipOptions, callb
175
155
  dominantBaseline?: AnimationLink<any, any> | undefined;
176
156
  emptyCells?: AnimationLink<any, any> | undefined;
177
157
  fieldSizing?: AnimationLink<any, any> | undefined;
158
+ fill?: AnimationLink<any, any> | undefined;
178
159
  fillOpacity?: AnimationLink<any, any> | undefined;
179
160
  fillRule?: AnimationLink<any, any> | undefined;
161
+ filter?: AnimationLink<any, any> | undefined;
180
162
  flexBasis?: AnimationLink<any, any> | undefined;
181
163
  flexDirection?: AnimationLink<any, any> | undefined;
182
164
  flexGrow?: AnimationLink<any, any> | undefined;
@@ -243,6 +225,7 @@ export declare function extractAnimationLinks(animate: Clip | ClipOptions, callb
243
225
  justifyItems?: AnimationLink<any, any> | undefined;
244
226
  justifySelf?: AnimationLink<any, any> | undefined;
245
227
  justifyTracks?: AnimationLink<any, any> | undefined;
228
+ left?: AnimationLink<any, any> | undefined;
246
229
  letterSpacing?: AnimationLink<any, any> | undefined;
247
230
  lightingColor?: AnimationLink<any, any> | undefined;
248
231
  lineBreak?: AnimationLink<any, any> | undefined;
@@ -320,6 +303,7 @@ export declare function extractAnimationLinks(animate: Clip | ClipOptions, callb
320
303
  overflowWrap?: AnimationLink<any, any> | undefined;
321
304
  overflowX?: AnimationLink<any, any> | undefined;
322
305
  overflowY?: AnimationLink<any, any> | undefined;
306
+ overlay?: AnimationLink<any, any> | undefined;
323
307
  overscrollBehaviorBlock?: AnimationLink<any, any> | undefined;
324
308
  overscrollBehaviorInline?: AnimationLink<any, any> | undefined;
325
309
  overscrollBehaviorX?: AnimationLink<any, any> | undefined;
@@ -332,10 +316,12 @@ export declare function extractAnimationLinks(animate: Clip | ClipOptions, callb
332
316
  paddingLeft?: AnimationLink<any, any> | undefined;
333
317
  paddingRight?: AnimationLink<any, any> | undefined;
334
318
  paddingTop?: AnimationLink<any, any> | undefined;
319
+ page?: AnimationLink<any, any> | undefined;
335
320
  paintOrder?: AnimationLink<any, any> | undefined;
336
321
  perspective?: AnimationLink<any, any> | undefined;
337
322
  perspectiveOrigin?: AnimationLink<any, any> | undefined;
338
323
  pointerEvents?: AnimationLink<any, any> | undefined;
324
+ position?: AnimationLink<any, any> | undefined;
339
325
  positionAnchor?: AnimationLink<any, any> | undefined;
340
326
  positionArea?: AnimationLink<any, any> | undefined;
341
327
  positionTryFallbacks?: AnimationLink<any, any> | undefined;
@@ -345,6 +331,7 @@ export declare function extractAnimationLinks(animate: Clip | ClipOptions, callb
345
331
  quotes?: AnimationLink<any, any> | undefined;
346
332
  r?: AnimationLink<any, any> | undefined;
347
333
  resize?: AnimationLink<any, any> | undefined;
334
+ right?: AnimationLink<any, any> | undefined;
348
335
  rotate?: AnimationLink<any, any> | undefined;
349
336
  rowGap?: AnimationLink<any, any> | undefined;
350
337
  rubyAlign?: AnimationLink<any, any> | undefined;
@@ -391,8 +378,10 @@ export declare function extractAnimationLinks(animate: Clip | ClipOptions, callb
391
378
  speakAs?: AnimationLink<any, any> | undefined;
392
379
  stopColor?: AnimationLink<any, any> | undefined;
393
380
  stopOpacity?: AnimationLink<any, any> | undefined;
381
+ stroke?: AnimationLink<any, any> | undefined;
394
382
  strokeColor?: AnimationLink<any, any> | undefined;
395
383
  strokeDasharray?: AnimationLink<any, any> | undefined;
384
+ strokeDashoffset?: AnimationLink<any, any> | undefined;
396
385
  strokeLinecap?: AnimationLink<any, any> | undefined;
397
386
  strokeLinejoin?: AnimationLink<any, any> | undefined;
398
387
  strokeMiterlimit?: AnimationLink<any, any> | undefined;
@@ -431,6 +420,7 @@ export declare function extractAnimationLinks(animate: Clip | ClipOptions, callb
431
420
  textWrapMode?: AnimationLink<any, any> | undefined;
432
421
  textWrapStyle?: AnimationLink<any, any> | undefined;
433
422
  timelineScope?: AnimationLink<any, any> | undefined;
423
+ top?: AnimationLink<any, any> | undefined;
434
424
  touchAction?: AnimationLink<any, any> | undefined;
435
425
  transform?: AnimationLink<any, any> | undefined;
436
426
  transformBox?: AnimationLink<any, any> | undefined;
@@ -461,11 +451,16 @@ export declare function extractAnimationLinks(animate: Clip | ClipOptions, callb
461
451
  wordSpacing?: AnimationLink<any, any> | undefined;
462
452
  wordWrap?: AnimationLink<any, any> | undefined;
463
453
  writingMode?: AnimationLink<any, any> | undefined;
454
+ x?: AnimationLink<any, any> | undefined;
455
+ y?: AnimationLink<any, any> | undefined;
464
456
  zIndex?: AnimationLink<any, any> | undefined;
457
+ zoom?: AnimationLink<any, any> | undefined;
458
+ all?: AnimationLink<any, any> | undefined;
465
459
  animation?: AnimationLink<any, any> | undefined;
466
460
  animationRange?: AnimationLink<any, any> | undefined;
467
461
  background?: AnimationLink<any, any> | undefined;
468
462
  backgroundPosition?: AnimationLink<any, any> | undefined;
463
+ border?: AnimationLink<any, any> | undefined;
469
464
  borderBlock?: AnimationLink<any, any> | undefined;
470
465
  borderBlockColor?: AnimationLink<any, any> | undefined;
471
466
  borderBlockEnd?: AnimationLink<any, any> | undefined;
@@ -487,17 +482,21 @@ export declare function extractAnimationLinks(animate: Clip | ClipOptions, callb
487
482
  borderStyle?: AnimationLink<any, any> | undefined;
488
483
  borderTop?: AnimationLink<any, any> | undefined;
489
484
  borderWidth?: AnimationLink<any, any> | undefined;
485
+ caret?: AnimationLink<any, any> | undefined;
490
486
  columnRule?: AnimationLink<any, any> | undefined;
491
487
  columns?: AnimationLink<any, any> | undefined;
492
488
  containIntrinsicSize?: AnimationLink<any, any> | undefined;
493
489
  container?: AnimationLink<any, any> | undefined;
490
+ flex?: AnimationLink<any, any> | undefined;
494
491
  flexFlow?: AnimationLink<any, any> | undefined;
495
492
  font?: AnimationLink<any, any> | undefined;
496
493
  gap?: AnimationLink<any, any> | undefined;
494
+ grid?: AnimationLink<any, any> | undefined;
497
495
  gridArea?: AnimationLink<any, any> | undefined;
498
496
  gridColumn?: AnimationLink<any, any> | undefined;
499
497
  gridRow?: AnimationLink<any, any> | undefined;
500
498
  gridTemplate?: AnimationLink<any, any> | undefined;
499
+ inset?: AnimationLink<any, any> | undefined;
501
500
  insetBlock?: AnimationLink<any, any> | undefined;
502
501
  insetInline?: AnimationLink<any, any> | undefined;
503
502
  lineClamp?: AnimationLink<any, any> | undefined;
@@ -508,9 +507,11 @@ export declare function extractAnimationLinks(animate: Clip | ClipOptions, callb
508
507
  mask?: AnimationLink<any, any> | undefined;
509
508
  maskBorder?: AnimationLink<any, any> | undefined;
510
509
  motion?: AnimationLink<any, any> | undefined;
510
+ offset?: AnimationLink<any, any> | undefined;
511
511
  outline?: AnimationLink<any, any> | undefined;
512
512
  overflow?: AnimationLink<any, any> | undefined;
513
513
  overscrollBehavior?: AnimationLink<any, any> | undefined;
514
+ padding?: AnimationLink<any, any> | undefined;
514
515
  paddingBlock?: AnimationLink<any, any> | undefined;
515
516
  paddingInline?: AnimationLink<any, any> | undefined;
516
517
  placeContent?: AnimationLink<any, any> | undefined;
@@ -788,6 +789,7 @@ export declare function extractAnimationLinks(animate: Clip | ClipOptions, callb
788
789
  boxOrdinalGroup?: AnimationLink<any, any> | undefined;
789
790
  boxOrient?: AnimationLink<any, any> | undefined;
790
791
  boxPack?: AnimationLink<any, any> | undefined;
792
+ clip?: AnimationLink<any, any> | undefined;
791
793
  fontStretch?: AnimationLink<any, any> | undefined;
792
794
  gridColumnGap?: AnimationLink<any, any> | undefined;
793
795
  gridGap?: AnimationLink<any, any> | undefined;
@@ -889,6 +891,7 @@ export declare function extractAnimationLinks(animate: Clip | ClipOptions, callb
889
891
  colorInterpolation?: AnimationLink<any, any> | undefined;
890
892
  colorRendering?: AnimationLink<any, any> | undefined;
891
893
  glyphOrientationVertical?: AnimationLink<any, any> | undefined;
894
+ strokeLength?: AnimationLink<any, any> | undefined;
892
895
  }, () => void];
893
896
  export declare function getInitialStyleFromLinks(links: {
894
897
  [key in ClipKey]?: AnimationLink<any>;
@@ -3,5 +3,5 @@ export declare const LayoutGroupContext: React.Context<string>;
3
3
  export default function LayoutGroup({ children, skipInitialMount, mode }: {
4
4
  children: React.ReactNode;
5
5
  skipInitialMount?: boolean;
6
- mode?: 'wait' | 'swap';
6
+ mode?: 'wait' | 'sync';
7
7
  }): import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infinityfx/lively",
3
- "version": "5.0.0-alpha.0",
3
+ "version": "5.0.0-alpha.2",
4
4
  "type": "module",
5
5
  "description": "Feature complete, lightweight react animation library.",
6
6
  "main": "dist/index.js",