@infinityfx/lively 2.2.0 → 3.0.0-beta.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.
Files changed (75) hide show
  1. package/README.md +2 -2
  2. package/dist/animations.js +2 -0
  3. package/dist/animations.js.map +1 -0
  4. package/dist/hooks.js +2 -0
  5. package/dist/hooks.js.map +1 -0
  6. package/dist/index.js +2 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/pop-0fdae9af.js +2 -0
  9. package/dist/pop-0fdae9af.js.map +1 -0
  10. package/dist/tslib.es6-96c5f7c9.js +2 -0
  11. package/dist/tslib.es6-96c5f7c9.js.map +1 -0
  12. package/dist/types/animatable.d.ts +40 -0
  13. package/dist/types/animate.d.ts +9 -0
  14. package/dist/types/animations/fade.d.ts +3 -0
  15. package/dist/types/animations/move.d.ts +3 -0
  16. package/dist/types/animations/pop.d.ts +3 -0
  17. package/dist/types/animations/scale.d.ts +3 -0
  18. package/dist/types/animations/wipe.d.ts +3 -0
  19. package/dist/types/animations.d.ts +6 -0
  20. package/dist/types/core/cache.d.ts +29 -0
  21. package/dist/types/core/clip.d.ts +51 -0
  22. package/dist/types/core/timeline.d.ts +32 -0
  23. package/dist/types/core/utils.d.ts +8 -0
  24. package/dist/types/hooks/use-link.d.ts +6 -0
  25. package/dist/types/hooks/use-mount.d.ts +3 -0
  26. package/dist/types/hooks/use-reduced-motion.d.ts +1 -0
  27. package/dist/types/hooks/use-scroll.d.ts +1 -0
  28. package/dist/types/hooks.d.ts +5 -0
  29. package/dist/types/index.d.ts +3 -0
  30. package/dist/utils-5bcfdcec.js +2 -0
  31. package/dist/utils-5bcfdcec.js.map +1 -0
  32. package/package.json +23 -26
  33. package/tsconfig.json +23 -0
  34. package/dist/cjs/animatable-5f419fc7.js +0 -1
  35. package/dist/cjs/animation-2cdeea17.js +0 -1
  36. package/dist/cjs/animations.js +0 -1
  37. package/dist/cjs/auto.js +0 -1
  38. package/dist/cjs/events-3eb4d8ea.js +0 -1
  39. package/dist/cjs/hooks.js +0 -1
  40. package/dist/cjs/index.js +0 -1
  41. package/dist/cjs/link-6ddefb82.js +0 -1
  42. package/dist/cjs/pop-00f8331d.js +0 -1
  43. package/dist/cjs/scroll-c6918c92.js +0 -1
  44. package/dist/esm/animatable-fda830d7.js +0 -1
  45. package/dist/esm/animation-2c86de42.js +0 -1
  46. package/dist/esm/animations.js +0 -1
  47. package/dist/esm/auto.js +0 -1
  48. package/dist/esm/events-66e26954.js +0 -1
  49. package/dist/esm/hooks.js +0 -1
  50. package/dist/esm/index.js +0 -1
  51. package/dist/esm/link-292004ea.js +0 -1
  52. package/dist/esm/pop-c392f121.js +0 -1
  53. package/dist/esm/scroll-3c98ff79.js +0 -1
  54. package/types/animatable.d.ts +0 -164
  55. package/types/animate.d.ts +0 -45
  56. package/types/animations/animation.d.ts +0 -15
  57. package/types/animations/fade.d.ts +0 -9
  58. package/types/animations/move.d.ts +0 -19
  59. package/types/animations/pop.d.ts +0 -9
  60. package/types/animations/scale.d.ts +0 -19
  61. package/types/animations/wipe.d.ts +0 -19
  62. package/types/animations.d.ts +0 -8
  63. package/types/auto/layout-group.d.ts +0 -16
  64. package/types/auto/morph.d.ts +0 -26
  65. package/types/auto/parallax.d.ts +0 -11
  66. package/types/auto.d.ts +0 -5
  67. package/types/core/link.d.ts +0 -12
  68. package/types/globals.d.ts +0 -90
  69. package/types/hooks/link.d.ts +0 -8
  70. package/types/hooks/path.d.ts +0 -9
  71. package/types/hooks/reduced-motions.d.ts +0 -4
  72. package/types/hooks/scroll.d.ts +0 -6
  73. package/types/hooks/unmount.d.ts +0 -10
  74. package/types/hooks.d.ts +0 -7
  75. package/types/index.d.ts +0 -4
package/types/auto.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export as namespace Auto;
2
-
3
- export { LayoutGroup } from './auto/layout-group';
4
- export { Morph } from './auto/morph';
5
- export { Parallax } from './auto/parallax';
@@ -1,12 +0,0 @@
1
- export type Link = {
2
-
3
- set: (val: any, duration?: number) => void;
4
-
5
- }
6
-
7
- /**
8
- * A reactive `Function` which returns it currently stored value.
9
- *
10
- * @param {Function} transformer - A function which transforms the `Link` value before returning it.
11
- */
12
- export function Link(transformer?: (val: any) => any): any;
@@ -1,90 +0,0 @@
1
- import React from 'react';
2
-
3
- type TranslateProperty = { x?: number; y?: number; } | string;
4
-
5
- type ScaleProperty = { x?: number; y?: number; } | string | number;
6
-
7
- type ClipProperty = {
8
- left?: number | string;
9
- top?: number | string;
10
- right?: number | string;
11
- bottom?: number | string;
12
- }
13
-
14
- export interface AnimationInitials extends React.CSSProperties {
15
- /**
16
- * Define the position of an `element` relative to initial rendered position.
17
- *
18
- * @default { x: 0, y: 0 }
19
- */
20
- translate?: TranslateProperty;
21
-
22
- /**
23
- * @default { x: 1, y: 1 }
24
- */
25
- scale?: ScaleProperty;
26
-
27
- /**
28
- * @default 0
29
- */
30
- rotate?: number | string;
31
-
32
- /**
33
- * @default { left: 0, top: 0, right: 0, bottom: 0 }
34
- */
35
- clip?: ClipProperty;
36
-
37
- /**
38
- * Value between `0` and `1` which defines how much of an `SVGElement`'s stroke is shown.
39
- *
40
- * @default 1
41
- */
42
- length?: number;
43
- }
44
-
45
- export interface AnimationProperties extends AnimationInitials {
46
-
47
- /**
48
- * Delay of the animation in seconds.
49
- *
50
- * @default 0
51
- */
52
- delay?: number;
53
-
54
- /**
55
- * Duration of animation in seconds.
56
- *
57
- * @default 1
58
- */
59
- duration?: number;
60
-
61
- /**
62
- * Number of times to repeat the animation.
63
- *
64
- * Accepts `Infinity` as a value to loop the animation indefinitely.
65
- *
66
- * @default 1
67
- */
68
- repeat?: number;
69
-
70
- /**
71
- * Whether to alternate the animation direction (reversed) on repeats.
72
- *
73
- * @default false
74
- */
75
- alternate?: boolean;
76
-
77
- /**
78
- * Interpolation method used between keyframes.
79
- *
80
- * @default "ease"
81
- */
82
- interpolate?: 'constant' | 'linear' | 'ease' | 'spring';
83
-
84
- /**
85
- * Alias for `transform-origin`.
86
- *
87
- * @default { x: 0.5, y: 0.5 }
88
- */
89
- origin?: string | { x?: number, y?: number } | number;
90
- }
@@ -1,8 +0,0 @@
1
- import { Link } from '../core/link';
2
-
3
- /**
4
- * Returns a `Link`, which can be used as an animation value.
5
- *
6
- * @param {any} initial - The initial value for the `Link`.
7
- */
8
- export function useLink(initial: any): [Link, Link.set];
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
-
3
- /**
4
- * Returns a `Function`, which can be passed as an animation value for the `translate` property, that describes the motion along a referenced `SVGElement`'s path.
5
- *
6
- * @param {number[]} [offset=[0, 0]] - Offset the path's position by some amount along the x and y axis in pixels.
7
- * @param {number} [scale=1] - Scale the size of the path some amount.
8
- */
9
- export function usePath(offset?: number[], scale?: number): [Function, React.Ref<SVGElement>];
@@ -1,4 +0,0 @@
1
- /**
2
- * Checks whether a user prefers reduced motion, when `preferes-reduced-motion: reduce`.
3
- */
4
- export function useReducedMotion(): boolean;
@@ -1,6 +0,0 @@
1
- import { Link } from '../core/link';
2
-
3
- /**
4
- * Returns a `Link`, which can be used as an animation value, that describes the current scroll position on the page.
5
- */
6
- export function useScroll(): Link;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { Animatable } from '../animatable';
3
- import { Animate } from '../animate';
4
-
5
- /**
6
- * Returns a boolean value which dictates whether the referenced component should be mounted or not and allows for animating the respective component when it unmounts.
7
- *
8
- * @param {boolean} initial - whether the referenced component is initially mounted.
9
- */
10
- export function useUnmount(initial: boolean): [boolean, (mounted: boolean) => void, React.Ref<Animatable | Animate>];
package/types/hooks.d.ts DELETED
@@ -1,7 +0,0 @@
1
- export as namespace Hooks;
2
-
3
- export { useUnmount } from './hooks/unmount';
4
- export { useLink } from './hooks/link';
5
- export { useScroll } from './hooks/scroll';
6
- export { usePath } from './hooks/path';
7
- export { useReducedMotion } from './hooks/reduced-motion';
package/types/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export as namespace Lively;
2
-
3
- export { Animatable } from './animatable';
4
- export { Animate } from './animate';