morphing-scroll 2.5.3 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +546 -429
- package/cjs/index.js +1 -1
- package/esm/index.js +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +97 -50
- package/types/intersectionTracker.d.ts +27 -31
- package/types/morphScroll.d.ts +157 -165
- package/types/resizeTracker.d.ts +17 -21
package/types/resizeTracker.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
type ResizeTrackerT = {
|
|
2
2
|
/**---
|
|
3
|
-
* 
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* ## 
|
|
4
|
+
* ### ***className***:
|
|
5
|
+
* set a custom class name.
|
|
6
6
|
* @example
|
|
7
7
|
* ```tsx
|
|
8
8
|
* <ResizeTracker
|
|
@@ -14,9 +14,9 @@ type ResizeTrackerT = {
|
|
|
14
14
|
*/
|
|
15
15
|
className?: string;
|
|
16
16
|
/**---
|
|
17
|
-
* 
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* ## 
|
|
18
|
+
* ### ***children***:
|
|
19
|
+
* add custom user content.
|
|
20
20
|
* @example
|
|
21
21
|
* ```tsx
|
|
22
22
|
* <ResizeTracker>
|
|
@@ -26,9 +26,9 @@ type ResizeTrackerT = {
|
|
|
26
26
|
* */
|
|
27
27
|
children: React.ReactNode;
|
|
28
28
|
/**---
|
|
29
|
-
* 
|
|
30
|
-
*
|
|
31
|
-
*
|
|
29
|
+
* ## 
|
|
30
|
+
* ### ***style***:
|
|
31
|
+
* set custom inline styles.
|
|
32
32
|
* @example
|
|
33
33
|
* ```tsx
|
|
34
34
|
* <ResizeTracker
|
|
@@ -40,16 +40,14 @@ type ResizeTrackerT = {
|
|
|
40
40
|
*/
|
|
41
41
|
style?: React.CSSProperties;
|
|
42
42
|
/**---
|
|
43
|
-
* 
|
|
44
|
-
*
|
|
45
|
-
*
|
|
43
|
+
* ## 
|
|
44
|
+
* ### ***measure***:
|
|
45
|
+
* defines size measurement behavior.
|
|
46
46
|
* @description
|
|
47
47
|
* - `inner`: *Fits content*
|
|
48
48
|
* - `outer`: *Fills parent*
|
|
49
49
|
* - `all`: *Combines both*
|
|
50
|
-
*
|
|
51
50
|
* @default "inner"
|
|
52
|
-
*
|
|
53
51
|
* @example
|
|
54
52
|
* ```tsx
|
|
55
53
|
* <ResizeTracker
|
|
@@ -61,16 +59,14 @@ type ResizeTrackerT = {
|
|
|
61
59
|
*/
|
|
62
60
|
measure?: "inner" | "outer" | "all";
|
|
63
61
|
/**---
|
|
64
|
-
* 
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* @
|
|
68
|
-
* *`rect` is the dimensions of the container*
|
|
69
|
-
*
|
|
62
|
+
* ## 
|
|
63
|
+
* ### ***onResize***:
|
|
64
|
+
* callback on dimension change.
|
|
65
|
+
* @param rect is the dimensions of the container.
|
|
70
66
|
* @example
|
|
71
67
|
* ```tsx
|
|
72
68
|
* <ResizeTracker
|
|
73
|
-
* onResize={(rect) => console.log(rect)}
|
|
69
|
+
* onResize={(rect) => console.log("Resized:", rect)}
|
|
74
70
|
* >
|
|
75
71
|
* {children}
|
|
76
72
|
* </ResizeTracker>
|