@infinityfx/lively 2.2.0 → 3.0.0-beta.1

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 (78) 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-8dc5bc17.js +2 -0
  9. package/dist/pop-8dc5bc17.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/action.d.ts +18 -0
  21. package/dist/types/core/cache.d.ts +31 -0
  22. package/dist/types/core/clip.d.ts +48 -0
  23. package/dist/types/core/timeline.d.ts +34 -0
  24. package/dist/types/core/track.d.ts +16 -0
  25. package/dist/types/core/utils.d.ts +8 -0
  26. package/dist/types/hooks/use-link.d.ts +6 -0
  27. package/dist/types/hooks/use-mount.d.ts +3 -0
  28. package/dist/types/hooks/use-path.d.ts +2 -0
  29. package/dist/types/hooks/use-reduced-motion.d.ts +1 -0
  30. package/dist/types/hooks/use-scroll.d.ts +1 -0
  31. package/dist/types/hooks.d.ts +6 -0
  32. package/dist/types/index.d.ts +3 -0
  33. package/dist/utils-5bcfdcec.js +2 -0
  34. package/dist/utils-5bcfdcec.js.map +1 -0
  35. package/package.json +23 -26
  36. package/tsconfig.json +24 -0
  37. package/dist/cjs/animatable-5f419fc7.js +0 -1
  38. package/dist/cjs/animation-2cdeea17.js +0 -1
  39. package/dist/cjs/animations.js +0 -1
  40. package/dist/cjs/auto.js +0 -1
  41. package/dist/cjs/events-3eb4d8ea.js +0 -1
  42. package/dist/cjs/hooks.js +0 -1
  43. package/dist/cjs/index.js +0 -1
  44. package/dist/cjs/link-6ddefb82.js +0 -1
  45. package/dist/cjs/pop-00f8331d.js +0 -1
  46. package/dist/cjs/scroll-c6918c92.js +0 -1
  47. package/dist/esm/animatable-fda830d7.js +0 -1
  48. package/dist/esm/animation-2c86de42.js +0 -1
  49. package/dist/esm/animations.js +0 -1
  50. package/dist/esm/auto.js +0 -1
  51. package/dist/esm/events-66e26954.js +0 -1
  52. package/dist/esm/hooks.js +0 -1
  53. package/dist/esm/index.js +0 -1
  54. package/dist/esm/link-292004ea.js +0 -1
  55. package/dist/esm/pop-c392f121.js +0 -1
  56. package/dist/esm/scroll-3c98ff79.js +0 -1
  57. package/types/animatable.d.ts +0 -164
  58. package/types/animate.d.ts +0 -45
  59. package/types/animations/animation.d.ts +0 -15
  60. package/types/animations/fade.d.ts +0 -9
  61. package/types/animations/move.d.ts +0 -19
  62. package/types/animations/pop.d.ts +0 -9
  63. package/types/animations/scale.d.ts +0 -19
  64. package/types/animations/wipe.d.ts +0 -19
  65. package/types/animations.d.ts +0 -8
  66. package/types/auto/layout-group.d.ts +0 -16
  67. package/types/auto/morph.d.ts +0 -26
  68. package/types/auto/parallax.d.ts +0 -11
  69. package/types/auto.d.ts +0 -5
  70. package/types/core/link.d.ts +0 -12
  71. package/types/globals.d.ts +0 -90
  72. package/types/hooks/link.d.ts +0 -8
  73. package/types/hooks/path.d.ts +0 -9
  74. package/types/hooks/reduced-motions.d.ts +0 -4
  75. package/types/hooks/scroll.d.ts +0 -6
  76. package/types/hooks/unmount.d.ts +0 -10
  77. package/types/hooks.d.ts +0 -7
  78. package/types/index.d.ts +0 -4
@@ -1,19 +0,0 @@
1
- import { AnimationProperties } from '../globals';
2
- import { Animation } from './animation';
3
-
4
- interface ScaleOptions extends AnimationProperties {
5
-
6
- /**
7
- * The direction to scale the `element` up to.
8
- *
9
- * @default "right"
10
- */
11
- direction: 'up' | 'left' | 'down' | 'right';
12
- }
13
-
14
- /**
15
- * Scale the `element` along an axis over a duration of 0.6 seconds.
16
- *
17
- * @type {Animation}
18
- */
19
- export function Scale(options: ScaleOptions): this;
@@ -1,19 +0,0 @@
1
- import { Animation } from './animation';
2
- import { AnimationProperties } from '../globals';
3
-
4
- interface WipeOptions extends AnimationProperties {
5
-
6
- /**
7
- * The direction to wipe the `element` to.
8
- *
9
- * @default "right"
10
- */
11
- direction: 'up' | 'left' | 'down' | 'right';
12
- }
13
-
14
- /**
15
- * Wipe the `element` along an axis over a duration of 1 seconds.
16
- *
17
- * @type {Animation}
18
- */
19
- export function Wipe(options: WipeOptions): this;
@@ -1,8 +0,0 @@
1
- export as namespace Animations;
2
-
3
- export { Fade } from './animations/fade';
4
- export { Move } from './animations/move';
5
- export { Pop } from './animations/pop';
6
- export { Scale } from './animations/scale';
7
- export { Wipe } from './animations/wipe';
8
- export { Animation } from './animations/animation';
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
-
3
- interface LayoutGroupProps {
4
-
5
- /**
6
- * @default ['translate', 'scale', 'rotate', 'opacity', 'borderRadius', 'backgroundColor', 'color', 'zIndex', 'pointerEvents']
7
- */
8
- include?: string[];
9
-
10
- /**
11
- * @default []
12
- */
13
- exclude?: string[];
14
- }
15
-
16
- export class LayoutGroup extends React.Component<LayoutGroupProps> {}
@@ -1,26 +0,0 @@
1
- import React from 'react';
2
- import { AnimatableProps } from '../animatable';
3
-
4
- interface MorphProps extends AnimatableProps {
5
-
6
- /**
7
- * @default false
8
- */
9
- active?: boolean;
10
-
11
- /**
12
- * @default ['translate', 'scale', 'rotate', 'opacity', 'borderRadius', 'backgroundColor', 'color', 'zIndex', 'pointerEvents']
13
- */
14
- include?: string[];
15
-
16
- /**
17
- * @default []
18
- */
19
- exclude?: string[];
20
- }
21
-
22
- export class Morph extends React.Component<MorphProps> {
23
-
24
- private static cascadingProps;
25
-
26
- }
@@ -1,11 +0,0 @@
1
- import React from "react";
2
-
3
- interface ParallaxProps {
4
-
5
- /**
6
- * @default 0.5
7
- */
8
- amount?: number;
9
- }
10
-
11
- export const Parallax: React.FunctionComponent<ParallaxProps>;
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';