@wix/interact 1.92.0 → 2.0.0-rc.2

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 (179) hide show
  1. package/dist/cjs/index.js +2 -23
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/react.js +15 -0
  4. package/dist/cjs/react.js.map +1 -0
  5. package/dist/cjs/web.js +2 -0
  6. package/dist/cjs/web.js.map +1 -0
  7. package/dist/es/index.js +8 -0
  8. package/dist/es/index.js.map +1 -0
  9. package/dist/es/react.js +650 -0
  10. package/dist/es/react.js.map +1 -0
  11. package/dist/es/web.js +56 -0
  12. package/dist/es/web.js.map +1 -0
  13. package/dist/index-C8QxOkui.mjs +7940 -0
  14. package/dist/index-C8QxOkui.mjs.map +1 -0
  15. package/dist/index-DEPRHaUt.js +18 -0
  16. package/dist/index-DEPRHaUt.js.map +1 -0
  17. package/dist/tsconfig.build.tsbuildinfo +1 -0
  18. package/dist/types/core/Interact.d.ts +17 -7
  19. package/dist/types/core/Interact.d.ts.map +1 -0
  20. package/dist/types/core/InteractionController.d.ts +19 -0
  21. package/dist/types/core/InteractionController.d.ts.map +1 -0
  22. package/dist/types/core/add.d.ts +4 -3
  23. package/dist/types/core/add.d.ts.map +1 -0
  24. package/dist/types/core/css.d.ts +3 -0
  25. package/dist/types/core/css.d.ts.map +1 -0
  26. package/dist/types/core/remove.d.ts +3 -1
  27. package/dist/types/core/remove.d.ts.map +1 -0
  28. package/dist/types/core/utilities.d.ts +1 -0
  29. package/dist/types/core/utilities.d.ts.map +1 -0
  30. package/dist/types/dom/api.d.ts +3 -0
  31. package/dist/types/dom/api.d.ts.map +1 -0
  32. package/dist/types/handlers/animationEnd.d.ts +3 -2
  33. package/dist/types/handlers/animationEnd.d.ts.map +1 -0
  34. package/dist/types/handlers/click.d.ts +3 -2
  35. package/dist/types/handlers/click.d.ts.map +1 -0
  36. package/dist/types/handlers/hover.d.ts +3 -2
  37. package/dist/types/handlers/hover.d.ts.map +1 -0
  38. package/dist/types/handlers/index.d.ts +1 -0
  39. package/dist/types/handlers/index.d.ts.map +1 -0
  40. package/dist/types/handlers/pointerMove.d.ts +3 -2
  41. package/dist/types/handlers/pointerMove.d.ts.map +1 -0
  42. package/dist/types/handlers/utilities.d.ts +1 -0
  43. package/dist/types/handlers/utilities.d.ts.map +1 -0
  44. package/dist/types/handlers/viewEnter.d.ts +3 -2
  45. package/dist/types/handlers/viewEnter.d.ts.map +1 -0
  46. package/dist/types/handlers/viewProgress.d.ts +4 -3
  47. package/dist/types/handlers/viewProgress.d.ts.map +1 -0
  48. package/dist/types/index.d.ts +3 -2
  49. package/dist/types/index.d.ts.map +1 -0
  50. package/dist/types/react/Interaction.d.ts +10 -0
  51. package/dist/types/react/Interaction.d.ts.map +1 -0
  52. package/dist/types/react/index.d.ts +8 -0
  53. package/dist/types/react/index.d.ts.map +1 -0
  54. package/dist/types/react/interactRef.d.ts +3 -0
  55. package/dist/types/react/interactRef.d.ts.map +1 -0
  56. package/dist/types/types.d.ts +25 -10
  57. package/dist/types/types.d.ts.map +1 -0
  58. package/dist/types/utils.d.ts +4 -2
  59. package/dist/types/utils.d.ts.map +1 -0
  60. package/dist/types/{InteractElement.d.ts → web/InteractElement.d.ts} +115 -77
  61. package/dist/types/web/InteractElement.d.ts.map +1 -0
  62. package/dist/types/web/defineInteractElement.d.ts +2 -0
  63. package/dist/types/web/defineInteractElement.d.ts.map +1 -0
  64. package/dist/types/web/index.d.ts +6 -0
  65. package/dist/types/web/index.d.ts.map +1 -0
  66. package/docs/README.md +211 -0
  67. package/docs/advanced/README.md +164 -0
  68. package/docs/api/README.md +157 -0
  69. package/docs/api/element-selection.md +607 -0
  70. package/docs/api/functions.md +638 -0
  71. package/docs/api/interact-class.md +663 -0
  72. package/docs/api/interact-element.md +565 -0
  73. package/docs/api/interaction-controller.md +450 -0
  74. package/docs/api/types.md +957 -0
  75. package/docs/examples/README.md +212 -0
  76. package/docs/examples/click-interactions.md +977 -0
  77. package/docs/examples/entrance-animations.md +935 -0
  78. package/docs/examples/hover-effects.md +930 -0
  79. package/docs/examples/list-patterns.md +737 -0
  80. package/docs/guides/README.md +49 -0
  81. package/docs/guides/conditions-and-media-queries.md +1068 -0
  82. package/docs/guides/configuration-structure.md +726 -0
  83. package/docs/guides/custom-elements.md +327 -0
  84. package/docs/guides/effects-and-animations.md +634 -0
  85. package/docs/guides/getting-started.md +379 -0
  86. package/docs/guides/lists-and-dynamic-content.md +713 -0
  87. package/docs/guides/state-management.md +747 -0
  88. package/docs/guides/understanding-triggers.md +690 -0
  89. package/docs/integration/README.md +264 -0
  90. package/docs/integration/react.md +605 -0
  91. package/package.json +73 -56
  92. package/rules/Integration.md +255 -0
  93. package/rules/click-rules.md +533 -0
  94. package/rules/full-lean.md +346 -0
  95. package/rules/hover-rules.md +593 -0
  96. package/rules/pointermove-rules.md +1341 -0
  97. package/rules/scroll-list-rules.md +900 -0
  98. package/rules/viewenter-rules.md +1015 -0
  99. package/rules/viewprogress-rules.md +1044 -0
  100. package/dist/cjs/InteractElement.js +0 -162
  101. package/dist/cjs/InteractElement.js.map +0 -1
  102. package/dist/cjs/__tests__/interact.spec.js +0 -1930
  103. package/dist/cjs/__tests__/interact.spec.js.map +0 -1
  104. package/dist/cjs/__tests__/viewEnter.spec.js +0 -207
  105. package/dist/cjs/__tests__/viewEnter.spec.js.map +0 -1
  106. package/dist/cjs/core/Interact.js +0 -257
  107. package/dist/cjs/core/Interact.js.map +0 -1
  108. package/dist/cjs/core/add.js +0 -246
  109. package/dist/cjs/core/add.js.map +0 -1
  110. package/dist/cjs/core/remove.js +0 -35
  111. package/dist/cjs/core/remove.js.map +0 -1
  112. package/dist/cjs/core/utilities.js +0 -16
  113. package/dist/cjs/core/utilities.js.map +0 -1
  114. package/dist/cjs/external-types.d.js +0 -2
  115. package/dist/cjs/external-types.d.js.map +0 -1
  116. package/dist/cjs/handlers/animationEnd.js +0 -33
  117. package/dist/cjs/handlers/animationEnd.js.map +0 -1
  118. package/dist/cjs/handlers/click.js +0 -116
  119. package/dist/cjs/handlers/click.js.map +0 -1
  120. package/dist/cjs/handlers/hover.js +0 -141
  121. package/dist/cjs/handlers/hover.js.map +0 -1
  122. package/dist/cjs/handlers/index.js +0 -32
  123. package/dist/cjs/handlers/index.js.map +0 -1
  124. package/dist/cjs/handlers/pointerMove.js +0 -49
  125. package/dist/cjs/handlers/pointerMove.js.map +0 -1
  126. package/dist/cjs/handlers/utilities.js +0 -49
  127. package/dist/cjs/handlers/utilities.js.map +0 -1
  128. package/dist/cjs/handlers/viewEnter.js +0 -127
  129. package/dist/cjs/handlers/viewEnter.js.map +0 -1
  130. package/dist/cjs/handlers/viewProgress.js +0 -65
  131. package/dist/cjs/handlers/viewProgress.js.map +0 -1
  132. package/dist/cjs/test-types.d.js +0 -2
  133. package/dist/cjs/test-types.d.js.map +0 -1
  134. package/dist/cjs/types.js +0 -2
  135. package/dist/cjs/types.js.map +0 -1
  136. package/dist/cjs/utils.js +0 -68
  137. package/dist/cjs/utils.js.map +0 -1
  138. package/dist/esm/InteractElement.js +0 -156
  139. package/dist/esm/InteractElement.js.map +0 -1
  140. package/dist/esm/__tests__/interact.spec.js +0 -1937
  141. package/dist/esm/__tests__/interact.spec.js.map +0 -1
  142. package/dist/esm/__tests__/viewEnter.spec.js +0 -210
  143. package/dist/esm/__tests__/viewEnter.spec.js.map +0 -1
  144. package/dist/esm/core/Interact.js +0 -251
  145. package/dist/esm/core/Interact.js.map +0 -1
  146. package/dist/esm/core/add.js +0 -241
  147. package/dist/esm/core/add.js.map +0 -1
  148. package/dist/esm/core/remove.js +0 -30
  149. package/dist/esm/core/remove.js.map +0 -1
  150. package/dist/esm/core/utilities.js +0 -14
  151. package/dist/esm/core/utilities.js.map +0 -1
  152. package/dist/esm/external-types.d.js +0 -2
  153. package/dist/esm/external-types.d.js.map +0 -1
  154. package/dist/esm/handlers/animationEnd.js +0 -29
  155. package/dist/esm/handlers/animationEnd.js.map +0 -1
  156. package/dist/esm/handlers/click.js +0 -116
  157. package/dist/esm/handlers/click.js.map +0 -1
  158. package/dist/esm/handlers/hover.js +0 -141
  159. package/dist/esm/handlers/hover.js.map +0 -1
  160. package/dist/esm/handlers/index.js +0 -27
  161. package/dist/esm/handlers/index.js.map +0 -1
  162. package/dist/esm/handlers/pointerMove.js +0 -48
  163. package/dist/esm/handlers/pointerMove.js.map +0 -1
  164. package/dist/esm/handlers/utilities.js +0 -43
  165. package/dist/esm/handlers/utilities.js.map +0 -1
  166. package/dist/esm/handlers/viewEnter.js +0 -129
  167. package/dist/esm/handlers/viewEnter.js.map +0 -1
  168. package/dist/esm/handlers/viewProgress.js +0 -61
  169. package/dist/esm/handlers/viewProgress.js.map +0 -1
  170. package/dist/esm/index.js +0 -5
  171. package/dist/esm/index.js.map +0 -1
  172. package/dist/esm/test-types.d.js +0 -2
  173. package/dist/esm/test-types.d.js.map +0 -1
  174. package/dist/esm/types.js +0 -2
  175. package/dist/esm/types.js.map +0 -1
  176. package/dist/esm/utils.js +0 -63
  177. package/dist/esm/utils.js.map +0 -1
  178. package/dist/types/__tests__/interact.spec.d.ts +0 -1
  179. package/dist/types/__tests__/viewEnter.spec.d.ts +0 -0
@@ -0,0 +1,164 @@
1
+ # Advanced Topics
2
+
3
+ Deep-dive technical documentation for power users, contributors, and developers who want to extend `@wix/interact`.
4
+
5
+ ## Architecture & Design
6
+
7
+ ### System Architecture
8
+ - [**Architecture Overview**](architecture.md) - High-level system design
9
+ - [Core Components](architecture.md#components) - Main classes and modules
10
+ - [Data Flow](architecture.md#data-flow) - How interactions are processed
11
+ - [Event System](architecture.md#events) - Event handling architecture
12
+ - [Memory Management](architecture.md#memory) - Lifecycle and cleanup
13
+
14
+ ### Design Decisions
15
+ - [**Design Philosophy**](design-decisions.md) - Why we built it this way
16
+ - [Configuration-driven Approach](design-decisions.md#config-driven) - Declarative vs imperative
17
+ - [Custom Elements Choice](design-decisions.md#custom-elements) - Web standards adoption
18
+ - [Motion Integration](design-decisions.md#motion) - Why @wix/motion
19
+ - [Performance Priorities](design-decisions.md#performance) - Optimization strategies
20
+
21
+ ## Extending the System
22
+
23
+ ### Custom Triggers
24
+ - [**Creating Custom Triggers**](custom-triggers.md) - Build your own trigger types
25
+ - [Trigger Handler Interface](custom-triggers.md#interface) - Required implementation
26
+ - [Event Registration](custom-triggers.md#events) - DOM event handling
27
+ - [Cleanup Management](custom-triggers.md#cleanup) - Memory and event cleanup
28
+ - [Parameter Validation](custom-triggers.md#validation) - Type-safe parameters
29
+ - [Testing Custom Triggers](custom-triggers.md#testing) - Testing strategies
30
+
31
+ ### Custom Effects
32
+ - [**Creating Custom Effects**](custom-effects.md) - Extend animation capabilities
33
+ - [Effect Interface](custom-effects.md#interface) - Effect implementation
34
+ - [Motion Integration](custom-effects.md#motion) - Using @wix/motion APIs
35
+ - [CSS Generation](custom-effects.md#css) - Dynamic CSS creation
36
+ - [State Management](custom-effects.md#state) - Effect state handling
37
+
38
+ ### Plugin System
39
+ - [**Plugin Architecture**](plugins.md) - Extensible plugin system
40
+ - [Plugin Interface](plugins.md#interface) - Plugin development
41
+ - [Lifecycle Hooks](plugins.md#hooks) - Plugin integration points
42
+ - [Configuration Extensions](plugins.md#config) - Extending configuration
43
+ - [Plugin Registry](plugins.md#registry) - Plugin management
44
+
45
+ ## Performance Deep Dive
46
+
47
+ ### Optimization Strategies
48
+ - [**Performance Optimization**](performance-optimization.md) - Advanced performance techniques
49
+ - [GPU Acceleration](performance-optimization.md#gpu) - Hardware acceleration
50
+ - [Batching Operations](performance-optimization.md#batching) - Efficient DOM updates
51
+ - [Event Debouncing](performance-optimization.md#debouncing) - Event optimization
52
+ - [Memory Pooling](performance-optimization.md#pooling) - Object reuse strategies
53
+
54
+ ### Profiling and Analysis
55
+ - [**Performance Profiling**](performance-profiling.md) - Measuring and analyzing performance
56
+ - [Browser DevTools](performance-profiling.md#devtools) - Built-in profiling tools
57
+ - [Custom Metrics](performance-profiling.md#metrics) - Application-specific measurements
58
+ - [Automated Testing](performance-profiling.md#automation) - CI/CD performance testing
59
+ - [Real-world Monitoring](performance-profiling.md#monitoring) - Production monitoring
60
+
61
+ ### Optimization Patterns
62
+ - [**Animation Patterns**](optimization-patterns.md) - Performant animation techniques
63
+ - [Transform-based Animations](optimization-patterns.md#transforms) - GPU-friendly animations
64
+ - [Composite Layers](optimization-patterns.md#compositing) - Layer management
65
+ - [Frame Rate Optimization](optimization-patterns.md#framerate) - 60fps techniques
66
+ - [Mobile Optimization](optimization-patterns.md#mobile) - Touch device considerations
67
+
68
+ ## Browser Compatibility
69
+
70
+ ### Polyfills and Fallbacks
71
+ - [**Browser Support**](browser-support.md) - Comprehensive compatibility guide
72
+ - [Required Polyfills](browser-support.md#polyfills) - Essential polyfills
73
+ - [Feature Detection](browser-support.md#detection) - Runtime capability checking
74
+ - [Graceful Degradation](browser-support.md#degradation) - Fallback strategies
75
+ - [Progressive Enhancement](browser-support.md#enhancement) - Feature layering
76
+
77
+ ### Platform-Specific Issues
78
+ - [**Platform Considerations**](platform-issues.md) - Platform-specific challenges
79
+ - [iOS Safari](platform-issues.md#ios) - iOS-specific issues and workarounds
80
+ - [Android Chrome](platform-issues.md#android) - Android considerations
81
+ - [Desktop Browsers](platform-issues.md#desktop) - Desktop-specific optimizations
82
+ - [Accessibility Tools](platform-issues.md#accessibility) - Screen reader compatibility
83
+
84
+ ## Debugging and Troubleshooting
85
+
86
+ ### Advanced Debugging
87
+ - [**Deep Debugging**](debugging.md) - Advanced debugging techniques
88
+ - [Animation Inspector](debugging.md#inspector) - Browser animation tools
89
+ - [Custom Logging](debugging.md#logging) - Debug output strategies
90
+ - [State Inspection](debugging.md#state) - Runtime state debugging
91
+ - [Performance Debugging](debugging.md#performance) - Performance issue diagnosis
92
+
93
+ ### Common Issues
94
+ - [**Troubleshooting Guide**](troubleshooting.md) - Solving complex problems
95
+ - [Memory Leaks](troubleshooting.md#memory-leaks) - Identifying and fixing leaks
96
+ - [Performance Issues](troubleshooting.md#performance) - Performance problem solving
97
+ - [Browser Quirks](troubleshooting.md#quirks) - Browser-specific issues
98
+ - [Configuration Errors](troubleshooting.md#config) - Common configuration mistakes
99
+
100
+ ## Security Considerations
101
+
102
+ ### Security Best Practices
103
+ - [**Security Guide**](security.md) - Security considerations for interactions
104
+ - [XSS Prevention](security.md#xss) - Cross-site scripting prevention
105
+ - [Content Security Policy](security.md#csp) - CSP compatibility
106
+ - [User Input Validation](security.md#validation) - Safe configuration handling
107
+ - [Third-party Integration](security.md#third-party) - External library safety
108
+
109
+ ## Contributing
110
+
111
+ ### Development Setup
112
+ - [**Contributing Guide**](contributing.md) - How to contribute to the project
113
+ - [Development Environment](contributing.md#environment) - Local setup
114
+ - [Code Standards](contributing.md#standards) - Coding conventions
115
+ - [Testing Requirements](contributing.md#testing) - Test coverage expectations
116
+ - [Documentation Standards](contributing.md#docs) - Documentation guidelines
117
+
118
+ ### Release Process
119
+ - [**Release Management**](release-process.md) - How releases are managed
120
+ - [Versioning Strategy](release-process.md#versioning) - Semantic versioning
121
+ - [Change Management](release-process.md#changes) - Breaking change policies
122
+ - [Testing Pipeline](release-process.md#testing) - Pre-release testing
123
+ - [Documentation Updates](release-process.md#docs) - Documentation maintenance
124
+
125
+ ## Experimental Features
126
+
127
+ ### Upcoming Features
128
+ - [**Experimental APIs**](experimental.md) - Preview of future features
129
+ - [WebGL Integration](experimental.md#webgl) - 3D animation support
130
+ - [AI-driven Animations](experimental.md#ai) - Machine learning integration
131
+ - [Voice/Gesture Triggers](experimental.md#voice-gesture) - Alternative input methods
132
+
133
+ ### Feature Flags
134
+ - [**Feature Flags**](feature-flags.md) - Experimental feature control
135
+ - [Enabling Features](feature-flags.md#enabling) - How to enable experimental features
136
+ - [Stability Warnings](feature-flags.md#stability) - Usage considerations
137
+ - [Feedback Process](feature-flags.md#feedback) - How to provide feedback
138
+
139
+ ## Technical Specifications
140
+
141
+ ### API Contracts
142
+ - [**API Specifications**](api-specs.md) - Detailed API contracts
143
+ - [Type Definitions](api-specs.md#types) - Complete TypeScript definitions
144
+ - [Interface Contracts](api-specs.md#contracts) - Implementation requirements
145
+ - [Error Handling](api-specs.md#errors) - Error codes and handling
146
+ - [Backwards Compatibility](api-specs.md#compatibility) - API stability guarantees
147
+
148
+ ### Internal APIs
149
+ - [**Internal Documentation**](internal-apis.md) - Internal implementation details
150
+ - [Private Methods](internal-apis.md#private) - Internal method documentation
151
+ - [State Management](internal-apis.md#state) - Internal state handling
152
+ - [Cache Management](internal-apis.md#cache) - Internal caching strategies
153
+ - [Event Dispatching](internal-apis.md#events) - Internal event system
154
+
155
+ ## Research and Background
156
+
157
+ ### Industry Best Practices
158
+ - [**Industry Analysis**](industry.md) - How we compare to industry standards
159
+ - [Competitive Analysis](industry.md#competition) - Comparison with other libraries
160
+ - [Best Practices](industry.md#practices) - Industry-standard practices
161
+ - [Performance Benchmarks](industry.md#benchmarks) - Performance comparisons
162
+ - [Standards Compliance](industry.md#compliance) - Web standards adherence
163
+
164
+ This advanced documentation is intended for developers who need deep technical understanding of the `@wix/interact` system. For general usage, start with the [Getting Started Guide](../guides/getting-started.md) or [Examples](../examples/README.md).
@@ -0,0 +1,157 @@
1
+ # API Reference
2
+
3
+ Complete reference documentation for all public APIs in `@wix/interact`.
4
+
5
+ ## Core API
6
+
7
+ ### Classes
8
+
9
+ - [**Interact**](interact-class.md) - Main interaction manager class
10
+ - [Static methods](interact-class.md#static-methods): `create()`, `getInstance()`, `getElement()`, `setElement()`
11
+ - [Instance methods](interact-class.md#instance-methods): `init()`, `has()`, `clearInteractionStateForKey()`
12
+ - [Properties](interact-class.md#properties): `dataCache`, `addedInteractions`
13
+ - [Error handling](interact-class.md#error-handling) and [best practices](interact-class.md#best-practices)
14
+
15
+ ### Functions
16
+
17
+ - [**add(element, path)**](functions.md#add) - Add interactions to an element
18
+ - [Usage examples](functions.md#examples) and [behavior details](functions.md#behavior-details)
19
+ - [Error handling](functions.md#error-handling) and [performance considerations](functions.md#performance-considerations)
20
+ - [**remove(path)**](functions.md#remove) - Remove interactions from an element
21
+ - [Cleanup behavior](functions.md#behavior-details) and [advanced usage](functions.md#advanced-usage)
22
+ - [**generate(config)**](functions.md#generate) - Generate CSS for hiding elements with entrance animations
23
+ - [SSR usage](functions.md#server-side-rendering-ssr) and [React integration](functions.md#with-react)
24
+ - [HTML setup](functions.md#html-setup) and [accessibility](functions.md#accessibility)
25
+ - [**addListItems(root, key, listContainer, elements)**](functions.md#addlistitems) - Add interactions to new list items
26
+ - [Manual list management](functions.md#manual-list-item-addition) and [batch operations](functions.md#batch-adding-items)
27
+ - [**removeListItems(elements)**](functions.md#removelistitems) - Remove interactions from list items
28
+ - [Cleanup workflows](functions.md#complete-removal-workflow) and [performance tips](functions.md#performance-considerations)
29
+
30
+ ### Custom Elements
31
+
32
+ - [**interact-element**](interact-element.md) - Custom element for wrapping interactive content
33
+ - [Interface](interact-element.md#element-interface) and [lifecycle methods](interact-element.md#methods)
34
+ - [Framework integration](interact-element.md#framework-integration) (React, Vue, Angular)
35
+ - [State management](interact-element.md#state-management) and [browser support](interact-element.md#browser-support)
36
+ - [List management with watchChildList](interact-element.md#list-management-with-watchchildlist)
37
+
38
+ ### Element Selection
39
+
40
+ - [**Element Selection Priority**](element-selection.md) - Understanding how elements are selected
41
+ - [Selection priority order](element-selection.md#selection-priority-overview) with flowchart
42
+ - [Common patterns](element-selection.md#common-patterns) and [troubleshooting](element-selection.md#troubleshooting)
43
+ - [listContainer vs selector](element-selection.md#scenario-4-listcontainer--selector)
44
+
45
+ ## Type Definitions
46
+
47
+ ### Configuration Types
48
+
49
+ - [**InteractConfig**](types.md#interactconfig) - Main configuration object
50
+ - [**Interaction**](types.md#interaction) - Individual interaction definition
51
+ - [**Effect**](types.md#effect) - Effect definition and parameters
52
+ - [**Condition**](types.md#condition) - Conditional interaction logic
53
+
54
+ ### Trigger Types
55
+
56
+ - [**TriggerType**](types.md#triggertype) - Union of all supported triggers
57
+ - [**ViewEnterParams**](types.md#viewenterparams) - Viewport entry configuration
58
+ - [**StateParams**](types.md#stateparams) - State transition parameters
59
+ - [**PointerMoveParams**](types.md#pointermoveparams) - Pointer movement configuration
60
+ - [**AnimationEndParams**](types.md#animationendparams) - Animation completion triggers
61
+
62
+ ### Effect Types
63
+
64
+ - [**TimeEffect**](types.md#timeeffect) - Time-based animations with examples
65
+ - [**ScrubEffect**](types.md#scrubeffect) - Progress-based animations with named ranges
66
+ - [**TransitionEffect**](types.md#transitioneffect) - CSS transition effects
67
+ - [**EffectRef**](types.md#effectref) - Effect reference by ID
68
+
69
+ ### Advanced Types
70
+
71
+ - [**IInteractElement**](types.md#iwixinteractelement) - Custom element interface
72
+ - [**InteractCache**](types.md#interactcache) - Internal cache structure
73
+ - [**EffectProperty**](types.md#effectproperty) - Animation content types
74
+ - [**TypeScript patterns**](types.md#typescript-usage-patterns) - Type guards and generic constraints
75
+
76
+ ## Quick Reference
77
+
78
+ ### Essential Imports
79
+ ```typescript
80
+ import {
81
+ Interact, // Main class
82
+ add, remove, // Standalone functions
83
+ generate, // CSS generation for entrance animations
84
+ InteractConfig, // Configuration type
85
+ IInteractElement // Custom element interface
86
+ } from '@wix/interact';
87
+ ```
88
+
89
+ ### Basic Pattern
90
+ ```typescript
91
+ // 1. Create configuration
92
+ const config: InteractConfig = {
93
+ interactions: [{ /* ... */ }],
94
+ effects: { /* ... */ }
95
+ };
96
+
97
+ // 2. Initialize
98
+ const interact = Interact.create(config);
99
+
100
+ // 3. HTML usage
101
+ // <interact-element data-interact-key="#element">
102
+ // <div>Content</div>
103
+ // </interact-element>
104
+ ```
105
+
106
+ ### Type Hierarchy
107
+
108
+ ```
109
+ InteractConfig
110
+ ├── interactions: Interaction[]
111
+ │ ├── trigger: TriggerType
112
+ │ ├── key: string
113
+ │ ├── selector?: string
114
+ │ ├── listContainer?: string
115
+ │ ├── params?: TriggerParams
116
+ │ ├── conditions?: string[]
117
+ │ └── effects: (Effect | EffectRef)[]
118
+ ├── effects?: Record<string, Effect>
119
+ │ ├── TimeEffect (duration-based)
120
+ │ ├── ScrubEffect (progress-based)
121
+ │ └── TransitionEffect (CSS transitions)
122
+ └── conditions?: Record<string, Condition>
123
+ ├── Media queries
124
+ └── Container queries
125
+ ```
126
+
127
+ ## Integration with @wix/motion
128
+
129
+ The `@wix/interact` package provides a declarative layer on top of `@wix/motion`. Effect definitions can include:
130
+
131
+ - `keyframeEffect` - Raw keyframe animations
132
+ - `namedEffect` - Pre-built animation effects from @wix/motion
133
+ - `customEffect` - Custom animation functions with full control
134
+
135
+ **Example Integration:**
136
+ ```typescript
137
+ {
138
+ effects: {
139
+ 'slide-in': {
140
+ duration: 800,
141
+ keyframeEffect: {
142
+ name: 'slide-in',
143
+ keyframes: [
144
+ { opacity: 0, transform: 'translateY(50px)' },
145
+ { opacity: 1, transform: 'translateY(0)' }
146
+ ]
147
+ }
148
+ },
149
+ 'bounce': {
150
+ duration: 600,
151
+ namedEffect: 'bounce' // Pre-built from @wix/motion
152
+ }
153
+ }
154
+ }
155
+ ```
156
+
157
+ See the [Effects Guide](../guides/effects.md) for detailed information on animation integration and [Examples](../examples/README.md) for practical usage patterns.