@infinityfx/lively 3.5.3 → 4.0.0-alpha.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.
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{__assign as n,__rest as r}from"tslib";import{jsx as e}from"react/jsx-runtime";import{createContext as t,forwardRef as i,useRef as a,useContext as o,useState as u,useCallback as d,useImperativeHandle as l,useEffect as c,Children as m,isValidElement as s,cloneElement as v}from"react";import f from"./core/clip.js";import p from"./core/timeline.js";import{merge as h,pick as g,combineRefs as y}from"./core/utils.js";var b=t(null);var x=i((function(t,i){var x=a(null),w=a([]),j=o(b),E=t.inherit&&j?h({},t,g(j,["group","animations","triggers","animate","initial","stagger","staggerLimit","deform","disabled","paused"])):t,L=E.id,A=void 0===L?"":L,k=E.inherit,z=E.triggers,C=void 0===z?[]:z,M=E.disabled,D=E.adaptive,F=void 0!==D&&D,N=E.manual,O=void 0!==N&&N,P=E.paused,T=void 0!==t.order?t.order:(k&&(null==j?void 0:j.index)||0)+1,V=a([]),q=u((function(){var n={animate:f.from(E.animate,E.initial)};for(var r in E.animations)n[r]=f.from(E.animations[r],E.initial);return n}))[0],B=a(new p(n(n({},E),{mountClips:C.reduce((function(n,r){var e=r.name;return"mount"===r.on&&n.push(q[e||"animate"]),n}),[])}))),G=d((function(n,r,e){var i;void 0===r&&(r={}),void 0===e&&(e=1);var a=q[n];if(M||T>1&&e<2)return 0;h(r,{reverse:null==a?void 0:a.reverse});for(var o=0,u=r.delay||0,d=a?B.current.time(a):0,l=0,c=w.current;l<c.length;l++){var m=c[l];(null===(i=m.current)||void 0===i?void 0:i.inherit)&&(o=Math.max(m.current.play(n,h({delay:u+d},r),e+1),o))}var s=(r.reverse?o:u)*(T/e);return a&&B.current.add(a,h({delay:s},r)),t.onAnimationEnd&&setTimeout(t.onAnimationEnd.bind({},n),1e3*(d+s)),d+s}),[M,T]);function H(n,e){void 0===e&&(e={});for(var t=0,i=0,a=C;i<a.length;i++){var o=a[i],u=o.name,d=o.on,l=r(o,["name","on"]);d===n&&(t=Math.max(G(u||"animate",h(l,e)),t))}return t}return l(y(x,i),(function(){return{play:G,trigger:H,timeline:B.current,children:w.current,inherit:k,adaptive:F,manual:O,id:A}}),[C]),c((function(){return B.current[P||M?"pause":"play"]()}),[P,M]),c((function(){for(var n=0;n<C.length;n++){var e=C[n],t=e.name,i=e.on,a=r(e,["name","on"]);if("string"!=typeof i){var o="boolean"==typeof i?i:i.called,u=V.current[n];void 0!==u&&o&&o!==u&&G(t||"animate",a),V.current[n]=o}}}),[C]),c((function(){B.current.connect(E.animate);var n=function(){return B.current.cache()};return window.addEventListener("resize",n),null==j||j.add(x),document.fonts.ready.then((function(){O||B.current.mounted||H("mount"),B.current.mounted=!0})),function(){window.removeEventListener("resize",n),null==j||j.remove(x)}}),[]),e(b.Provider,{value:n(n({},t.passthrough?j:n({index:T},E)),{add:function(n){t.passthrough&&(null==j||j.add(n)),w.current.includes(n)||w.current.push(n)},remove:function(n){t.passthrough&&(null==j||j.remove(n));var r=w.current.indexOf(n)||-1;r>=0&&w.current.splice(r,1)}}),children:m.map(t.children,(function(n){return!s(n)||n.type instanceof Function?n:v(n,{ref:y((function(n){return B.current.insert(n)}),n.ref),pathLength:1,style:h({backfaceVisibility:"hidden",willChange:"transform"},n.props.style,q.animate.initial,{strokeDasharray:1}),"data-lively-offset-boundary":!(!["x","y"].some((function(n){var r;return null===(r=t.cachable)||void 0===r?void 0:r.includes(n)}))&&void 0!==t.cachable)||void 0})}))})}));x.displayName="Animatable";export{b as AnimatableContext,x as default};
2
+ import{__assign as n,__rest as r}from"tslib";import{jsx as e}from"react/jsx-runtime";import{createContext as t,useRef as i,use as a,useMemo as o,useCallback as u,useImperativeHandle as d,useEffect as c,Children as l,isValidElement as m,cloneElement as s}from"react";import v from"./core/clip.js";import f from"./core/timeline.js";import{merge as p,pick as h,combineRefs as g}from"./core/utils.js";var y=t(null);function b(t){var b=i(null),x=i([]),w=a(y),j=t.inherit&&w?p({},t,h(w,["group","animations","triggers","animate","initial","stagger","staggerLimit","deform","disabled","paused"])):t,E=j.id,L=void 0===E?"":E,k=j.inherit,z=j.triggers,A=void 0===z?[]:z,C=j.disabled,M=j.adaptive,D=void 0!==M&&M,F=j.manual,O=void 0!==F&&F,T=j.paused,V=void 0!==t.order?t.order:(k&&(null==w?void 0:w.index)||0)+1,q=i([]),B=o((function(){var n={animate:v.from(j.animate,j.initial)};for(var r in j.animations)n[r]=v.from(j.animations[r],j.initial);return n}),[]),G=i(new f(n(n({},j),{mountClips:A.reduce((function(n,r){var e=r.name;return"mount"===r.on&&n.push(B[e||"animate"]),n}),[])}))),H=u((function(n,r,e){var i;void 0===r&&(r={}),void 0===e&&(e=1);var a=B[n];if(C||V>1&&e<2)return 0;p(r,{reverse:null==a?void 0:a.reverse});for(var o=0,u=r.delay||0,d=a?G.current.time(a):0,c=0,l=x.current;c<l.length;c++){var m=l[c];(null===(i=m.current)||void 0===i?void 0:i.inherit)&&(o=Math.max(m.current.play(n,p({delay:u+d},r),e+1),o))}var s=(r.reverse?o:u)*(V/e);return a&&G.current.add(a,p({delay:s},r)),t.onAnimationEnd&&setTimeout(t.onAnimationEnd.bind({},n),1e3*(d+s)),d+s}),[C,V]);function I(n,e){void 0===e&&(e={});for(var t=0,i=0,a=A;i<a.length;i++){var o=a[i],u=o.name,d=o.on,c=r(o,["name","on"]);d===n&&(t=Math.max(H(u||"animate",p(c,e)),t))}return t}return d(g(b,t.ref),(function(){return{play:H,trigger:I,timeline:G.current,children:x.current,inherit:k,adaptive:D,manual:O,id:L}}),[A]),c((function(){return G.current[T||C?"pause":"play"]()}),[T,C]),c((function(){for(var n=0;n<A.length;n++){var e=A[n],t=e.name,i=e.on,a=r(e,["name","on"]);if("string"!=typeof i){var o="boolean"==typeof i?i:i.called,u=q.current[n];void 0!==u&&o&&o!==u&&H(t||"animate",a),q.current[n]=o}}}),[A]),c((function(){G.current.connect(j.animate);var n=function(){return G.current.cache()};return window.addEventListener("resize",n),null==w||w.add(b),document.fonts.ready.then((function(){O||G.current.mounted||I("mount"),G.current.mounted=!0})),function(){window.removeEventListener("resize",n),null==w||w.remove(b)}}),[]),e(y,{value:n(n({},t.passthrough?w:n({index:V},j)),{add:function(n){t.passthrough&&(null==w||w.add(n)),x.current.includes(n)||x.current.push(n)},remove:function(n){t.passthrough&&(null==w||w.remove(n));var r=x.current.indexOf(n)||-1;r>=0&&x.current.splice(r,1)}}),children:l.map(t.children,(function(n){return!m(n)||n.type instanceof Function?n:s(n,{ref:g((function(n){return G.current.insert(n)}),n.ref),pathLength:1,style:p({backfaceVisibility:"hidden",willChange:"transform"},n.props.style,B.animate.initial,{strokeDasharray:1}),"data-lively-offset-boundary":!(!["x","y"].some((function(n){var r;return null===(r=t.cachable)||void 0===r?void 0:r.includes(n)}))&&void 0!==t.cachable)||void 0})}))})}export{y as AnimatableContext,b as default};
3
3
  //# sourceMappingURL=animatable.js.map
package/dist/animate.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{__rest as i,__assign as r}from"tslib";import{jsx as n,Fragment as o}from"react/jsx-runtime";import{forwardRef as t,Children as e,isValidElement as a,cloneElement as m}from"react";import s from"./animatable.js";import l from"./animations/move.js";import p from"./animations/pop.js";var f=t((function(t,f){var c=t.children,d=t.animations,u=void 0===d?[l,p]:d,v=t.levels,h=void 0===v?2:v,j=i(t,["children","animations","levels"]);return n(o,{children:function i(o,t){void 0===t&&(t=h);for(var l,p=h-t;!(l=u[p])&&p>=0;)p--;return t<1||e.count(o)<1?o:n(s,r({},j,{ref:f,animate:l,inherit:t<h||j.inherit,children:e.map(o,(function(r){return a(r)?m(r,{},i(r.props.children,t-1)):r}))}))}(c)})}));f.displayName="Animate";export{f as default};
2
+ import{__rest as i,__assign as r}from"tslib";import{jsx as n,Fragment as o}from"react/jsx-runtime";import{Children as t,isValidElement as e,cloneElement as m}from"react";import a from"./animatable.js";import s from"./animations/move.js";import l from"./animations/pop.js";function p(p){var c=p.children,f=p.animations,d=void 0===f?[s,l]:f,u=p.levels,v=void 0===u?2:u,h=i(p,["children","animations","levels"]);return n(o,{children:function i(o,s){void 0===s&&(s=v);for(var l,p=v-s;!(l=d[p])&&p>=0;)p--;return s<1||t.count(o)<1?o:n(a,r({},h,{animate:l,inherit:s<v||h.inherit,children:t.map(o,(function(r){return e(r)?m(r,{},i(r.props.children,s-1)):r}))}))}(c)})}export{p as default};
3
3
  //# sourceMappingURL=animate.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{useRef as e,useEffect as n}from"react";import r from"./use-link.js";var t;function o(o){var a,i=void 0===o?{}:o,u=i.bands,c=void 0===u?8:u,d=i.minFrequency,s=void 0===d?100:d,l=i.maxFrequency,v=void 0===l?2e3:l,m=i.smoothing,f=void 0===m?.7:m,y=e(new Float32Array(1024)),p=e(),A=e(),F=e(null),h=r(new Array(8).fill(0));function E(){if(p.current){p.current.getFloatFrequencyData(y.current);for(var e=h(),n=Math.floor(s/24e3*1024),r=Math.floor(v/24e3*1024),t=0;t<c;t++){var o=n+(r-n)/c*t,i=Math.floor(o),u=Math.ceil(o),d=o-i,l=y.current[i]*(1-d)+y.current[u]*d;e[t]=Math.max(0,(100+l)/70)}h.set(e,0),a=requestAnimationFrame(E)}}function L(){"suspended"===t.state&&t.resume(),a=requestAnimationFrame(E)}function M(){cancelAnimationFrame(a),h.set(new Array(c).fill(0),.3)}return n((function(){var e=F.current;if(e)return t||(t=new AudioContext),p.current||(p.current=new AnalyserNode(t,{fftSize:2048,smoothingTimeConstant:f})),A.current||(A.current=t.createMediaElementSource(e)),p.current.connect(t.destination),A.current.connect(p.current),e.addEventListener("play",L),e.addEventListener("pause",M),e.addEventListener("ended",M),function(){var n,r;null===(n=p.current)||void 0===n||n.disconnect(),null===(r=A.current)||void 0===r||r.disconnect(),e.removeEventListener("play",L),e.removeEventListener("pause",M),e.removeEventListener("ended",M)}}),[]),[F,h]}export{o as default};
2
+ import{useRef as e,useEffect as n}from"react";import r from"./use-link.js";var t;function o(o){var i,a=void 0===o?{}:o,u=a.bands,c=void 0===u?8:u,d=a.minFrequency,s=void 0===d?100:d,v=a.maxFrequency,l=void 0===v?2e3:v,m=a.smoothing,f=void 0===m?.7:m,y=e(new Float32Array(1024)),p=e(void 0),A=e(void 0),F=e(null),h=r(new Array(8).fill(0));function E(){if(p.current){p.current.getFloatFrequencyData(y.current);for(var e=h(),n=Math.floor(s/24e3*1024),r=Math.floor(l/24e3*1024),t=0;t<c;t++){var o=n+(r-n)/c*t,a=Math.floor(o),u=Math.ceil(o),d=o-a,v=y.current[a]*(1-d)+y.current[u]*d;e[t]=Math.max(0,(100+v)/70)}h.set(e,0),i=requestAnimationFrame(E)}}function L(){"suspended"===t.state&&t.resume(),i=requestAnimationFrame(E)}function M(){cancelAnimationFrame(i),h.set(new Array(c).fill(0),.3)}return n((function(){var e=F.current;if(e)return t||(t=new AudioContext),p.current||(p.current=new AnalyserNode(t,{fftSize:2048,smoothingTimeConstant:f})),A.current||(A.current=t.createMediaElementSource(e)),p.current.connect(t.destination),A.current.connect(p.current),e.addEventListener("play",L),e.addEventListener("pause",M),e.addEventListener("ended",M),function(){var n,r;null===(n=p.current)||void 0===n||n.disconnect(),null===(r=A.current)||void 0===r||r.disconnect(),e.removeEventListener("play",L),e.removeEventListener("pause",M),e.removeEventListener("ended",M)}}),[]),[F,h]}export{o as default};
3
3
  //# sourceMappingURL=use-audio.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{__rest as t,__assign as r}from"tslib";import{jsx as i}from"react/jsx-runtime";import{forwardRef as e,useContext as n,useRef as o,useState as u,useEffect as a}from"react";import m,{AnimatableContext as c}from"../animatable.js";import{combineRefs as l}from"../core/utils.js";import s from"../hooks/use-mount-effect.js";var f={},d=e((function(e,d){var v=e.children,p=e.transition,g=void 0===p?{}:p,h=e.show,b=void 0===h||h,j=e.group,w=t(e,["children","transition","show","group"]),x=n(c),T=o(null),_=u(b),k=_[0],y=_[1],E=u(b),M=E[0],N=E[1];return j=(null==x?void 0:x.group)?"".concat(x.group,"__").concat(j):j,s((function(){if(T.current){var t,r=T.current.timeline;f[j].targets.forEach((function(i){i.mounted&&i!==r&&(t=i)})),b&&!r.mounted&&(f[j].visible=!0,t?r.transition(t,g):T.current.trigger("mount")),N(b)}}),[b]),a((function(){var t;if(T.current){var r=T.current.timeline;if(!b&&r.mounted){if(!f[j].visible){var i=null===(t=T.current)||void 0===t?void 0:t.trigger("unmount");setTimeout((function(){return y(!1)}),1e3*i)}f[j].targets.delete(r)}(b||f[j].visible)&&y(b),setTimeout((function(){return f[j].visible=!1})),r.mounted=b}}),[M]),b||k!==b?i(m,r({},w,{manual:!0,group:j,ref:l((function(t){j in f||(f[j]={targets:new Set,visible:!1}),t&&(f[j].targets.add(t.timeline),T.current=t)}),d),children:v})):null}));d.displayName="Morph";export{d as default};
2
+ import{__rest as t,__assign as r}from"tslib";import{jsx as e}from"react/jsx-runtime";import{use as i,useRef as n,useState as o,useEffect as u}from"react";import m,{AnimatableContext as a}from"../animatable.js";import{combineRefs as c}from"../core/utils.js";import l from"../hooks/use-mount-effect.js";var s={};function f(f){var d=f.children,v=f.transition,g=void 0===v?{}:v,p=f.show,b=void 0===p||p,h=f.group,j=t(f,["children","transition","show","group"]),w=i(a),x=n(null),T=o(b),_=T[0],k=T[1],E=o(b),S=E[0],q=E[1];return h=(null==w?void 0:w.group)?"".concat(w.group,"__").concat(h):h,l((function(){if(x.current){var t,r=x.current.timeline;s[h].targets.forEach((function(e){e.mounted&&e!==r&&(t=e)})),b&&!r.mounted&&(s[h].visible=!0,t?r.transition(t,g):x.current.trigger("mount")),q(b)}}),[b]),u((function(){var t;if(x.current){var r=x.current.timeline;if(!b&&r.mounted){if(!s[h].visible){var e=null===(t=x.current)||void 0===t?void 0:t.trigger("unmount");setTimeout((function(){return k(!1)}),1e3*e)}s[h].targets.delete(r)}(b||s[h].visible)&&k(b),setTimeout((function(){return s[h].visible=!1})),r.mounted=b}}),[S]),b||_!==b?e(m,r({},j,{manual:!0,group:h,ref:c((function(t){h in s||(s[h]={targets:new Set,visible:!1}),t&&(s[h].targets.add(t.timeline),x.current=t)}),j.ref),children:d})):null}export{f as default};
3
3
  //# sourceMappingURL=morph.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{__rest as r,__assign as t}from"tslib";import{jsx as e}from"react/jsx-runtime";import{forwardRef as i,Children as a}from"react";import n from"../animatable.js";var m=i((function(i,m){var o=i.children,p=i.stagger,s=void 0===p?1:p,g=i.staggerLimit,f=void 0===g?Number.MAX_VALUE:g,l=r(i,["children","stagger","staggerLimit"]);return e(n,t({},l,{ref:m,stagger:-1*s,staggerLimit:f,children:a.map(o,(function(r){return"string"!=typeof r&&"number"!=typeof r?r:r.toString().split("").map((function(r){return e("span",{style:{whiteSpace:" "===r?"pre-wrap":void 0},children:r})}))}))}))}));m.displayName="Typable";export{m as default};
2
+ import{__rest as r,__assign as t}from"tslib";import{jsx as e}from"react/jsx-runtime";import{Children as i}from"react";import a from"../animatable.js";function n(n){var o=n.children,m=n.stagger,g=void 0===m?1:m,p=n.staggerLimit,s=void 0===p?Number.MAX_VALUE:p,c=r(n,["children","stagger","staggerLimit"]);return e(a,t({},c,{stagger:-1*g,staggerLimit:s,children:i.map(o,(function(r){return"string"!=typeof r&&"number"!=typeof r?r:r.toString().split("").map((function(r){return e("span",{style:{whiteSpace:" "===r?"pre-wrap":void 0},children:r})}))}))}))}export{n as default};
3
3
  //# sourceMappingURL=typable.js.map
@@ -8,7 +8,7 @@ export type AnimatableType<T extends string = any> = {
8
8
  play: (animation: T | 'animate', options?: PlayOptions, layer?: number) => number;
9
9
  trigger: (trigger: StaticTrigger, options?: PlayOptions) => number;
10
10
  timeline: Timeline;
11
- children: React.MutableRefObject<AnimatableType | null>[];
11
+ children: React.RefObject<AnimatableType | null>[];
12
12
  inherit: boolean | undefined;
13
13
  adaptive: boolean;
14
14
  manual: boolean;
@@ -32,6 +32,7 @@ type SharedProps<T extends string = any> = {
32
32
  paused?: boolean;
33
33
  };
34
34
  export type AnimatableProps<T extends string = any> = {
35
+ ref: React.Ref<AnimatableType>;
35
36
  children: React.ReactNode;
36
37
  id?: string;
37
38
  order?: number;
@@ -44,24 +45,9 @@ export type AnimatableProps<T extends string = any> = {
44
45
  } & SharedProps<T>;
45
46
  type AnimatableContext = {
46
47
  index?: number;
47
- add: (child: React.RefObject<AnimatableType>) => void;
48
- remove: (child: React.RefObject<AnimatableType>) => void;
48
+ add: (child: React.RefObject<AnimatableType | null>) => void;
49
+ remove: (child: React.RefObject<AnimatableType | null>) => void;
49
50
  } & SharedProps;
50
51
  export declare const AnimatableContext: import("react").Context<AnimatableContext | null>;
51
- declare function AnimatableBase<T extends string>(props: AnimatableProps<T>, ref: React.ForwardedRef<AnimatableType>): import("react/jsx-runtime").JSX.Element;
52
- declare const Animatable: (<T extends string>(props: {
53
- children: React.ReactNode;
54
- id?: string | undefined;
55
- order?: number | undefined;
56
- inherit?: boolean | undefined;
57
- passthrough?: boolean | undefined;
58
- adaptive?: boolean | undefined;
59
- cachable?: CachableKey[] | undefined;
60
- manual?: boolean | undefined;
61
- onAnimationEnd?: ((animation: "animate" | T) => void) | undefined;
62
- } & SharedProps<T> & {
63
- ref?: import("react").ForwardedRef<AnimatableType<any>> | undefined;
64
- }) => ReturnType<typeof AnimatableBase>) & {
65
- displayName: string;
66
- };
67
- export default Animatable;
52
+ export default function Animatable<T extends string>(props: AnimatableProps<T>): import("react/jsx-runtime").JSX.Element;
53
+ export {};
@@ -1,9 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { AnimatableProps, AnimatableType } from "./animatable";
2
+ import { AnimatableProps } from "./animatable";
3
3
  import Clip, { ClipProperties } from "./core/clip";
4
- declare const Animate: import("react").ForwardRefExoticComponent<{
4
+ type AnimateProps = {
5
5
  children: React.ReactNode;
6
- animations?: (ClipProperties | Clip)[] | undefined;
7
- levels?: number | undefined;
8
- } & Omit<AnimatableProps, "order" | "animate" | "animations"> & import("react").RefAttributes<AnimatableType>>;
9
- export default Animate;
6
+ animations?: (ClipProperties | Clip)[];
7
+ levels?: number;
8
+ } & Omit<AnimatableProps, 'animations' | 'animate' | 'order'>;
9
+ export default function Animate({ children, animations, levels, ...props }: AnimateProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -1,35 +1,10 @@
1
- /// <reference types="react" />
2
- import { AnimatableType } from "../animatable";
1
+ import { AnimatableProps } from "../animatable";
3
2
  import { TransitionOptions } from "../core/track";
4
- declare const Morph: import("react").ForwardRefExoticComponent<{
3
+ type MorphProps = {
5
4
  group: string;
6
- transition?: Omit<TransitionOptions, "reverse"> | undefined;
7
- show?: boolean | undefined;
8
- } & {
9
- children: import("react").ReactNode;
10
- id?: string | undefined;
11
- order?: number | undefined;
12
- inherit?: boolean | undefined;
13
- passthrough?: boolean | undefined;
14
- adaptive?: boolean | undefined;
15
- cachable?: import("../core/cache").CachableKey[] | undefined;
16
- manual?: boolean | undefined;
17
- onAnimationEnd?: ((animation: any) => void) | undefined;
18
- } & {
19
- group?: string | undefined;
20
- animations?: {
21
- [x: string]: import("../core/clip").ClipProperties | import("../animations").Clip;
22
- } | undefined;
23
- triggers?: ({
24
- name?: any;
25
- on: boolean | import("../hooks/use-trigger").Trigger | ("mount" | "unmount");
26
- } & import("../core/timeline").PlayOptions)[] | undefined;
27
- animate?: import("../core/clip").ClipProperties | import("../animations").Clip | undefined;
28
- initial?: import("../core/clip").AnimatableInitials | undefined;
29
- stagger?: number | undefined;
30
- staggerLimit?: number | undefined;
31
- deform?: boolean | undefined;
32
- disabled?: boolean | undefined;
33
- paused?: boolean | undefined;
34
- } & import("react").RefAttributes<AnimatableType>>;
35
- export default Morph;
5
+ transition?: Omit<TransitionOptions, 'reverse'>;
6
+ show?: boolean;
7
+ } & AnimatableProps;
8
+ export default function Morph({ children, transition, // should be able to be inherited
9
+ show, group, ...props }: MorphProps): import("react/jsx-runtime").JSX.Element | null;
10
+ export {};
@@ -1,30 +1,2 @@
1
- /// <reference types="react" />
2
- import { AnimatableType } from "../animatable";
3
- declare const Typable: import("react").ForwardRefExoticComponent<{
4
- children: import("react").ReactNode;
5
- id?: string | undefined;
6
- order?: number | undefined;
7
- inherit?: boolean | undefined;
8
- passthrough?: boolean | undefined;
9
- adaptive?: boolean | undefined;
10
- cachable?: import("../core/cache").CachableKey[] | undefined;
11
- manual?: boolean | undefined;
12
- onAnimationEnd?: ((animation: any) => void) | undefined;
13
- } & {
14
- group?: string | undefined;
15
- animations?: {
16
- [x: string]: import("../core/clip").ClipProperties | import("../animations").Clip;
17
- } | undefined;
18
- triggers?: ({
19
- name?: any;
20
- on: boolean | import("../hooks/use-trigger").Trigger | ("mount" | "unmount");
21
- } & import("../core/timeline").PlayOptions)[] | undefined;
22
- animate?: import("../core/clip").ClipProperties | import("../animations").Clip | undefined;
23
- initial?: import("../core/clip").AnimatableInitials | undefined;
24
- stagger?: number | undefined;
25
- staggerLimit?: number | undefined;
26
- deform?: boolean | undefined;
27
- disabled?: boolean | undefined;
28
- paused?: boolean | undefined;
29
- } & import("react").RefAttributes<AnimatableType>>;
30
- export default Typable;
1
+ import { AnimatableProps } from "../animatable";
2
+ export default function Typable({ children, stagger, staggerLimit, ...props }: AnimatableProps): import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infinityfx/lively",
3
- "version": "3.5.3",
3
+ "version": "4.0.0-alpha.0",
4
4
  "type": "module",
5
5
  "description": "Feature complete, lightweight react animation library.",
6
6
  "main": "dist/index.js",
@@ -50,21 +50,22 @@
50
50
  "tslib": "^2.6.2"
51
51
  },
52
52
  "peerDependencies": {
53
- "react": ">=16.0.0",
54
- "react-dom": ">=16.0.0"
53
+ "react": ">=19.0.0",
54
+ "react-dom": ">=19.0.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@rollup/plugin-commonjs": "^25.0.7",
58
58
  "@rollup/plugin-node-resolve": "^15.2.3",
59
59
  "@rollup/plugin-terser": "^0.4.4",
60
60
  "@rollup/plugin-typescript": "^11.1.6",
61
- "@types/react": "^18.2.31",
62
- "react": "^18.2.0",
63
- "react-dom": "^18.2.0",
64
- "rollup": "^4.10.0",
65
- "rollup-plugin-preserve-directives": "^0.4.0",
61
+ "@types/react": "npm:types-react@^19.0.0-beta.1",
62
+ "@types/react-dom": "npm:types-react-dom@^19.0.0-beta.1",
63
+ "react": "^19.0.0-beta-73bcdfbae5-20240502",
64
+ "react-dom": "^19.0.0-beta-73bcdfbae5-20240502",
65
+ "rollup": "^4.17.2",
66
66
  "rollup-plugin-delete": "^2.0.0",
67
- "typescript": "^5.3.3"
67
+ "rollup-plugin-preserve-directives": "^0.4.0",
68
+ "typescript": "^5.4.5"
68
69
  },
69
70
  "sideEffects": false
70
71
  }