morphing-scroll 1.5.16 → 1.5.18

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 (2) hide show
  1. package/README.md +136 -197
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ![logo](https://drive.google.com/uc?export=view&id=1mpb5TAElX3Xla4sGFISp4bQMu0zuNJaa "logo")
2
2
 
3
- ##
3
+ <h2></h2>
4
4
 
5
5
  ### 〈♦ Table of contents 〉
6
6
 
@@ -11,13 +11,13 @@
11
11
  - [IntersectionTracker](#-intersectiontracker-)
12
12
  - [API](#-api-)
13
13
 
14
- ##
14
+ <h2></h2>
15
15
 
16
16
  ### 〈♦ About 〉
17
17
 
18
18
  `morphing-scroll` is a `React` library designed to optimize the rendering of data lists. It leverages virtual rendering and lazy loading to handle large datasets efficiently, significantly enhancing performance. The library also resolves cross-browser inconsistencies in scroll element rendering by replacing them with custom ones. Additionally, it provides convenient horizontal scrolling with flexible content movement options.
19
19
 
20
- ##
20
+ <h2></h2>
21
21
 
22
22
  ### 〈♦ Installation 〉
23
23
 
@@ -27,7 +27,7 @@ To install the library, use the following command:
27
27
  npm install morphing-scroll
28
28
  ```
29
29
 
30
- ##
30
+ <h2></h2>
31
31
 
32
32
  ### 〈♦ MorphScroll 〉
33
33
 
@@ -58,9 +58,7 @@ npm install morphing-scroll
58
58
 
59
59
  </ul>
60
60
  </details>
61
-
62
- ##
63
-
61
+ <h2></h2>
64
62
  <details>
65
63
  <summary><strong><code>children</code></strong> : <em>Custom user content.</em></summary><br />
66
64
  <ul>
@@ -83,8 +81,7 @@ npm install morphing-scroll
83
81
 
84
82
  </ul>
85
83
  </details>
86
-
87
- ##
84
+ <h2></h2>
88
85
 
89
86
  #### SCROLL SETTINGS:
90
87
 
@@ -113,9 +110,7 @@ npm install morphing-scroll
113
110
 
114
111
  </ul>
115
112
  </details>
116
-
117
- ##
118
-
113
+ <h2></h2>
119
114
  <details>
120
115
  <summary><strong><code>direction</code></strong> : <em>Scrolling direction.</em></summary><br />
121
116
  <ul>
@@ -140,9 +135,7 @@ npm install morphing-scroll
140
135
 
141
136
  </ul>
142
137
  </details>
143
-
144
- ##
145
-
138
+ <h2></h2>
146
139
  <details>
147
140
  <summary><strong><code>scrollTop</code></strong> : <em>Scroll position and animation duration.</em></summary><br />
148
141
  <ul>
@@ -178,9 +171,7 @@ npm install morphing-scroll
178
171
 
179
172
  </ul>
180
173
  </details>
181
-
182
- ##
183
-
174
+ <h2></h2>
184
175
  <details>
185
176
  <summary><strong><code>stopLoadOnScroll</code></strong> : <em>Stop loading when scrolling.</em></summary><br />
186
177
  <ul>
@@ -204,9 +195,7 @@ npm install morphing-scroll
204
195
 
205
196
  </ul>
206
197
  </details>
207
-
208
- ##
209
-
198
+ <h2></h2>
210
199
  <details>
211
200
  <summary><strong><code>onScrollValue</code></strong> : <em>Callback for scroll value.</em></summary><br />
212
201
  <ul>
@@ -233,9 +222,7 @@ npm install morphing-scroll
233
222
 
234
223
  </ul>
235
224
  </details>
236
-
237
- ##
238
-
225
+ <h2></h2>
239
226
  <details>
240
227
  <summary><strong><code>isScrolling</code></strong> : <em>Callback function for scroll status.</em></summary><br />
241
228
  <ul>
@@ -259,8 +246,7 @@ npm install morphing-scroll
259
246
 
260
247
  </ul>
261
248
  </details>
262
-
263
- ##
249
+ <h2></h2>
264
250
 
265
251
  #### VISUAL SETTINGS:
266
252
 
@@ -293,9 +279,7 @@ npm install morphing-scroll
293
279
 
294
280
  </ul>
295
281
  </details>
296
-
297
- ##
298
-
282
+ <h2></h2>
299
283
  <details>
300
284
  <summary><strong><code>objectsSize</code> (required)</strong> : <em>Required: Size of cells for each object.</em></summary><br />
301
285
  <ul>
@@ -326,9 +310,7 @@ npm install morphing-scroll
326
310
 
327
311
  </ul>
328
312
  </details>
329
-
330
- ##
331
-
313
+ <h2></h2>
332
314
  <details>
333
315
  <summary><strong><code>gap</code></strong> : <em>Gap between cells.</em></summary><br />
334
316
  <ul>
@@ -354,9 +336,7 @@ npm install morphing-scroll
354
336
 
355
337
  </ul>
356
338
  </details>
357
-
358
- ##
359
-
339
+ <h2></h2>
360
340
  <details>
361
341
  <summary><strong><code>padding</code></strong> : <em>Padding for the <code>objectsWrapper</code>.</em></summary><br />
362
342
  <ul>
@@ -393,9 +373,7 @@ npm install morphing-scroll
393
373
 
394
374
  </ul>
395
375
  </details>
396
-
397
- ##
398
-
376
+ <h2></h2>
399
377
  <details>
400
378
  <summary><strong><code>contentAlign</code></strong> : <em>Aligns the content when it is smaller than the MorphScroll <code>size</code>.</em></summary><br />
401
379
  <ul>
@@ -427,9 +405,7 @@ npm install morphing-scroll
427
405
 
428
406
  </ul>
429
407
  </details>
430
-
431
- ##
432
-
408
+ <h2></h2>
433
409
  <details>
434
410
  <summary><strong><code>elementsAlign</code></strong> : <em>Aligns the objects within the <code>objectsWrapper</code>.</em></summary><br />
435
411
  <ul>
@@ -448,9 +424,7 @@ npm install morphing-scroll
448
424
 
449
425
  </ul>
450
426
  </details>
451
-
452
- ##
453
-
427
+ <h2></h2>
454
428
  <details>
455
429
  <summary><strong><code>edgeGradient</code></strong> : <em>Gradient when scrolling overflows.</em></summary><br />
456
430
  <ul>
@@ -481,9 +455,7 @@ npm install morphing-scroll
481
455
 
482
456
  </ul>
483
457
  </details>
484
-
485
- ##
486
-
458
+ <h2></h2>
487
459
  <details>
488
460
  <summary><strong><code>progressReverse</code></strong> : <em>Reverse the progress bar position.</em></summary><br />
489
461
  <ul>
@@ -511,9 +483,7 @@ npm install morphing-scroll
511
483
 
512
484
  </ul>
513
485
  </details>
514
-
515
- ##
516
-
486
+ <h2></h2>
517
487
  <details>
518
488
  <summary><strong><code>progressVisibility</code></strong> : <em>Visibility of the progress bar.</em></summary><br />
519
489
  <ul>
@@ -537,9 +507,7 @@ npm install morphing-scroll
537
507
 
538
508
  </ul>
539
509
  </details>
540
-
541
- ##
542
-
510
+ <h2></h2>
543
511
  <details>
544
512
  <summary><strong><code>objectsWrapFullMinSize</code></strong> : <em>Sets the <code>min-height</code> CSS property of the <code>objectsWrapper</code> to match the height of the MorphScroll.</em></summary><br />
545
513
  <ul>
@@ -561,8 +529,7 @@ npm install morphing-scroll
561
529
 
562
530
  </ul>
563
531
  </details>
564
-
565
- ##
532
+ <h2></h2>
566
533
 
567
534
  #### PROGRESS AND RENDERING:
568
535
 
@@ -604,9 +571,7 @@ npm install morphing-scroll
604
571
 
605
572
  </ul>
606
573
  </details>
607
-
608
- ##
609
-
574
+ <h2></h2>
610
575
  <details>
611
576
  <summary><strong><code>render</code></strong> : <em>Types of rendering for optimization.</em></summary><br />
612
577
  <ul>
@@ -657,9 +622,7 @@ npm install morphing-scroll
657
622
 
658
623
  </ul>
659
624
  </details>
660
-
661
- ##
662
-
625
+ <h2></h2>
663
626
  <details>
664
627
  <summary><strong><code>emptyElements</code></strong> : <em>Handling of empty scroll elements.</em></summary><br />
665
628
  <ul>
@@ -709,9 +672,7 @@ npm install morphing-scroll
709
672
 
710
673
  </ul>
711
674
  </details>
712
-
713
- ##
714
-
675
+ <h2></h2>
715
676
  <details>
716
677
  <summary><strong><code>suspending</code></strong> : <em>Adds React Suspense.</em></summary><br />
717
678
  <ul>
@@ -724,20 +685,18 @@ npm install morphing-scroll
724
685
  <br />
725
686
  <strong>Example:</strong>
726
687
 
727
- ```tsx
728
- <MorphScroll
729
- suspending
730
- // another props
731
- >
732
- {children}
733
- </MorphScroll>
734
- ```
688
+ ```tsx
689
+ <MorphScroll
690
+ suspending
691
+ // another props
692
+ >
693
+ {children}
694
+ </MorphScroll>
695
+ ```
735
696
 
736
697
  </ul>
737
698
  </details>
738
-
739
- ##
740
-
699
+ <h2></h2>
741
700
  <details>
742
701
  <summary><strong><code>fallback</code></strong> : <em>Fallback element.</em></summary><br />
743
702
  <ul>
@@ -748,19 +707,19 @@ npm install morphing-scroll
748
707
  <br />
749
708
  <strong>Example:</strong>
750
709
 
751
- ```tsx
752
- <MorphScroll
753
- fallback={<div>Loading...</div>}
754
- // another props
755
- >
756
- {children}
757
- </MorphScroll>
758
- ```
710
+ ```tsx
711
+ <MorphScroll
712
+ fallback={<div>Loading...</div>}
713
+ // another props
714
+ >
715
+ {children}
716
+ </MorphScroll>
717
+ ```
759
718
 
760
719
  </ul>
761
720
  </details>
762
721
 
763
- ##
722
+ <h2></h2>
764
723
 
765
724
  ### 〈♦ ResizeTracker 〉
766
725
 
@@ -792,24 +751,22 @@ npm install morphing-scroll
792
751
  <br />
793
752
  <strong>Example:</strong>
794
753
 
795
- ```tsx
796
- <ResizeTracker
797
- // another props
798
- >
799
- {(rect) => (
800
- <p>
801
- Width: {rect.width}, Height: {rect.height}
802
- </p>
803
- )}
804
- </ResizeTracker>
805
- ```
754
+ ```tsx
755
+ <ResizeTracker
756
+ // another props
757
+ >
758
+ {(rect) => (
759
+ <p>
760
+ Width: {rect.width}, Height: {rect.height}
761
+ </p>
762
+ )}
763
+ </ResizeTracker>
764
+ ```
806
765
 
807
766
  </ul>
808
767
 
809
768
  </details>
810
-
811
- ##
812
-
769
+ <h2></h2>
813
770
  <details>
814
771
  <summary><strong><code>style</code></strong> : <em>Applies inline styles to the container.</em></summary><br />
815
772
  <ul>
@@ -817,20 +774,18 @@ npm install morphing-scroll
817
774
  <br />
818
775
  <strong>Example:</strong>
819
776
 
820
- ```tsx
821
- <ResizeTracker style={{ backgroundColor: "blue" }}>
822
- {(rect) => (
823
- // content
824
- )}
825
- </ResizeTracker>
826
- ```
777
+ ```tsx
778
+ <ResizeTracker style={{ backgroundColor: "blue" }}>
779
+ {(rect) => (
780
+ // content
781
+ )}
782
+ </ResizeTracker>
783
+ ```
827
784
 
828
785
  </ul>
829
786
 
830
787
  </details>
831
-
832
- ##
833
-
788
+ <h2></h2>
834
789
  <details>
835
790
  <summary><strong><code>measure</code></strong> : <em>Defines the measurement strategy.</em></summary><br />
836
791
  <ul>
@@ -849,20 +804,18 @@ npm install morphing-scroll
849
804
  <br />
850
805
  <strong>Example:</strong>
851
806
 
852
- ```tsx
853
- <ResizeTracker measure="all">
854
- {(rect) => (
855
- // content
856
- )}
857
- </ResizeTracker>
858
- ```
807
+ ```tsx
808
+ <ResizeTracker measure="all">
809
+ {(rect) => (
810
+ // content
811
+ )}
812
+ </ResizeTracker>
813
+ ```
859
814
 
860
815
  </ul>
861
816
 
862
817
  </details>
863
-
864
- ##
865
-
818
+ <h2></h2>
866
819
  <details>
867
820
  <summary><strong><code>onResize</code></strong> : <em>Callback triggered on size changes.</em></summary><br />
868
821
  <ul>
@@ -874,29 +827,28 @@ npm install morphing-scroll
874
827
  <br />
875
828
  <strong>Example:</strong>
876
829
 
877
- ```tsx
878
- <ResizeTracker
879
- onResize={(rect) => {
880
- console.log("New size:", rect);
881
- }}
882
- >
883
- {(rect) => (
884
- // content
885
- )}
886
- </ResizeTracker>
887
- ```
830
+ ```tsx
831
+ <ResizeTracker
832
+ onResize={(rect) => {
833
+ console.log("New size:", rect);
834
+ }}
835
+ >
836
+ {(rect) => (
837
+ // content
838
+ )}
839
+ </ResizeTracker>
840
+ ```
888
841
 
889
842
  </ul>
890
843
 
891
844
  </details>
892
-
893
- ##
845
+ <h2></h2>
894
846
 
895
847
  - ### Link:
896
848
 
897
849
  [IntersectionObserver](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)
898
850
 
899
- ##
851
+ <h2></h2>
900
852
 
901
853
  ### 〈♦ IntersectionTracker 〉
902
854
 
@@ -911,16 +863,14 @@ npm install morphing-scroll
911
863
  <br />
912
864
  <strong>Example:</strong>
913
865
 
914
- ```tsx
915
- <IntersectionTracker>{children}</IntersectionTracker>
916
- ```
866
+ ```tsx
867
+ <IntersectionTracker>{children}</IntersectionTracker>
868
+ ```
917
869
 
918
870
  </ul>
919
871
 
920
872
  </details>
921
-
922
- ##
923
-
873
+ <h2></h2>
924
874
  <details>
925
875
  <summary><strong><code>style</code></strong> : <em>Applies inline styles to the container.</em></summary><br />
926
876
  <ul>
@@ -928,18 +878,16 @@ npm install morphing-scroll
928
878
  <br />
929
879
  <strong>Example:</strong>
930
880
 
931
- ```tsx
932
- <IntersectionTracker style={{ backgroundColor: "blue" }}>
933
- {children}
934
- </IntersectionTracker>
935
- ```
881
+ ```tsx
882
+ <IntersectionTracker style={{ backgroundColor: "blue" }}>
883
+ {children}
884
+ </IntersectionTracker>
885
+ ```
936
886
 
937
887
  </ul>
938
888
 
939
889
  </details>
940
-
941
- ##
942
-
890
+ <h2></h2>
943
891
  <details>
944
892
  <summary><strong><code>root</code></strong> : <em>Defines the observation area.</em></summary><br />
945
893
  <ul>
@@ -955,18 +903,16 @@ npm install morphing-scroll
955
903
  <br />
956
904
  <strong>Example:</strong>
957
905
 
958
- ```tsx
959
- <IntersectionTracker root={document.getElementById("root")}>
960
- {children}
961
- </IntersectionTracker>
962
- ```
906
+ ```tsx
907
+ <IntersectionTracker root={document.getElementById("root")}>
908
+ {children}
909
+ </IntersectionTracker>
910
+ ```
963
911
 
964
912
  </ul>
965
913
 
966
914
  </details>
967
-
968
- ##
969
-
915
+ <h2></h2>
970
916
  <details>
971
917
  <summary><strong><code>rootMargin</code></strong> : <em>Sets the margin around the root element.</em></summary><br />
972
918
  <ul>
@@ -986,22 +932,20 @@ npm install morphing-scroll
986
932
  <br />
987
933
  <strong>Example:</strong>
988
934
 
989
- ```tsx
990
- <IntersectionTracker
991
- rootMargin={10}
992
- // rootMargin={[10, 20]}
993
- // rootMargin={[10, 20, 10, 20]}
994
- >
995
- {children}
996
- </IntersectionTracker>
997
- ```
935
+ ```tsx
936
+ <IntersectionTracker
937
+ rootMargin={10}
938
+ // rootMargin={[10, 20]}
939
+ // rootMargin={[10, 20, 10, 20]}
940
+ >
941
+ {children}
942
+ </IntersectionTracker>
943
+ ```
998
944
 
999
945
  </ul>
1000
946
 
1001
947
  </details>
1002
-
1003
- ##
1004
-
948
+ <h2></h2>
1005
949
  <details>
1006
950
  <summary><strong><code>threshold</code></strong> : <em>Defines when the callback is triggered.</em></summary><br />
1007
951
  <ul>
@@ -1019,21 +963,19 @@ npm install morphing-scroll
1019
963
  <br />
1020
964
  <strong>Example:</strong>
1021
965
 
1022
- ```tsx
1023
- <IntersectionTracker
1024
- threshold={0.5}
1025
- // threshold={[0, 0.5, 1]}
1026
- >
1027
- {children}
1028
- </IntersectionTracker>
1029
- ```
966
+ ```tsx
967
+ <IntersectionTracker
968
+ threshold={0.5}
969
+ // threshold={[0, 0.5, 1]}
970
+ >
971
+ {children}
972
+ </IntersectionTracker>
973
+ ```
1030
974
 
1031
975
  </ul>
1032
976
 
1033
977
  </details>
1034
-
1035
- ##
1036
-
978
+ <h2></h2>
1037
979
  <details>
1038
980
  <summary><strong><code>visibleContent</code></strong> : <em>Makes all elements always visible.</em></summary><br />
1039
981
  <ul>
@@ -1048,16 +990,14 @@ npm install morphing-scroll
1048
990
  <br />
1049
991
  <strong>Example:</strong>
1050
992
 
1051
- ```tsx
1052
- <IntersectionTracker visibleContent>{children}</IntersectionTracker>
1053
- ```
993
+ ```tsx
994
+ <IntersectionTracker visibleContent>{children}</IntersectionTracker>
995
+ ```
1054
996
 
1055
997
  </ul>
1056
998
 
1057
999
  </details>
1058
-
1059
- ##
1060
-
1000
+ <h2></h2>
1061
1001
  <details>
1062
1002
  <summary><strong><code>onVisible</code></strong> : <em>Callback function triggered when the element becomes visible.</em></summary><br />
1063
1003
  <ul>
@@ -1074,29 +1014,28 @@ npm install morphing-scroll
1074
1014
  <br />
1075
1015
  <strong>Example:</strong>
1076
1016
 
1077
- ```tsx
1078
- <IntersectionTracker
1079
- onVisible={(key) => {
1080
- if (key.includes("elementId")) {
1081
- // do something
1082
- }
1083
- }}
1084
- >
1085
- {children}
1086
- </IntersectionTracker>
1087
- ```
1017
+ ```tsx
1018
+ <IntersectionTracker
1019
+ onVisible={(key) => {
1020
+ if (key.includes("elementId")) {
1021
+ // do something
1022
+ }
1023
+ }}
1024
+ >
1025
+ {children}
1026
+ </IntersectionTracker>
1027
+ ```
1088
1028
 
1089
1029
  </ul>
1090
1030
 
1091
1031
  </details>
1092
-
1093
- ##
1032
+ <h2></h2>
1094
1033
 
1095
1034
  - ### Link:
1096
1035
 
1097
1036
  [IntersectionObserver](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API)
1098
1037
 
1099
- ##
1038
+ <h2></h2>
1100
1039
 
1101
1040
  ### 〈♦ API 〉
1102
1041
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "morphing-scroll",
3
- "version": "1.5.16",
3
+ "version": "1.5.18",
4
4
  "description": "Library for using various methods of scrolling objects〈♦〉",
5
5
  "author": "Georg Schilin",
6
6
  "license": "MIT",