@wix/interact 2.1.4 → 2.2.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 (84) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/cjs/react.js +1 -1
  3. package/dist/cjs/web.js +1 -1
  4. package/dist/cjs/web.js.map +1 -1
  5. package/dist/es/index.js +1 -1
  6. package/dist/es/react.js +2 -2
  7. package/dist/es/web.js +15 -15
  8. package/dist/es/web.js.map +1 -1
  9. package/dist/index-C0nIxDnf.js +18 -0
  10. package/dist/index-C0nIxDnf.js.map +1 -0
  11. package/dist/{index-DHqlFmW8.mjs → index-CJl_iRUI.mjs} +495 -487
  12. package/dist/index-CJl_iRUI.mjs.map +1 -0
  13. package/dist/tsconfig.build.tsbuildinfo +1 -1
  14. package/dist/types/core/Interact.d.ts +2 -2
  15. package/dist/types/core/Interact.d.ts.map +1 -1
  16. package/dist/types/core/InteractionController.d.ts +2 -2
  17. package/dist/types/core/InteractionController.d.ts.map +1 -1
  18. package/dist/types/core/add.d.ts.map +1 -1
  19. package/dist/types/core/css.d.ts.map +1 -1
  20. package/dist/types/handlers/effectHandlers.d.ts +4 -4
  21. package/dist/types/handlers/effectHandlers.d.ts.map +1 -1
  22. package/dist/types/handlers/eventTrigger.d.ts +2 -2
  23. package/dist/types/handlers/eventTrigger.d.ts.map +1 -1
  24. package/dist/types/handlers/index.d.ts.map +1 -1
  25. package/dist/types/handlers/viewEnter.d.ts.map +1 -1
  26. package/dist/types/index.d.ts +1 -1
  27. package/dist/types/index.d.ts.map +1 -1
  28. package/dist/types/react/index.d.ts +1 -1
  29. package/dist/types/react/index.d.ts.map +1 -1
  30. package/dist/types/types/config.d.ts +47 -0
  31. package/dist/types/types/config.d.ts.map +1 -0
  32. package/dist/types/types/controller.d.ts +34 -0
  33. package/dist/types/types/controller.d.ts.map +1 -0
  34. package/dist/types/types/effects.d.ts +75 -0
  35. package/dist/types/types/effects.d.ts.map +1 -0
  36. package/dist/types/types/external.d.ts +6 -0
  37. package/dist/types/types/external.d.ts.map +1 -0
  38. package/dist/types/types/global.d.ts +11 -0
  39. package/dist/types/types/global.d.ts.map +1 -0
  40. package/dist/types/types/handlers.d.ts +41 -0
  41. package/dist/types/types/handlers.d.ts.map +1 -0
  42. package/dist/types/types/index.d.ts +8 -0
  43. package/dist/types/types/index.d.ts.map +1 -0
  44. package/dist/types/types/internal.d.ts +36 -0
  45. package/dist/types/types/internal.d.ts.map +1 -0
  46. package/dist/types/types/triggers.d.ts +28 -0
  47. package/dist/types/types/triggers.d.ts.map +1 -0
  48. package/dist/types/web/InteractElement.d.ts +2 -2
  49. package/dist/types/web/InteractElement.d.ts.map +1 -1
  50. package/dist/types/web/index.d.ts +1 -1
  51. package/dist/types/web/index.d.ts.map +1 -1
  52. package/docs/api/README.md +2 -3
  53. package/docs/api/functions.md +4 -4
  54. package/docs/api/interact-class.md +2 -3
  55. package/docs/api/interact-element.md +2 -2
  56. package/docs/api/interaction-controller.md +4 -4
  57. package/docs/api/types.md +38 -69
  58. package/docs/examples/README.md +1 -1
  59. package/docs/examples/click-interactions.md +0 -7
  60. package/docs/examples/entrance-animations.md +28 -27
  61. package/docs/examples/list-patterns.md +17 -16
  62. package/docs/guides/conditions-and-media-queries.md +2 -3
  63. package/docs/guides/configuration-structure.md +5 -7
  64. package/docs/guides/effects-and-animations.md +2 -4
  65. package/docs/guides/getting-started.md +0 -1
  66. package/docs/guides/lists-and-dynamic-content.md +10 -9
  67. package/docs/guides/sequences.md +3 -4
  68. package/docs/guides/state-management.md +0 -2
  69. package/docs/guides/understanding-triggers.md +9 -13
  70. package/package.json +2 -2
  71. package/rules/click.md +96 -560
  72. package/rules/full-lean.md +546 -359
  73. package/rules/hover.md +107 -530
  74. package/rules/integration.md +222 -261
  75. package/rules/pointermove.md +154 -1407
  76. package/rules/viewenter.md +128 -863
  77. package/rules/viewprogress.md +88 -322
  78. package/dist/index-DHqlFmW8.mjs.map +0 -1
  79. package/dist/index-DYEvpIGz.js +0 -18
  80. package/dist/index-DYEvpIGz.js.map +0 -1
  81. package/dist/types/types.d.ts +0 -256
  82. package/dist/types/types.d.ts.map +0 -1
  83. package/rules/MASTER-CLEANUP-PLAN.md +0 -286
  84. package/rules/scroll-list.md +0 -748
@@ -26,7 +26,7 @@ const config = {
26
26
  {
27
27
  key: 'content',
28
28
  trigger: 'viewEnter',
29
- params: { type: 'once', threshold: 0.2 },
29
+ params: { threshold: 0.2 },
30
30
  effects: [
31
31
  {
32
32
  key: 'content',
@@ -62,7 +62,7 @@ Add a delay for dramatic timing.
62
62
  {
63
63
  key: 'delayed-content',
64
64
  trigger: 'viewEnter',
65
- params: { type: 'once', threshold: 0.2 },
65
+ params: { threshold: 0.2 },
66
66
  effects: [{
67
67
  key: 'delayed-content',
68
68
  keyframeEffect: {
@@ -87,9 +87,10 @@ Trigger animation every time element enters viewport.
87
87
  {
88
88
  key: 'repeating-element',
89
89
  trigger: 'viewEnter',
90
- params: { type: 'repeat', threshold: 0.3 }, // Repeat on each entry
90
+ params: { threshold: 0.3 },
91
91
  effects: [{
92
92
  key: 'repeating-element',
93
+ triggerType: 'repeat',
93
94
  keyframeEffect: {
94
95
  name: 'repeat-fade',
95
96
  keyframes: [
@@ -113,7 +114,7 @@ Element slides up from below while fading in.
113
114
  {
114
115
  key: 'slide-up',
115
116
  trigger: 'viewEnter',
116
- params: { type: 'once', threshold: 0.2 },
117
+ params: { threshold: 0.2 },
117
118
  effects: [{
118
119
  key: 'slide-up',
119
120
  keyframeEffect: {
@@ -137,7 +138,7 @@ Element slides down from above.
137
138
  {
138
139
  key: 'slide-down',
139
140
  trigger: 'viewEnter',
140
- params: { type: 'once', threshold: 0.2 },
141
+ params: { threshold: 0.2 },
141
142
  effects: [{
142
143
  key: 'slide-down',
143
144
  keyframeEffect: {
@@ -161,7 +162,7 @@ Element slides in from the left side.
161
162
  {
162
163
  key: 'slide-left',
163
164
  trigger: 'viewEnter',
164
- params: { type: 'once', threshold: 0.2 },
165
+ params: { threshold: 0.2 },
165
166
  effects: [{
166
167
  key: 'slide-left',
167
168
  keyframeEffect: {
@@ -185,7 +186,7 @@ Element slides in from the right side.
185
186
  {
186
187
  key: 'slide-right',
187
188
  trigger: 'viewEnter',
188
- params: { type: 'once', threshold: 0.2 },
189
+ params: { threshold: 0.2 },
189
190
  effects: [{
190
191
  key: 'slide-right',
191
192
  keyframeEffect: {
@@ -211,7 +212,7 @@ Element grows from small to full size.
211
212
  {
212
213
  key: 'scale-up',
213
214
  trigger: 'viewEnter',
214
- params: { type: 'once', threshold: 0.2 },
215
+ params: { threshold: 0.2 },
215
216
  effects: [{
216
217
  key: 'scale-up',
217
218
  keyframeEffect: {
@@ -235,7 +236,7 @@ Element shrinks from large to normal size.
235
236
  {
236
237
  key: 'scale-down',
237
238
  trigger: 'viewEnter',
238
- params: { type: 'once', threshold: 0.2 },
239
+ params: { threshold: 0.2 },
239
240
  effects: [{
240
241
  key: 'scale-down',
241
242
  keyframeEffect: {
@@ -259,7 +260,7 @@ Element bounces into view with elastic scaling.
259
260
  {
260
261
  key: 'bounce-in',
261
262
  trigger: 'viewEnter',
262
- params: { type: 'once', threshold: 0.2 },
263
+ params: { threshold: 0.2 },
263
264
  effects: [{
264
265
  key: 'bounce-in',
265
266
  keyframeEffect: {
@@ -287,7 +288,7 @@ Element rotates as it enters.
287
288
  {
288
289
  key: 'rotate-in',
289
290
  trigger: 'viewEnter',
290
- params: { type: 'once', threshold: 0.2 },
291
+ params: { threshold: 0.2 },
291
292
  effects: [{
292
293
  key: 'rotate-in',
293
294
  keyframeEffect: {
@@ -311,7 +312,7 @@ Element flips on the Y-axis.
311
312
  {
312
313
  key: 'flip-in',
313
314
  trigger: 'viewEnter',
314
- params: { type: 'once', threshold: 0.2 },
315
+ params: { threshold: 0.2 },
315
316
  effects: [{
316
317
  key: 'flip-in',
317
318
  keyframeEffect: {
@@ -335,7 +336,7 @@ Element rotates in 3D space.
335
336
  {
336
337
  key: 'rotate-3d',
337
338
  trigger: 'viewEnter',
338
- params: { type: 'once', threshold: 0.2 },
339
+ params: { threshold: 0.2 },
339
340
  effects: [{
340
341
  key: 'rotate-3d',
341
342
  keyframeEffect: {
@@ -367,7 +368,7 @@ Combine multiple transformations for rich effects.
367
368
  {
368
369
  key: 'combo',
369
370
  trigger: 'viewEnter',
370
- params: { type: 'once', threshold: 0.2 },
371
+ params: { threshold: 0.2 },
371
372
  effects: [{
372
373
  key: 'combo',
373
374
  keyframeEffect: {
@@ -397,7 +398,7 @@ Element transitions from blurred to sharp.
397
398
  {
398
399
  key: 'blur-focus',
399
400
  trigger: 'viewEnter',
400
- params: { type: 'once', threshold: 0.2 },
401
+ params: { threshold: 0.2 },
401
402
  effects: [{
402
403
  key: 'blur-focus',
403
404
  keyframeEffect: {
@@ -429,7 +430,7 @@ Element slides and rotates simultaneously.
429
430
  {
430
431
  key: 'slide-rotate',
431
432
  trigger: 'viewEnter',
432
- params: { type: 'once', threshold: 0.2 },
433
+ params: { threshold: 0.2 },
433
434
  effects: [{
434
435
  key: 'slide-rotate',
435
436
  keyframeEffect: {
@@ -464,7 +465,7 @@ const config = {
464
465
  {
465
466
  key: 'hero-title',
466
467
  trigger: 'viewEnter',
467
- params: { type: 'once', threshold: 0.3 },
468
+ params: { threshold: 0.3 },
468
469
  effects: [
469
470
  {
470
471
  key: 'hero-title',
@@ -551,7 +552,7 @@ const config = {
551
552
  {
552
553
  key: 'feature-1',
553
554
  trigger: 'viewEnter',
554
- params: { type: 'once', threshold: 0.2 },
555
+ params: { threshold: 0.2 },
555
556
  effects: [
556
557
  {
557
558
  key: 'feature-1',
@@ -571,7 +572,7 @@ const config = {
571
572
  {
572
573
  key: 'feature-2',
573
574
  trigger: 'viewEnter',
574
- params: { type: 'once', threshold: 0.2 },
575
+ params: { threshold: 0.2 },
575
576
  effects: [
576
577
  {
577
578
  key: 'feature-2',
@@ -591,7 +592,7 @@ const config = {
591
592
  {
592
593
  key: 'feature-3',
593
594
  trigger: 'viewEnter',
594
- params: { type: 'once', threshold: 0.2 },
595
+ params: { threshold: 0.2 },
595
596
  effects: [
596
597
  {
597
598
  key: 'feature-3',
@@ -625,7 +626,7 @@ const heroConfig = {
625
626
  {
626
627
  key: 'hero-bg',
627
628
  trigger: 'viewEnter',
628
- params: { type: 'once', threshold: 0.1 },
629
+ params: { threshold: 0.1 },
629
630
  effects: [
630
631
  {
631
632
  key: 'hero-bg',
@@ -645,7 +646,7 @@ const heroConfig = {
645
646
  {
646
647
  key: 'hero-content',
647
648
  trigger: 'viewEnter',
648
- params: { type: 'once', threshold: 0.2 },
649
+ params: { threshold: 0.2 },
649
650
  effects: [
650
651
  {
651
652
  key: 'hero-title',
@@ -667,7 +668,7 @@ const heroConfig = {
667
668
  {
668
669
  key: 'hero-content',
669
670
  trigger: 'viewEnter',
670
- params: { type: 'once', threshold: 0.2 },
671
+ params: { threshold: 0.2 },
671
672
  effects: [
672
673
  {
673
674
  key: 'hero-content',
@@ -689,7 +690,7 @@ const heroConfig = {
689
690
  {
690
691
  key: 'hero-content',
691
692
  trigger: 'viewEnter',
692
- params: { type: 'once', threshold: 0.2 },
693
+ params: { threshold: 0.2 },
693
694
  effects: [
694
695
  {
695
696
  key: 'hero-content',
@@ -738,7 +739,7 @@ const featureConfig = {
738
739
  key: 'features',
739
740
  listContainer: '.feature-grid',
740
741
  trigger: 'viewEnter',
741
- params: { type: 'once', threshold: 0.15 },
742
+ params: { threshold: 0.15 },
742
743
  effects: [
743
744
  {
744
745
  key: 'features',
@@ -807,7 +808,7 @@ const testimonialConfig = {
807
808
  key: 'testimonials',
808
809
  listContainer: '.testimonial-list',
809
810
  trigger: 'viewEnter',
810
- params: { type: 'once', threshold: 0.2 },
811
+ params: { threshold: 0.2 },
811
812
  effects: [
812
813
  {
813
814
  key: 'testimonials',
@@ -865,7 +866,7 @@ const config = {
865
866
  {
866
867
  key: 'hero',
867
868
  trigger: 'viewEnter',
868
- params: { type: 'once', threshold: 0.2 },
869
+ params: { threshold: 0.2 },
869
870
  effects: [
870
871
  {
871
872
  keyframeEffect: {
@@ -29,7 +29,7 @@ const config = {
29
29
  key: 'item-list',
30
30
  listContainer: '.items',
31
31
  trigger: 'viewEnter',
32
- params: { type: 'once', threshold: 0.1 },
32
+ params: { threshold: 0.1 },
33
33
  effects: [
34
34
  {
35
35
  key: 'item-list',
@@ -70,7 +70,7 @@ const config = {
70
70
  key: 'features',
71
71
  listContainer: '.feature-list',
72
72
  trigger: 'viewEnter',
73
- params: { type: 'once', threshold: 0.2 },
73
+ params: { threshold: 0.2 },
74
74
  effects: [
75
75
  {
76
76
  key: 'features',
@@ -121,7 +121,7 @@ const config = {
121
121
  key: 'cards',
122
122
  listContainer: '.card-grid',
123
123
  trigger: 'viewEnter',
124
- params: { type: 'once', threshold: 0.15 },
124
+ params: { threshold: 0.15 },
125
125
  effects: [
126
126
  {
127
127
  key: 'cards',
@@ -153,7 +153,7 @@ const config = {
153
153
  key: 'photos',
154
154
  listContainer: '.photo-grid',
155
155
  trigger: 'viewEnter',
156
- params: { type: 'once', threshold: 0.1 },
156
+ params: { threshold: 0.1 },
157
157
  effects: [
158
158
  {
159
159
  key: 'photos',
@@ -185,7 +185,7 @@ const config = {
185
185
  key: 'timeline',
186
186
  listContainer: '.timeline-items',
187
187
  trigger: 'viewEnter',
188
- params: { type: 'once', threshold: 0.2 },
188
+ params: { threshold: 0.2 },
189
189
  effects: [
190
190
  {
191
191
  key: 'timeline',
@@ -228,7 +228,7 @@ const config = {
228
228
  key: 'stagger-list',
229
229
  listContainer: '.items',
230
230
  trigger: 'viewEnter',
231
- params: { type: 'once', threshold: 0.1 },
231
+ params: { threshold: 0.1 },
232
232
  effects: [
233
233
  {
234
234
  key: 'stagger-list',
@@ -279,7 +279,7 @@ const config = {
279
279
  key: 'wave',
280
280
  listContainer: '.wave-list',
281
281
  trigger: 'viewEnter',
282
- params: { type: 'once', threshold: 0.15 },
282
+ params: { threshold: 0.15 },
283
283
  effects: [
284
284
  {
285
285
  key: 'wave',
@@ -317,7 +317,7 @@ const config = {
317
317
  key: 'ripple',
318
318
  listContainer: '.grid',
319
319
  trigger: 'viewEnter',
320
- params: { type: 'once', threshold: 0.2 },
320
+ params: { threshold: 0.2 },
321
321
  effects: [
322
322
  {
323
323
  key: 'ripple',
@@ -495,11 +495,11 @@ const config = {
495
495
  key: 'todo-list',
496
496
  listContainer: '.todos',
497
497
  trigger: 'viewEnter',
498
- params: { type: 'repeat' }, // Trigger for each new item
499
498
  effects: [
500
499
  {
501
500
  key: 'todo-list',
502
501
  listContainer: '.todos',
502
+ triggerType: 'repeat',
503
503
  keyframeEffect: {
504
504
  name: 'add-item',
505
505
  keyframes: [
@@ -545,11 +545,11 @@ const config = {
545
545
  key: 'cart',
546
546
  listContainer: '.cart-items',
547
547
  trigger: 'viewEnter',
548
- params: { type: 'repeat' },
549
548
  effects: [
550
549
  {
551
550
  key: 'cart',
552
551
  listContainer: '.cart-items',
552
+ triggerType: 'repeat',
553
553
  keyframeEffect: {
554
554
  name: 'cart-add',
555
555
  keyframes: [
@@ -583,11 +583,12 @@ const config = {
583
583
  key: 'infinite',
584
584
  listContainer: '.infinite-list',
585
585
  trigger: 'viewEnter',
586
- params: { type: 'repeat', threshold: 0.1 },
586
+ params: { threshold: 0.1 },
587
587
  effects: [
588
588
  {
589
589
  key: 'infinite',
590
590
  listContainer: '.infinite-list',
591
+ triggerType: 'repeat',
591
592
  keyframeEffect: {
592
593
  name: 'scroll-fade',
593
594
  keyframes: [
@@ -660,7 +661,7 @@ const config = {
660
661
  listContainer: '.responsive-grid',
661
662
  trigger: 'viewEnter',
662
663
  conditions: ['mobile'],
663
- params: { type: 'once', threshold: 0.1 },
664
+ params: { threshold: 0.1 },
664
665
  effects: [
665
666
  {
666
667
  key: 'grid',
@@ -679,7 +680,7 @@ const config = {
679
680
  listContainer: '.responsive-grid',
680
681
  trigger: 'viewEnter',
681
682
  conditions: ['desktop'],
682
- params: { type: 'once', threshold: 0.15 },
683
+ params: { threshold: 0.15 },
683
684
  effects: [
684
685
  {
685
686
  key: 'grid',
@@ -714,7 +715,7 @@ const config = {
714
715
  key: 'products',
715
716
  listContainer: '.product-grid',
716
717
  trigger: 'viewEnter',
717
- params: { type: 'once', threshold: 0.1 },
718
+ params: { threshold: 0.1 },
718
719
  effects: [
719
720
  {
720
721
  key: 'products',
@@ -813,7 +814,7 @@ const config = {
813
814
  key: 'cards',
814
815
  trigger: 'viewEnter',
815
816
  listContainer: '.card-grid',
816
- params: { type: 'once', threshold: 0.1 },
817
+ params: { threshold: 0.1 },
817
818
  sequences: [
818
819
  {
819
820
  offset: 80,
@@ -858,7 +859,6 @@ const config = {
858
859
  key: 'feed',
859
860
  trigger: 'viewEnter',
860
861
  listContainer: '.feed-items',
861
- params: { type: 'repeat' },
862
862
  sequences: [
863
863
  {
864
864
  offset: 60,
@@ -867,6 +867,7 @@ const config = {
867
867
  {
868
868
  key: 'feed',
869
869
  listContainer: '.feed-items',
870
+ triggerType: 'repeat',
870
871
  keyframeEffect: {
871
872
  name: 'feed-entrance',
872
873
  keyframes: [
@@ -230,7 +230,7 @@ const accessibleConfig: InteractConfig = {
230
230
  key: 'hero-title',
231
231
  trigger: 'viewEnter',
232
232
  conditions: ['motion-ok'],
233
- params: { type: 'once', threshold: 0.3 },
233
+ params: { threshold: 0.3 },
234
234
  effects: [
235
235
  {
236
236
  key: 'hero-title',
@@ -252,7 +252,7 @@ const accessibleConfig: InteractConfig = {
252
252
  key: 'hero-title',
253
253
  trigger: 'viewEnter',
254
254
  conditions: ['motion-reduced'],
255
- params: { type: 'once', threshold: 0.3 },
255
+ params: { threshold: 0.3 },
256
256
  effects: [
257
257
  {
258
258
  key: 'hero-title',
@@ -905,7 +905,6 @@ const navigationConfig: InteractConfig = {
905
905
  key: 'mobile-menu-toggle',
906
906
  trigger: 'click',
907
907
  conditions: ['mobile'],
908
- params: { type: 'alternate' },
909
908
  effects: [
910
909
  {
911
910
  key: 'mobile-menu',
@@ -29,9 +29,6 @@ Each interaction defines a complete cause-and-effect relationship:
29
29
  key: 'trigger-element', // What element triggers the interaction
30
30
  selector: '.clickable-area', // Optional: Custom selector within source
31
31
  trigger: 'hover', // What user action starts it
32
- params: { // Optional trigger parameters
33
- type: 'alternate'
34
- },
35
32
  conditions: ['desktop-only'], // Optional conditions to check
36
33
  effects: [ // Array of effects to apply
37
34
  {
@@ -44,6 +41,8 @@ Each interaction defines a complete cause-and-effect relationship:
44
41
  }
45
42
  ```
46
43
 
44
+ Time-based playback (`once`, `repeat`, `alternate`, `state`) is set with `triggerType` on each time effect, or with `triggerType` on a sequence object when using `sequences`. Optional `params` on the interaction are for observer options (`viewEnter` / `pageVisible`), pointer/`animationEnd` settings, and other non-playback trigger configuration.
45
+
47
46
  ## Element Selection with Selectors
48
47
 
49
48
  The `selector` property allows you to specify exactly which element should be used for interactions, instead of being limited to the first child element.
@@ -210,7 +209,7 @@ const complexConfig: InteractConfig = {
210
209
  {
211
210
  key: 'product-card',
212
211
  trigger: 'viewEnter',
213
- params: { type: 'once', threshold: 0.3 },
212
+ params: { threshold: 0.3 },
214
213
  effects: [
215
214
  {
216
215
  key: 'product-card',
@@ -343,7 +342,6 @@ export const cardInteractions = [
343
342
  {
344
343
  key: 'card',
345
344
  trigger: 'viewEnter',
346
- params: { type: 'once' },
347
345
  effects: [{ key: 'card', effectId: 'card-entrance' }],
348
346
  },
349
347
  ];
@@ -500,7 +498,7 @@ const productPageConfig: InteractConfig = {
500
498
  {
501
499
  key: 'review-1',
502
500
  trigger: 'viewEnter',
503
- params: { type: 'once', threshold: 0.2 },
501
+ params: { threshold: 0.2 },
504
502
  effects: [
505
503
  {
506
504
  key: 'review-1',
@@ -512,7 +510,7 @@ const productPageConfig: InteractConfig = {
512
510
  {
513
511
  key: 'review-2',
514
512
  trigger: 'viewEnter',
515
- params: { type: 'once', threshold: 0.2 },
513
+ params: { threshold: 0.2 },
516
514
  effects: [
517
515
  {
518
516
  key: 'review-2',
@@ -72,7 +72,7 @@ For custom animations, use keyframe effects:
72
72
  {
73
73
  key: 'product-card',
74
74
  trigger: 'viewEnter',
75
- params: { type: 'once', threshold: 0.3 },
75
+ params: { threshold: 0.3 },
76
76
  effects: [
77
77
  {
78
78
  keyframeEffect: {
@@ -227,7 +227,6 @@ For different timing per property:
227
227
  {
228
228
  key: 'theme-toggle',
229
229
  trigger: 'click',
230
- params: { type: 'alternate' },
231
230
  effects: [
232
231
  {
233
232
  key: 'page-body',
@@ -514,7 +513,6 @@ Avoid animating:
514
513
  {
515
514
  key: 'app-loader',
516
515
  trigger: 'viewEnter',
517
- params: { type: 'once' },
518
516
  effects: [
519
517
  {
520
518
  key: 'logo',
@@ -554,7 +552,7 @@ Avoid animating:
554
552
  {
555
553
  key: 'stats-section',
556
554
  trigger: 'viewEnter',
557
- params: { type: 'once', threshold: 0.5 },
555
+ params: { threshold: 0.5 },
558
556
  effects: [
559
557
  {
560
558
  key: 'counter-1',
@@ -277,7 +277,6 @@ Each effect defines:
277
277
  {
278
278
  key: 'my-button',
279
279
  trigger: 'click',
280
- params: { method: 'toggle' },
281
280
  effects: [
282
281
  {
283
282
  key: 'my-content',
@@ -36,7 +36,7 @@ const config = {
36
36
  key: 'product-grid',
37
37
  listContainer: '.grid', // Container selector
38
38
  trigger: 'viewEnter',
39
- params: { type: 'once', threshold: 0.1 },
39
+ params: { threshold: 0.1 },
40
40
  effects: [
41
41
  {
42
42
  key: 'product-grid',
@@ -123,7 +123,7 @@ Create sequential entrance animations for list items using delays:
123
123
  key: 'feature-list',
124
124
  listContainer: '.features',
125
125
  trigger: 'viewEnter',
126
- params: { type: 'once', threshold: 0.2 },
126
+ params: { threshold: 0.2 },
127
127
  effects: [{
128
128
  key: 'feature-list',
129
129
  listContainer: '.features',
@@ -306,7 +306,7 @@ element.watchChildList('.dynamic-list');
306
306
  key: 'cards',
307
307
  listContainer: '.card-grid',
308
308
  trigger: 'viewEnter',
309
- params: { type: 'once', threshold: 0.1 },
309
+ params: { threshold: 0.1 },
310
310
  effects: [{
311
311
  key: 'cards',
312
312
  listContainer: '.card-grid',
@@ -330,7 +330,7 @@ element.watchChildList('.dynamic-list');
330
330
  key: 'features',
331
331
  listContainer: '.feature-list',
332
332
  trigger: 'viewEnter',
333
- params: { type: 'once', threshold: 0.2 },
333
+ params: { threshold: 0.2 },
334
334
  effects: [{
335
335
  key: 'features',
336
336
  listContainer: '.feature-list',
@@ -354,7 +354,7 @@ element.watchChildList('.dynamic-list');
354
354
  key: 'photos',
355
355
  listContainer: '.photo-grid',
356
356
  trigger: 'viewEnter',
357
- params: { type: 'once', threshold: 0.15 },
357
+ params: { threshold: 0.15 },
358
358
  effects: [{
359
359
  key: 'photos',
360
360
  listContainer: '.photo-grid',
@@ -417,10 +417,11 @@ element.watchChildList('.dynamic-list');
417
417
  key: 'infinite-list',
418
418
  listContainer: '.items',
419
419
  trigger: 'viewEnter',
420
- params: { type: 'repeat', threshold: 0.1 },
420
+ params: { threshold: 0.1 },
421
421
  effects: [{
422
422
  key: 'infinite-list',
423
423
  listContainer: '.items',
424
+ triggerType: 'repeat',
424
425
  keyframeEffect: {
425
426
  name: 'fade-slide',
426
427
  keyframes: [
@@ -586,7 +587,7 @@ const productGridConfig = {
586
587
  key: 'products',
587
588
  listContainer: '.product-grid',
588
589
  trigger: 'viewEnter',
589
- params: { type: 'once', threshold: 0.1 },
590
+ params: { threshold: 0.1 },
590
591
  effects: [
591
592
  {
592
593
  key: 'products',
@@ -649,11 +650,11 @@ const todoConfig = {
649
650
  key: 'todos',
650
651
  listContainer: '.todo-list',
651
652
  trigger: 'viewEnter',
652
- params: { type: 'repeat' },
653
653
  effects: [
654
654
  {
655
655
  key: 'todos',
656
656
  listContainer: '.todo-list',
657
+ triggerType: 'repeat',
657
658
  keyframeEffect: {
658
659
  name: 'todo-add',
659
660
  keyframes: [
@@ -701,7 +702,7 @@ const galleryConfig = {
701
702
  key: 'gallery',
702
703
  listContainer: '.gallery-grid',
703
704
  trigger: 'viewEnter',
704
- params: { type: 'once', threshold: 0.1 },
705
+ params: { threshold: 0.1 },
705
706
  effects: [
706
707
  {
707
708
  key: 'gallery',
@@ -163,8 +163,8 @@ Effects within a sequence can target different elements using the `key` property
163
163
  {
164
164
  key: 'trigger-element',
165
165
  trigger: 'click',
166
- params: { type: 'alternate' },
167
166
  sequences: [{
167
+ triggerType: 'alternate',
168
168
  offset: 150,
169
169
  offsetEasing: 'sineOut',
170
170
  effects: [
@@ -191,7 +191,6 @@ When the source element connects, all existing list items are gathered and a Seq
191
191
  key: 'product-grid',
192
192
  trigger: 'viewEnter',
193
193
  listContainer: '.products',
194
- params: { type: 'once' },
195
194
  sequences: [{
196
195
  offset: 80,
197
196
  offsetEasing: 'quadIn',
@@ -286,7 +285,7 @@ const config: InteractConfig = {
286
285
  key: 'cards',
287
286
  trigger: 'viewEnter',
288
287
  listContainer: '.card-grid',
289
- params: { type: 'once', threshold: 0.1 },
288
+ params: { threshold: 0.1 },
290
289
  sequences: [
291
290
  {
292
291
  offset: 80,
@@ -326,9 +325,9 @@ const config: InteractConfig = {
326
325
  {
327
326
  key: 'reveal-btn',
328
327
  trigger: 'click',
329
- params: { type: 'alternate' },
330
328
  sequences: [
331
329
  {
330
+ triggerType: 'alternate',
332
331
  offset: 150,
333
332
  offsetEasing: 'sineOut',
334
333
  effects: [
@@ -183,7 +183,6 @@ Create toggle behaviors using alternating states:
183
183
  {
184
184
  key: 'menu-button',
185
185
  trigger: 'click',
186
- params: { type: 'alternate' },
187
186
  effects: [
188
187
  {
189
188
  key: 'mobile-menu',
@@ -315,7 +314,6 @@ Some states should persist across interactions:
315
314
  {
316
315
  key: 'theme-toggle',
317
316
  trigger: 'click',
318
- params: { type: 'alternate' },
319
317
  effects: [
320
318
  {
321
319
  key: 'page-body',