@rafaelaugusto/jolt 0.1.0-beta.8 → 0.1.0-rc.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.
- package/README.md +136 -15
- package/dist/animate.d.ts +25 -4
- package/dist/animate.d.ts.map +1 -1
- package/dist/animate.js +67 -26
- package/dist/animate.js.map +1 -1
- package/dist/blur/index.d.ts +6 -0
- package/dist/blur/index.d.ts.map +1 -0
- package/dist/blur/index.js +196 -0
- package/dist/blur/index.js.map +1 -0
- package/dist/blur/native.d.ts +17 -0
- package/dist/blur/native.d.ts.map +1 -0
- package/dist/blur/native.js +44 -0
- package/dist/blur/native.js.map +1 -0
- package/dist/blur/types.d.ts +32 -0
- package/dist/blur/types.d.ts.map +1 -0
- package/dist/blur/types.js +2 -0
- package/dist/blur/types.js.map +1 -0
- package/dist/bottom-sheet/geometry.d.ts +18 -0
- package/dist/bottom-sheet/geometry.d.ts.map +1 -0
- package/dist/bottom-sheet/geometry.js +51 -0
- package/dist/bottom-sheet/geometry.js.map +1 -0
- package/dist/bottom-sheet/index.d.ts +56 -0
- package/dist/bottom-sheet/index.d.ts.map +1 -0
- package/dist/bottom-sheet/index.js +462 -0
- package/dist/bottom-sheet/index.js.map +1 -0
- package/dist/bottom-sheet/native.d.ts +11 -0
- package/dist/bottom-sheet/native.d.ts.map +1 -0
- package/dist/bottom-sheet/native.js +173 -0
- package/dist/bottom-sheet/native.js.map +1 -0
- package/dist/config.d.ts +9 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +40 -1
- package/dist/config.js.map +1 -1
- package/dist/decay.d.ts +1 -0
- package/dist/decay.d.ts.map +1 -1
- package/dist/decay.js +7 -0
- package/dist/decay.js.map +1 -1
- package/dist/drag-physics.d.ts +6 -1
- package/dist/drag-physics.d.ts.map +1 -1
- package/dist/drag.d.ts +17 -3
- package/dist/drag.d.ts.map +1 -1
- package/dist/drag.js +34 -11
- package/dist/drag.js.map +1 -1
- package/dist/driver/android-gradient.d.ts +5 -0
- package/dist/driver/android-gradient.d.ts.map +1 -0
- package/dist/driver/android-gradient.js +99 -0
- package/dist/driver/android-gradient.js.map +1 -0
- package/dist/driver/android-particles.d.ts +6 -0
- package/dist/driver/android-particles.d.ts.map +1 -0
- package/dist/driver/android-particles.js +93 -0
- package/dist/driver/android-particles.js.map +1 -0
- package/dist/driver/android.d.ts.map +1 -1
- package/dist/driver/android.js +67 -1
- package/dist/driver/android.js.map +1 -1
- package/dist/driver/frame.d.ts +3 -0
- package/dist/driver/frame.d.ts.map +1 -0
- package/dist/driver/frame.js +7 -0
- package/dist/driver/frame.js.map +1 -0
- package/dist/driver/index.d.ts +14 -0
- package/dist/driver/index.d.ts.map +1 -1
- package/dist/driver/index.js.map +1 -1
- package/dist/driver/ios-gradient.d.ts +5 -0
- package/dist/driver/ios-gradient.d.ts.map +1 -0
- package/dist/driver/ios-gradient.js +131 -0
- package/dist/driver/ios-gradient.js.map +1 -0
- package/dist/driver/ios-layout.d.ts +9 -0
- package/dist/driver/ios-layout.d.ts.map +1 -0
- package/dist/driver/ios-layout.js +52 -0
- package/dist/driver/ios-layout.js.map +1 -0
- package/dist/driver/ios-scroll-delegate.d.ts +4 -0
- package/dist/driver/ios-scroll-delegate.d.ts.map +1 -0
- package/dist/driver/ios-scroll-delegate.js +26 -0
- package/dist/driver/ios-scroll-delegate.js.map +1 -0
- package/dist/driver/ios.d.ts.map +1 -1
- package/dist/driver/ios.js +57 -1
- package/dist/driver/ios.js.map +1 -1
- package/dist/easing.d.ts +3 -1
- package/dist/easing.d.ts.map +1 -1
- package/dist/easing.js +18 -1
- package/dist/easing.js.map +1 -1
- package/dist/engine.d.ts +35 -2
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +211 -42
- package/dist/engine.js.map +1 -1
- package/dist/gesture-native.d.ts +28 -0
- package/dist/gesture-native.d.ts.map +1 -0
- package/dist/gesture-native.js +61 -0
- package/dist/gesture-native.js.map +1 -0
- package/dist/gestures/index.d.ts +69 -0
- package/dist/gestures/index.d.ts.map +1 -0
- package/dist/gestures/index.js +262 -0
- package/dist/gestures/index.js.map +1 -0
- package/dist/glass/index.d.ts +55 -0
- package/dist/glass/index.d.ts.map +1 -0
- package/dist/glass/index.js +205 -0
- package/dist/glass/index.js.map +1 -0
- package/dist/gradient-binding.d.ts +38 -0
- package/dist/gradient-binding.d.ts.map +1 -0
- package/dist/gradient-binding.js +128 -0
- package/dist/gradient-binding.js.map +1 -0
- package/dist/gradient.d.ts +105 -0
- package/dist/gradient.d.ts.map +1 -0
- package/dist/gradient.js +514 -0
- package/dist/gradient.js.map +1 -0
- package/dist/gravity.d.ts +13 -0
- package/dist/gravity.d.ts.map +1 -0
- package/dist/gravity.js +84 -0
- package/dist/gravity.js.map +1 -0
- package/dist/haptics.d.ts.map +1 -1
- package/dist/haptics.js +101 -28
- package/dist/haptics.js.map +1 -1
- package/dist/image-effect.d.ts +1 -0
- package/dist/image-effect.d.ts.map +1 -1
- package/dist/image-effect.js +10 -2
- package/dist/image-effect.js.map +1 -1
- package/dist/index.d.ts +21 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/dist/inspector/index.d.ts +86 -0
- package/dist/inspector/index.d.ts.map +1 -0
- package/dist/inspector/index.js +419 -0
- package/dist/inspector/index.js.map +1 -0
- package/dist/inspector/plot.d.ts +4 -0
- package/dist/inspector/plot.d.ts.map +1 -0
- package/dist/inspector/plot.js +23 -0
- package/dist/inspector/plot.js.map +1 -0
- package/dist/inspector/probe.d.ts +19 -0
- package/dist/inspector/probe.d.ts.map +1 -0
- package/dist/inspector/probe.js +37 -0
- package/dist/inspector/probe.js.map +1 -0
- package/dist/inspector/tuning.d.ts +19 -0
- package/dist/inspector/tuning.d.ts.map +1 -0
- package/dist/inspector/tuning.js +37 -0
- package/dist/inspector/tuning.js.map +1 -0
- package/dist/interactive-navigation/index.d.ts +44 -0
- package/dist/interactive-navigation/index.d.ts.map +1 -0
- package/dist/interactive-navigation/index.js +314 -0
- package/dist/interactive-navigation/index.js.map +1 -0
- package/dist/keyboard.d.ts +24 -0
- package/dist/keyboard.d.ts.map +1 -1
- package/dist/keyboard.js +199 -6
- package/dist/keyboard.js.map +1 -1
- package/dist/layout.d.ts +13 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +348 -0
- package/dist/layout.js.map +1 -0
- package/dist/live-spring-driver.d.ts +52 -0
- package/dist/live-spring-driver.d.ts.map +1 -0
- package/dist/live-spring-driver.js +104 -0
- package/dist/live-spring-driver.js.map +1 -0
- package/dist/mixer.d.ts +55 -0
- package/dist/mixer.d.ts.map +1 -0
- package/dist/mixer.js +278 -0
- package/dist/mixer.js.map +1 -0
- package/dist/motion-scope.d.ts +10 -2
- package/dist/motion-scope.d.ts.map +1 -1
- package/dist/motion-scope.js +30 -3
- package/dist/motion-scope.js.map +1 -1
- package/dist/motion-states.d.ts +19 -7
- package/dist/motion-states.d.ts.map +1 -1
- package/dist/motion-states.js +116 -26
- package/dist/motion-states.js.map +1 -1
- package/dist/motion-value.d.ts +227 -0
- package/dist/motion-value.d.ts.map +1 -0
- package/dist/motion-value.js +1074 -0
- package/dist/motion-value.js.map +1 -0
- package/dist/native/index.d.ts +10 -0
- package/dist/native/index.d.ts.map +1 -0
- package/dist/native/index.js +6 -0
- package/dist/native/index.js.map +1 -0
- package/dist/native-properties.d.ts +28 -0
- package/dist/native-properties.d.ts.map +1 -0
- package/dist/native-properties.js +154 -0
- package/dist/native-properties.js.map +1 -0
- package/dist/native-property-driver.d.ts +19 -0
- package/dist/native-property-driver.d.ts.map +1 -0
- package/dist/native-property-driver.js +69 -0
- package/dist/native-property-driver.js.map +1 -0
- package/dist/native-property.d.ts +37 -0
- package/dist/native-property.d.ts.map +1 -0
- package/dist/native-property.js +285 -0
- package/dist/native-property.js.map +1 -0
- package/dist/particles.d.ts +5 -2
- package/dist/particles.d.ts.map +1 -1
- package/dist/particles.js +16 -10
- package/dist/particles.js.map +1 -1
- package/dist/path.d.ts.map +1 -1
- package/dist/path.js +2 -2
- package/dist/path.js.map +1 -1
- package/dist/physics/index.d.ts +116 -0
- package/dist/physics/index.d.ts.map +1 -0
- package/dist/physics/index.js +306 -0
- package/dist/physics/index.js.map +1 -0
- package/dist/physics/native.d.ts +53 -0
- package/dist/physics/native.d.ts.map +1 -0
- package/dist/physics/native.js +58 -0
- package/dist/physics/native.js.map +1 -0
- package/dist/playback-group.d.ts.map +1 -1
- package/dist/playback-group.js +17 -1
- package/dist/playback-group.js.map +1 -1
- package/dist/playback.d.ts +15 -0
- package/dist/playback.d.ts.map +1 -1
- package/dist/playback.js +23 -0
- package/dist/playback.js.map +1 -1
- package/dist/predictive-back/index.d.ts +45 -0
- package/dist/predictive-back/index.d.ts.map +1 -0
- package/dist/predictive-back/index.js +220 -0
- package/dist/predictive-back/index.js.map +1 -0
- package/dist/predictive-back/presentation.d.ts +4 -0
- package/dist/predictive-back/presentation.d.ts.map +1 -0
- package/dist/predictive-back/presentation.js +3 -0
- package/dist/predictive-back/presentation.js.map +1 -0
- package/dist/reorder/handle.d.ts +6 -0
- package/dist/reorder/handle.d.ts.map +1 -0
- package/dist/reorder/handle.js +10 -0
- package/dist/reorder/handle.js.map +1 -0
- package/dist/reorder/index.d.ts +10 -0
- package/dist/reorder/index.d.ts.map +1 -0
- package/dist/reorder/index.js +233 -0
- package/dist/reorder/index.js.map +1 -0
- package/dist/reorder/list-view.d.ts +5 -0
- package/dist/reorder/list-view.d.ts.map +1 -0
- package/dist/reorder/list-view.js +238 -0
- package/dist/reorder/list-view.js.map +1 -0
- package/dist/reorder/model.d.ts +6 -0
- package/dist/reorder/model.d.ts.map +1 -0
- package/dist/reorder/model.js +30 -0
- package/dist/reorder/model.js.map +1 -0
- package/dist/reorder/surface.d.ts +6 -0
- package/dist/reorder/surface.d.ts.map +1 -0
- package/dist/reorder/surface.js +10 -0
- package/dist/reorder/surface.js.map +1 -0
- package/dist/reorder/types.d.ts +92 -0
- package/dist/reorder/types.d.ts.map +1 -0
- package/dist/reorder/types.js +2 -0
- package/dist/reorder/types.js.map +1 -0
- package/dist/sampling.d.ts +35 -0
- package/dist/sampling.d.ts.map +1 -0
- package/dist/sampling.js +123 -0
- package/dist/sampling.js.map +1 -0
- package/dist/scene-appearance.d.ts +14 -0
- package/dist/scene-appearance.d.ts.map +1 -0
- package/dist/scene-appearance.js +68 -0
- package/dist/scene-appearance.js.map +1 -0
- package/dist/scene-camera.d.ts +5 -0
- package/dist/scene-camera.d.ts.map +1 -0
- package/dist/scene-camera.js +23 -0
- package/dist/scene-camera.js.map +1 -0
- package/dist/scene-shader.d.ts +18 -0
- package/dist/scene-shader.d.ts.map +1 -0
- package/dist/scene-shader.js +76 -0
- package/dist/scene-shader.js.map +1 -0
- package/dist/scroll-header/geometry.d.ts +18 -0
- package/dist/scroll-header/geometry.d.ts.map +1 -0
- package/dist/scroll-header/geometry.js +46 -0
- package/dist/scroll-header/geometry.js.map +1 -0
- package/dist/scroll-header/index.d.ts +48 -0
- package/dist/scroll-header/index.d.ts.map +1 -0
- package/dist/scroll-header/index.js +373 -0
- package/dist/scroll-header/index.js.map +1 -0
- package/dist/scroll-header/native.d.ts +28 -0
- package/dist/scroll-header/native.d.ts.map +1 -0
- package/dist/scroll-header/native.js +43 -0
- package/dist/scroll-header/native.js.map +1 -0
- package/dist/sensors/index.d.ts +69 -0
- package/dist/sensors/index.d.ts.map +1 -0
- package/dist/sensors/index.js +149 -0
- package/dist/sensors/index.js.map +1 -0
- package/dist/sensors/native.d.ts +20 -0
- package/dist/sensors/native.d.ts.map +1 -0
- package/dist/sensors/native.js +48 -0
- package/dist/sensors/native.js.map +1 -0
- package/dist/sequence.d.ts +24 -0
- package/dist/sequence.d.ts.map +1 -1
- package/dist/sequence.js +181 -19
- package/dist/sequence.js.map +1 -1
- package/dist/shapes/android.d.ts +3 -0
- package/dist/shapes/android.d.ts.map +1 -0
- package/dist/shapes/android.js +51 -0
- package/dist/shapes/android.js.map +1 -0
- package/dist/shapes/index.d.ts +6 -0
- package/dist/shapes/index.d.ts.map +1 -0
- package/dist/shapes/index.js +238 -0
- package/dist/shapes/index.js.map +1 -0
- package/dist/shapes/ios.d.ts +3 -0
- package/dist/shapes/ios.d.ts.map +1 -0
- package/dist/shapes/ios.js +164 -0
- package/dist/shapes/ios.js.map +1 -0
- package/dist/shapes/native.d.ts +18 -0
- package/dist/shapes/native.d.ts.map +1 -0
- package/dist/shapes/native.js +10 -0
- package/dist/shapes/native.js.map +1 -0
- package/dist/shapes/path.d.ts +10 -0
- package/dist/shapes/path.d.ts.map +1 -0
- package/dist/shapes/path.js +106 -0
- package/dist/shapes/path.js.map +1 -0
- package/dist/shapes/types.d.ts +55 -0
- package/dist/shapes/types.d.ts.map +1 -0
- package/dist/shapes/types.js +11 -0
- package/dist/shapes/types.js.map +1 -0
- package/dist/shared-layout/index.d.ts +40 -0
- package/dist/shared-layout/index.d.ts.map +1 -0
- package/dist/shared-layout/index.js +267 -0
- package/dist/shared-layout/index.js.map +1 -0
- package/dist/shared-layout/native.d.ts +15 -0
- package/dist/shared-layout/native.d.ts.map +1 -0
- package/dist/shared-layout/native.js +79 -0
- package/dist/shared-layout/native.js.map +1 -0
- package/dist/shared-layout/timing.d.ts +9 -0
- package/dist/shared-layout/timing.d.ts.map +1 -0
- package/dist/shared-layout/timing.js +68 -0
- package/dist/shared-layout/timing.js.map +1 -0
- package/dist/shared-navigation/entry.d.ts +51 -0
- package/dist/shared-navigation/entry.d.ts.map +1 -0
- package/dist/shared-navigation/entry.js +619 -0
- package/dist/shared-navigation/entry.js.map +1 -0
- package/dist/shared-navigation/index.d.ts +58 -0
- package/dist/shared-navigation/index.d.ts.map +1 -0
- package/dist/shared-navigation/index.js +318 -0
- package/dist/shared-navigation/index.js.map +1 -0
- package/dist/shared-navigation/return-signal.d.ts +16 -0
- package/dist/shared-navigation/return-signal.d.ts.map +1 -0
- package/dist/shared-navigation/return-signal.js +35 -0
- package/dist/shared-navigation/return-signal.js.map +1 -0
- package/dist/shared-navigation/return-target.d.ts +32 -0
- package/dist/shared-navigation/return-target.d.ts.map +1 -0
- package/dist/shared-navigation/return-target.js +168 -0
- package/dist/shared-navigation/return-target.js.map +1 -0
- package/dist/shared-navigation/scope.d.ts +4 -0
- package/dist/shared-navigation/scope.d.ts.map +1 -0
- package/dist/shared-navigation/scope.js +2 -0
- package/dist/shared-navigation/scope.js.map +1 -0
- package/dist/shared-navigation/targets.d.ts +6 -0
- package/dist/shared-navigation/targets.d.ts.map +1 -0
- package/dist/shared-navigation/targets.js +36 -0
- package/dist/shared-navigation/targets.js.map +1 -0
- package/dist/size-layout.d.ts +19 -0
- package/dist/size-layout.d.ts.map +1 -0
- package/dist/size-layout.js +216 -0
- package/dist/size-layout.js.map +1 -0
- package/dist/size.d.ts +19 -0
- package/dist/size.d.ts.map +1 -0
- package/dist/size.js +251 -0
- package/dist/size.js.map +1 -0
- package/dist/spring.d.ts +2 -0
- package/dist/spring.d.ts.map +1 -1
- package/dist/spring.js +11 -0
- package/dist/spring.js.map +1 -1
- package/dist/svg-path.d.ts +18 -0
- package/dist/svg-path.d.ts.map +1 -1
- package/dist/svg-path.js +3 -2
- package/dist/svg-path.js.map +1 -1
- package/dist/testing/clock.d.ts +40 -0
- package/dist/testing/clock.d.ts.map +1 -0
- package/dist/testing/clock.js +116 -0
- package/dist/testing/clock.js.map +1 -0
- package/dist/testing/handoff-recorder.d.ts +8 -0
- package/dist/testing/handoff-recorder.d.ts.map +1 -0
- package/dist/testing/handoff-recorder.js +77 -0
- package/dist/testing/handoff-recorder.js.map +1 -0
- package/dist/testing/index.d.ts +5 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +5 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/native.d.ts +46 -0
- package/dist/testing/native.d.ts.map +1 -0
- package/dist/testing/native.js +313 -0
- package/dist/testing/native.js.map +1 -0
- package/dist/testing/presentation.d.ts +11 -0
- package/dist/testing/presentation.d.ts.map +1 -0
- package/dist/testing/presentation.js +45 -0
- package/dist/testing/presentation.js.map +1 -0
- package/dist/testing/replay.d.ts +39 -0
- package/dist/testing/replay.d.ts.map +1 -0
- package/dist/testing/replay.js +99 -0
- package/dist/testing/replay.js.map +1 -0
- package/dist/testing/scroll-handoff-native.d.ts +10 -0
- package/dist/testing/scroll-handoff-native.d.ts.map +1 -0
- package/dist/testing/scroll-handoff-native.js +151 -0
- package/dist/testing/scroll-handoff-native.js.map +1 -0
- package/dist/testing/scroll-handoff.d.ts +25 -0
- package/dist/testing/scroll-handoff.d.ts.map +1 -0
- package/dist/testing/scroll-handoff.js +127 -0
- package/dist/testing/scroll-handoff.js.map +1 -0
- package/dist/testing/sensors.d.ts +13 -0
- package/dist/testing/sensors.d.ts.map +1 -0
- package/dist/testing/sensors.js +26 -0
- package/dist/testing/sensors.js.map +1 -0
- package/dist/testing/trace.d.ts +101 -0
- package/dist/testing/trace.d.ts.map +1 -0
- package/dist/testing/trace.js +263 -0
- package/dist/testing/trace.js.map +1 -0
- package/dist/timed-animation.d.ts +38 -0
- package/dist/timed-animation.d.ts.map +1 -0
- package/dist/timed-animation.js +177 -0
- package/dist/timed-animation.js.map +1 -0
- package/dist/track.d.ts +3 -0
- package/dist/track.d.ts.map +1 -1
- package/dist/track.js +281 -40
- package/dist/track.js.map +1 -1
- package/dist/transition.d.ts +54 -2
- package/dist/transition.d.ts.map +1 -1
- package/dist/transition.js +128 -8
- package/dist/transition.js.map +1 -1
- package/dist/types.d.ts +10 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/value-observers.d.ts +22 -0
- package/dist/value-observers.d.ts.map +1 -0
- package/dist/value-observers.js +122 -0
- package/dist/value-observers.js.map +1 -0
- package/dist/value-track.d.ts +13 -0
- package/dist/value-track.d.ts.map +1 -0
- package/dist/value-track.js +59 -0
- package/dist/value-track.js.map +1 -0
- package/dist/vue/index.d.ts +33 -3
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/index.js +118 -3
- package/dist/vue/index.js.map +1 -1
- package/dist/zoomable.d.ts +1 -1
- package/dist/zoomable.d.ts.map +1 -1
- package/package.json +68 -3
- package/platforms/android/include.gradle +10 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/BlurEffect.java +89 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/CircleMath.java +151 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/CircleWorld.java +210 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/GestureSession.java +227 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/GestureSurface.java +54 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/GradientLayer.java +224 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/KeyboardFrame.java +53 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/KeyboardFrameFollower.java +57 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/KeyboardObserver.java +97 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/LiveSpring.java +277 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/MotionProbe.java +70 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/ParticleEmitter.java +192 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/ParticleSimulation.java +114 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/PredictiveBackSession.java +212 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/ReorderHandle.java +25 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/ReorderSession.java +213 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/ReorderSurface.java +27 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/ScrollHeader.java +84 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/SensorMath.java +28 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/SensorSource.java +217 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/ShapeLayer.java +120 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/SharedLayoutFlight.java +287 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/SharedNavigationScene.java +115 -0
- package/platforms/android/java/org/rafaelaugusto/jolt/SpringState.java +39 -0
- package/platforms/android/proguard-rules.pro +20 -0
- package/platforms/ios/build.xcconfig +1 -1
- package/platforms/ios/src/JoltBlur.h +14 -0
- package/platforms/ios/src/JoltBlur.m +86 -0
- package/platforms/ios/src/JoltCircleMath.h +183 -0
- package/platforms/ios/src/JoltCircleWorld.h +17 -0
- package/platforms/ios/src/JoltCircleWorld.m +203 -0
- package/platforms/ios/src/JoltGestureSession.h +23 -0
- package/platforms/ios/src/JoltGestureSession.m +251 -0
- package/platforms/ios/src/JoltInteractiveNavigation.h +23 -0
- package/platforms/ios/src/JoltInteractiveNavigation.m +255 -0
- package/platforms/ios/src/JoltLiveSpring.h +29 -0
- package/platforms/ios/src/JoltLiveSpring.m +243 -0
- package/platforms/ios/src/JoltMotionProbe.h +9 -0
- package/platforms/ios/src/JoltMotionProbe.m +72 -0
- package/platforms/ios/src/JoltReorderSession.h +15 -0
- package/platforms/ios/src/JoltReorderSession.m +205 -0
- package/platforms/ios/src/JoltScrollHeader.h +13 -0
- package/platforms/ios/src/JoltScrollHeader.m +93 -0
- package/platforms/ios/src/JoltSensorMath.h +39 -0
- package/platforms/ios/src/JoltSensorSource.h +13 -0
- package/platforms/ios/src/JoltSensorSource.m +201 -0
- package/platforms/ios/src/JoltSharedLayoutFlight.h +19 -0
- package/platforms/ios/src/JoltSharedLayoutFlight.m +250 -0
- package/platforms/ios/src/JoltSpringState.h +35 -0
- package/platforms/ios/src/module.modulemap +10 -0
- package/src/android-plugin.d.ts +463 -0
- package/src/animate.ts +129 -15
- package/src/blur/index.ts +195 -0
- package/src/blur/native.ts +70 -0
- package/src/blur/types.ts +32 -0
- package/src/bottom-sheet/geometry.ts +84 -0
- package/src/bottom-sheet/index.ts +536 -0
- package/src/bottom-sheet/native.ts +214 -0
- package/src/config.ts +39 -1
- package/src/decay.ts +9 -0
- package/src/drag.ts +67 -21
- package/src/driver/android-gradient.ts +116 -0
- package/src/driver/android-particles.ts +118 -0
- package/src/driver/android.ts +69 -1
- package/src/driver/frame.ts +10 -0
- package/src/driver/index.ts +15 -0
- package/src/driver/ios-gradient.ts +136 -0
- package/src/driver/ios-layout.ts +63 -0
- package/src/driver/ios-scroll-delegate.ts +23 -0
- package/src/driver/ios.ts +70 -17
- package/src/easing.ts +21 -1
- package/src/engine.ts +226 -59
- package/src/gesture-native.ts +139 -0
- package/src/gestures/index.ts +365 -0
- package/src/glass/index.ts +218 -0
- package/src/gradient-binding.ts +158 -0
- package/src/gradient.ts +663 -0
- package/src/gravity.ts +107 -0
- package/src/haptics.ts +106 -28
- package/src/image-effect.ts +10 -2
- package/src/index.ts +59 -7
- package/src/inspector/index.ts +523 -0
- package/src/inspector/plot.ts +27 -0
- package/src/inspector/probe.ts +50 -0
- package/src/inspector/tuning.ts +51 -0
- package/src/interactive-navigation/index.ts +398 -0
- package/src/ios-plugin.d.ts +279 -0
- package/src/keyboard.ts +231 -7
- package/src/layout.ts +408 -0
- package/src/live-spring-driver.ts +181 -0
- package/src/mixer.ts +306 -0
- package/src/motion-scope.ts +53 -6
- package/src/motion-states.ts +149 -42
- package/src/motion-value.ts +1289 -0
- package/src/native/index.ts +30 -0
- package/src/native-properties.ts +188 -0
- package/src/native-property-driver.ts +123 -0
- package/src/native-property.ts +366 -0
- package/src/particles.ts +18 -17
- package/src/path.ts +2 -1
- package/src/physics/index.ts +443 -0
- package/src/physics/native.ts +110 -0
- package/src/playback-group.ts +17 -1
- package/src/playback.ts +41 -0
- package/src/predictive-back/index.ts +280 -0
- package/src/predictive-back/presentation.ts +6 -0
- package/src/reorder/handle.ts +9 -0
- package/src/reorder/index.ts +243 -0
- package/src/reorder/list-view.ts +262 -0
- package/src/reorder/model.ts +47 -0
- package/src/reorder/surface.ts +10 -0
- package/src/reorder/types.ts +87 -0
- package/src/sampling.ts +173 -0
- package/src/scene-appearance.ts +92 -0
- package/src/scene-camera.ts +30 -0
- package/src/scene-shader.ts +139 -0
- package/src/scroll-header/geometry.ts +88 -0
- package/src/scroll-header/index.ts +504 -0
- package/src/scroll-header/native.ts +89 -0
- package/src/sensors/index.ts +246 -0
- package/src/sensors/native.ts +72 -0
- package/src/sequence.ts +209 -20
- package/src/shapes/android.ts +63 -0
- package/src/shapes/index.ts +267 -0
- package/src/shapes/ios.ts +194 -0
- package/src/shapes/native.ts +27 -0
- package/src/shapes/path.ts +127 -0
- package/src/shapes/types.ts +63 -0
- package/src/shared-layout/index.ts +343 -0
- package/src/shared-layout/native.ts +138 -0
- package/src/shared-layout/timing.ts +87 -0
- package/src/shared-navigation/entry.ts +695 -0
- package/src/shared-navigation/index.ts +414 -0
- package/src/shared-navigation/return-signal.ts +41 -0
- package/src/shared-navigation/return-target.ts +197 -0
- package/src/shared-navigation/scope.ts +3 -0
- package/src/shared-navigation/targets.ts +38 -0
- package/src/size-layout.ts +237 -0
- package/src/size.ts +302 -0
- package/src/spring.ts +18 -0
- package/src/svg-path.ts +8 -3
- package/src/testing/clock.ts +128 -0
- package/src/testing/handoff-recorder.ts +98 -0
- package/src/testing/index.ts +4 -0
- package/src/testing/native.ts +386 -0
- package/src/testing/presentation.ts +46 -0
- package/src/testing/replay.ts +149 -0
- package/src/testing/scroll-handoff-native.ts +201 -0
- package/src/testing/scroll-handoff.ts +140 -0
- package/src/testing/sensors.ts +41 -0
- package/src/testing/trace.ts +340 -0
- package/src/timed-animation.ts +192 -0
- package/src/track.ts +334 -38
- package/src/transition.ts +197 -9
- package/src/types.ts +11 -1
- package/src/value-observers.ts +147 -0
- package/src/value-track.ts +71 -0
- package/src/vue/index.ts +147 -1
- package/src/zoomable.ts +1 -1
package/src/motion-states.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { prepareAnimation, toView } from './animate.js'
|
|
1
|
+
import { endingValues, prepareAnimation, set, toView } from './animate.js'
|
|
2
2
|
import { isColorProperty, type ColorValue } from './color.js'
|
|
3
3
|
import { isProperty } from './properties.js'
|
|
4
4
|
import type { Animation } from './engine.js'
|
|
5
5
|
import type { PlaybackAnimation } from './playback.js'
|
|
6
|
-
import type { KeyframeProperty, Keyframes, Target } from './types.js'
|
|
7
|
-
import type {
|
|
6
|
+
import type { KeyframeProperty, Keyframes, Target, Values } from './types.js'
|
|
7
|
+
import type { View } from '@nativescript/core'
|
|
8
|
+
import { mergeTransitions, springs } from './transition.js'
|
|
9
|
+
import type { Gravity, Spring, Tween, SpringName } from './transition.js'
|
|
8
10
|
import type { MotionScope } from './motion-scope.js'
|
|
9
11
|
|
|
10
12
|
/** Absolute endpoints only; keyframe arrays, paths and relative offsets are not states. */
|
|
@@ -20,21 +22,34 @@ export type MotionDefinitions<T, S> = S & {
|
|
|
20
22
|
[K in keyof S[N]]: Record<Exclude<keyof S[N][K], KeyframeProperty>, never>
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
|
-
|
|
25
|
+
type StateCurve =
|
|
24
26
|
| SpringName
|
|
25
27
|
| Omit<Spring, 'repeat' | 'repeatType'>
|
|
26
28
|
| Omit<Tween, 'repeat' | 'repeatType'>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
| Omit<Gravity, 'repeat' | 'repeatType'>
|
|
30
|
+
/** One transition for every target, or a main one with some targets set apart by name. */
|
|
31
|
+
export type StateTransition<T extends string = string> =
|
|
32
|
+
| StateCurve
|
|
33
|
+
| (Exclude<StateCurve, SpringName> &
|
|
34
|
+
(string extends T ? unknown : { [K in T]?: StateCurve }))
|
|
35
|
+
export interface MotionStatesOptions<T extends string = string> {
|
|
36
|
+
transition?: StateTransition<T>
|
|
29
37
|
scope?: MotionScope
|
|
30
38
|
}
|
|
31
|
-
export interface MotionStates<S extends string = string> {
|
|
39
|
+
export interface MotionStates<S extends string = string, T extends string = string> {
|
|
32
40
|
/** Latest requested state, not a claim that playback has finished. */
|
|
33
41
|
readonly current: S | undefined
|
|
34
42
|
readonly settled: S | undefined
|
|
35
43
|
readonly disposed: boolean
|
|
36
44
|
readonly paused: boolean
|
|
37
|
-
to(state: S, transition?: StateTransition): Animation
|
|
45
|
+
to(state: S, transition?: StateTransition<T>): Animation
|
|
46
|
+
/**
|
|
47
|
+
* Point a target at a new view, or at none with `null`. The new view takes the current
|
|
48
|
+
* state at once, or joins the transition in progress from where it is.
|
|
49
|
+
*/
|
|
50
|
+
attach(target: T, view: Target | null): void
|
|
51
|
+
/** A stable callback for a template ref: attaches the element and detaches it on unmount. */
|
|
52
|
+
ref(target: T): (view: Target | null) => void
|
|
38
53
|
pause(): void
|
|
39
54
|
play(): void
|
|
40
55
|
stop(): void
|
|
@@ -43,28 +58,38 @@ export interface MotionStates<S extends string = string> {
|
|
|
43
58
|
|
|
44
59
|
/** Coordinated named targets. Omitted properties freeze when leaving their previous state. */
|
|
45
60
|
export function motionStates<
|
|
46
|
-
T extends Record<string, Target>,
|
|
61
|
+
T extends Record<string, Target | null>,
|
|
47
62
|
const S extends Record<string, MotionState<keyof T>>,
|
|
48
63
|
>(
|
|
49
64
|
targets: T,
|
|
50
65
|
definitions: MotionDefinitions<T, S>,
|
|
51
|
-
options: MotionStatesOptions = {},
|
|
52
|
-
): MotionStates<Extract<keyof S, string>> {
|
|
66
|
+
options: MotionStatesOptions<Extract<keyof T, string>> = {},
|
|
67
|
+
): MotionStates<Extract<keyof S, string>, Extract<keyof T, string>> {
|
|
53
68
|
type Name = Extract<keyof S, string>
|
|
54
|
-
|
|
55
|
-
|
|
69
|
+
type Slot = Extract<keyof T, string>
|
|
70
|
+
const views = new Map<string, View | null>(
|
|
71
|
+
Object.entries(targets).map(([name, target]) => [
|
|
72
|
+
name,
|
|
73
|
+
target === null ? null : toView(target),
|
|
74
|
+
]),
|
|
56
75
|
)
|
|
57
|
-
|
|
76
|
+
const assigned = [...views.values()].filter(Boolean)
|
|
77
|
+
if (new Set(assigned).size !== assigned.length)
|
|
58
78
|
throw new TypeError('Motion state targets must refer to distinct views.')
|
|
59
|
-
const
|
|
60
|
-
|
|
79
|
+
for (const name of views.keys())
|
|
80
|
+
if (curveKeys.has(name))
|
|
81
|
+
throw new TypeError(
|
|
82
|
+
`A motion target can't be named "${name}", like a transition option.`,
|
|
83
|
+
)
|
|
84
|
+
const states = new Map<string, [string, Keyframes][]>()
|
|
85
|
+
const defaults = normalize(options.transition, views)
|
|
61
86
|
for (const [name, state] of Object.entries(definitions)) {
|
|
62
87
|
if (!state || typeof state !== 'object' || Array.isArray(state))
|
|
63
88
|
throw new TypeError(`Invalid motion state "${name}".`)
|
|
64
|
-
const rows: [
|
|
89
|
+
const rows: [string, Keyframes][] = []
|
|
65
90
|
for (const [target, values] of Object.entries(state)) {
|
|
91
|
+
if (!views.has(target)) throw new TypeError(`Unknown motion target "${target}".`)
|
|
66
92
|
const view = views.get(target)
|
|
67
|
-
if (!view) throw new TypeError(`Unknown motion target "${target}".`)
|
|
68
93
|
if (!values || typeof values !== 'object' || Array.isArray(values))
|
|
69
94
|
throw new TypeError(`Invalid motion values for "${target}".`)
|
|
70
95
|
const frames: Keyframes = {}
|
|
@@ -82,8 +107,9 @@ export function motionStates<
|
|
|
82
107
|
Object.assign(frames, { [property]: value })
|
|
83
108
|
}
|
|
84
109
|
// Validate every definition up front without claiming any native property.
|
|
85
|
-
prepareAnimation(view, frames, defaults)
|
|
86
|
-
|
|
110
|
+
if (view) prepareAnimation(view, frames, timingFor(defaults, target))
|
|
111
|
+
else endingValues(frames, timingFor(defaults, target))
|
|
112
|
+
rows.push([target, frames])
|
|
87
113
|
}
|
|
88
114
|
states.set(name, rows)
|
|
89
115
|
}
|
|
@@ -91,8 +117,14 @@ export function motionStates<
|
|
|
91
117
|
let settled: Name | undefined
|
|
92
118
|
let disposed = false
|
|
93
119
|
let paused = false
|
|
94
|
-
let active:
|
|
95
|
-
|
|
120
|
+
let active:
|
|
121
|
+
{ handle: Animation; children: PlaybackAnimation[]; timing: Timing } | undefined
|
|
122
|
+
const refs = new Map<string, (view: Target | null) => void>()
|
|
123
|
+
const framesFor = (state: Name | undefined, target: string) =>
|
|
124
|
+
state === undefined
|
|
125
|
+
? undefined
|
|
126
|
+
: states.get(state)!.find(([slot]) => slot === target)?.[1]
|
|
127
|
+
const controller: MotionStates<Name, Slot> = {
|
|
96
128
|
get current() {
|
|
97
129
|
return current
|
|
98
130
|
},
|
|
@@ -109,10 +141,11 @@ export function motionStates<
|
|
|
109
141
|
if (disposed) throw new Error('Motion states controller is disposed.')
|
|
110
142
|
const rows = states.get(name)
|
|
111
143
|
if (!rows) throw new TypeError(`Unknown motion state "${name}".`)
|
|
112
|
-
const timing = transition
|
|
113
|
-
const prepared = rows.
|
|
114
|
-
|
|
115
|
-
|
|
144
|
+
const timing = normalize(transition, views, defaults)
|
|
145
|
+
const prepared = rows.flatMap(([target, frames]) => {
|
|
146
|
+
const view = views.get(target)
|
|
147
|
+
return view ? [prepareAnimation(view, frames, timingFor(timing, target))] : []
|
|
148
|
+
})
|
|
116
149
|
const previous = active
|
|
117
150
|
const children: PlaybackAnimation[] = []
|
|
118
151
|
// Start replacements first: the engine transfers visible position AND velocity.
|
|
@@ -148,12 +181,45 @@ export function motionStates<
|
|
|
148
181
|
},
|
|
149
182
|
then: (resolve, reject) => finished.then(resolve, reject),
|
|
150
183
|
}
|
|
151
|
-
active = { handle, children }
|
|
184
|
+
active = { handle, children, timing }
|
|
152
185
|
current = name
|
|
153
186
|
// Also cancels old, omitted properties, without touching the new owners.
|
|
154
187
|
previous?.handle.stop()
|
|
155
188
|
return handle
|
|
156
189
|
},
|
|
190
|
+
attach(target, next) {
|
|
191
|
+
if (disposed) throw new Error('Motion states controller is disposed.')
|
|
192
|
+
if (!views.has(target)) throw new TypeError(`Unknown motion target "${target}".`)
|
|
193
|
+
const view = next === null ? null : toView(next)
|
|
194
|
+
if (views.get(target) === view) return
|
|
195
|
+
if (view)
|
|
196
|
+
for (const [other, assignedView] of views)
|
|
197
|
+
if (other !== target && assignedView === view)
|
|
198
|
+
throw new TypeError('Motion state targets must refer to distinct views.')
|
|
199
|
+
if (view)
|
|
200
|
+
for (const [, rows] of states)
|
|
201
|
+
for (const [slot, frames] of rows)
|
|
202
|
+
if (slot === target)
|
|
203
|
+
prepareAnimation(view, frames, timingFor(defaults, target))
|
|
204
|
+
views.set(target, view)
|
|
205
|
+
const frames = view ? framesFor(current, target) : undefined
|
|
206
|
+
if (!view || !frames) return
|
|
207
|
+
if (active) {
|
|
208
|
+
const child = prepareAnimation(view, frames, timingFor(active.timing, target))()
|
|
209
|
+
active.children.push(child)
|
|
210
|
+
if (paused) child.pause()
|
|
211
|
+
} else set(view, frames as Values)
|
|
212
|
+
},
|
|
213
|
+
ref(target) {
|
|
214
|
+
let callback = refs.get(target)
|
|
215
|
+
if (!callback) {
|
|
216
|
+
callback = (view) => {
|
|
217
|
+
if (!disposed) controller.attach(target, view)
|
|
218
|
+
}
|
|
219
|
+
refs.set(target, callback)
|
|
220
|
+
}
|
|
221
|
+
return callback
|
|
222
|
+
},
|
|
157
223
|
pause() {
|
|
158
224
|
if (disposed || paused) return
|
|
159
225
|
paused = true
|
|
@@ -177,8 +243,61 @@ export function motionStates<
|
|
|
177
243
|
return options.scope ? options.scope.add(controller) : controller
|
|
178
244
|
}
|
|
179
245
|
|
|
180
|
-
|
|
181
|
-
|
|
246
|
+
const curveKeys = new Set([
|
|
247
|
+
'type',
|
|
248
|
+
'delay',
|
|
249
|
+
'duration',
|
|
250
|
+
'ease',
|
|
251
|
+
'times',
|
|
252
|
+
'stiffness',
|
|
253
|
+
'damping',
|
|
254
|
+
'mass',
|
|
255
|
+
'bounce',
|
|
256
|
+
'velocity',
|
|
257
|
+
'acceleration',
|
|
258
|
+
'restitution',
|
|
259
|
+
])
|
|
260
|
+
|
|
261
|
+
type Curve = Exclude<StateCurve, SpringName>
|
|
262
|
+
interface Timing {
|
|
263
|
+
readonly main: StateCurve
|
|
264
|
+
readonly targets: ReadonlyMap<string, StateCurve>
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/** The transition one target plays: its own merged over the main one, or the main one. */
|
|
268
|
+
function timingFor(timing: Timing, target: string): StateCurve {
|
|
269
|
+
const own = timing.targets.get(target)
|
|
270
|
+
if (own === undefined) return timing.main
|
|
271
|
+
const main = typeof timing.main === 'string' ? springs[timing.main] : timing.main
|
|
272
|
+
return mergeTransitions(main, typeof own === 'string' ? springs[own] : own) as Curve
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
const snappy: Timing = { main: 'snappy', targets: new Map() }
|
|
276
|
+
|
|
277
|
+
/** A transition that only names targets keeps the fallback for everything else. */
|
|
278
|
+
function normalize(
|
|
279
|
+
transition: StateTransition | undefined,
|
|
280
|
+
targets: ReadonlyMap<string, unknown>,
|
|
281
|
+
fallback = snappy,
|
|
282
|
+
): Timing {
|
|
283
|
+
if (transition === undefined) return fallback
|
|
284
|
+
if (typeof transition === 'string')
|
|
285
|
+
return { main: curve(transition), targets: new Map() }
|
|
286
|
+
if (!transition || typeof transition !== 'object')
|
|
287
|
+
throw new TypeError('Invalid state transition.')
|
|
288
|
+
const main: Record<string, unknown> = {}
|
|
289
|
+
const own = new Map<string, StateCurve>()
|
|
290
|
+
for (const [key, value] of Object.entries(transition)) {
|
|
291
|
+
if (targets.has(key)) {
|
|
292
|
+
if (value !== undefined) own.set(key, curve(value as StateCurve))
|
|
293
|
+
} else main[key] = value
|
|
294
|
+
}
|
|
295
|
+
if (own.size && !Object.keys(main).length)
|
|
296
|
+
return { main: fallback.main, targets: new Map([...fallback.targets, ...own]) }
|
|
297
|
+
return { main: curve(main as Curve), targets: own }
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
function curve(transition: StateCurve): StateCurve {
|
|
182
301
|
if (typeof transition === 'string') {
|
|
183
302
|
if (!['smooth', 'snappy', 'bouncy'].includes(transition))
|
|
184
303
|
throw new TypeError('Unknown state spring.')
|
|
@@ -186,20 +305,8 @@ function normalize(transition: StateTransition | undefined): StateTransition {
|
|
|
186
305
|
}
|
|
187
306
|
if (!transition || typeof transition !== 'object')
|
|
188
307
|
throw new TypeError('Invalid state transition.')
|
|
189
|
-
const allowed = new Set([
|
|
190
|
-
'type',
|
|
191
|
-
'delay',
|
|
192
|
-
'duration',
|
|
193
|
-
'ease',
|
|
194
|
-
'times',
|
|
195
|
-
'stiffness',
|
|
196
|
-
'damping',
|
|
197
|
-
'mass',
|
|
198
|
-
'bounce',
|
|
199
|
-
'velocity',
|
|
200
|
-
])
|
|
201
308
|
for (const key of Object.keys(transition))
|
|
202
|
-
if (!
|
|
309
|
+
if (!curveKeys.has(key))
|
|
203
310
|
throw new TypeError(`State transitions do not support "${key}".`)
|
|
204
311
|
if (
|
|
205
312
|
transition.duration !== undefined &&
|