react-native-gtkx 0.2.0-alpha.2 → 0.3.0-alpha.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 +5 -2
- package/dist/aliases/index.d.ts +84 -0
- package/dist/aliases/index.js +208 -0
- package/dist/aliases/index.js.map +1 -0
- package/dist/animated/index.d.ts +2 -0
- package/dist/animated/index.js +5 -0
- package/dist/animated/index.js.map +1 -1
- package/dist/animated/types.d.ts +1 -0
- package/dist/animated/types.js.map +1 -1
- package/dist/animated/value-animation.js +17 -4
- package/dist/animated/value-animation.js.map +1 -1
- package/dist/apis/host.gtkx.js +9 -12
- package/dist/apis/host.gtkx.js.map +1 -1
- package/dist/apis/index.d.ts +4 -2
- package/dist/apis/index.js +2 -0
- package/dist/apis/index.js.map +1 -1
- package/dist/apis/keyboard.d.ts +60 -0
- package/dist/apis/keyboard.js +63 -0
- package/dist/apis/keyboard.js.map +1 -0
- package/dist/apis/log-box.d.ts +15 -0
- package/dist/apis/log-box.js +46 -0
- package/dist/apis/log-box.js.map +1 -0
- package/dist/apis/platform.d.ts +18 -1
- package/dist/apis/platform.js.map +1 -1
- package/dist/common/index.d.ts +0 -1
- package/dist/common/index.js +24 -1
- package/dist/common/index.js.map +1 -1
- package/dist/components/animated.d.ts +70 -6
- package/dist/components/animated.js +559 -46
- package/dist/components/animated.js.map +1 -1
- package/dist/components/driven-size.d.ts +27 -0
- package/dist/components/driven-size.js +85 -0
- package/dist/components/driven-size.js.map +1 -0
- package/dist/components/find-node-handle.d.ts +11 -0
- package/dist/components/find-node-handle.js +53 -0
- package/dist/components/find-node-handle.js.map +1 -0
- package/dist/components/flat-list.d.ts +3 -2
- package/dist/components/flat-list.js.map +1 -1
- package/dist/components/frame-scheduler.d.ts +16 -0
- package/dist/components/frame-scheduler.js +37 -0
- package/dist/components/frame-scheduler.js.map +1 -0
- package/dist/components/image.d.ts +6 -1
- package/dist/components/image.js +15 -4
- package/dist/components/image.js.map +1 -1
- package/dist/components/index.d.ts +7 -5
- package/dist/components/index.js +5 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/measure.d.ts +51 -1
- package/dist/components/measure.js +101 -2
- package/dist/components/measure.js.map +1 -1
- package/dist/components/pressable.d.ts +61 -1
- package/dist/components/pressable.js +151 -4
- package/dist/components/pressable.js.map +1 -1
- package/dist/components/rect-store.d.ts +58 -0
- package/dist/components/rect-store.js +124 -3
- package/dist/components/rect-store.js.map +1 -1
- package/dist/components/root.js +6 -1
- package/dist/components/root.js.map +1 -1
- package/dist/components/scroll-phase.d.ts +35 -0
- package/dist/components/scroll-phase.js +26 -0
- package/dist/components/scroll-phase.js.map +1 -0
- package/dist/components/scroll-view.d.ts +39 -3
- package/dist/components/scroll-view.js +378 -43
- package/dist/components/scroll-view.js.map +1 -1
- package/dist/components/text-input.js +9 -25
- package/dist/components/text-input.js.map +1 -1
- package/dist/components/text.d.ts +6 -2
- package/dist/components/text.js +43 -8
- package/dist/components/text.js.map +1 -1
- package/dist/components/use-focus.d.ts +27 -0
- package/dist/components/use-focus.js +116 -0
- package/dist/components/use-focus.js.map +1 -0
- package/dist/components/use-layout-child.d.ts +13 -1
- package/dist/components/use-layout-child.js +188 -5
- package/dist/components/use-layout-child.js.map +1 -1
- package/dist/components/view.d.ts +5 -2
- package/dist/components/view.js +18 -13
- package/dist/components/view.js.map +1 -1
- package/dist/components/virtualized-list.d.ts +45 -5
- package/dist/components/virtualized-list.js +90 -24
- package/dist/components/virtualized-list.js.map +1 -1
- package/dist/components/wheel-scroll-session.d.ts +7 -0
- package/dist/components/wheel-scroll-session.js +53 -0
- package/dist/components/wheel-scroll-session.js.map +1 -0
- package/dist/components/widget-retention.d.ts +35 -0
- package/dist/components/widget-retention.js +169 -0
- package/dist/components/widget-retention.js.map +1 -0
- package/dist/contracts.d.ts +4 -0
- package/dist/contracts.js.map +1 -1
- package/dist/dnd/context.d.ts +69 -0
- package/dist/dnd/context.js +149 -0
- package/dist/dnd/context.js.map +1 -0
- package/dist/dnd/draggable.d.ts +59 -0
- package/dist/dnd/draggable.js +149 -0
- package/dist/dnd/draggable.js.map +1 -0
- package/dist/dnd/droppable.d.ts +24 -0
- package/dist/dnd/droppable.js +74 -0
- package/dist/dnd/droppable.js.map +1 -0
- package/dist/dnd/gtk-controllers.d.ts +39 -0
- package/dist/dnd/gtk-controllers.js +110 -0
- package/dist/dnd/gtk-controllers.js.map +1 -0
- package/dist/dnd/index.d.ts +6 -0
- package/dist/dnd/index.js +31 -0
- package/dist/dnd/index.js.map +1 -0
- package/dist/dnd/order.d.ts +7 -0
- package/dist/dnd/order.js +20 -0
- package/dist/dnd/order.js.map +1 -0
- package/dist/dnd/payload.d.ts +14 -0
- package/dist/dnd/payload.js +41 -0
- package/dist/dnd/payload.js.map +1 -0
- package/dist/dnd/sortable.d.ts +49 -0
- package/dist/dnd/sortable.js +307 -0
- package/dist/dnd/sortable.js.map +1 -0
- package/dist/dnd/types.d.ts +290 -0
- package/dist/dnd/types.js +25 -0
- package/dist/dnd/types.js.map +1 -0
- package/dist/gesture-handler-compat/builder.d.ts +251 -0
- package/dist/gesture-handler-compat/builder.js +513 -0
- package/dist/gesture-handler-compat/builder.js.map +1 -0
- package/dist/gesture-handler-compat/composition.d.ts +23 -0
- package/dist/gesture-handler-compat/composition.js +111 -0
- package/dist/gesture-handler-compat/composition.js.map +1 -0
- package/dist/gesture-handler-compat/deciders.d.ts +3 -0
- package/dist/gesture-handler-compat/deciders.js +47 -0
- package/dist/gesture-handler-compat/deciders.js.map +1 -0
- package/dist/gesture-handler-compat/detector-runtime.d.ts +44 -0
- package/dist/gesture-handler-compat/detector-runtime.js +374 -0
- package/dist/gesture-handler-compat/detector-runtime.js.map +1 -0
- package/dist/gesture-handler-compat/detector.d.ts +22 -0
- package/dist/gesture-handler-compat/detector.js +104 -0
- package/dist/gesture-handler-compat/detector.js.map +1 -0
- package/dist/gesture-handler-compat/fling.d.ts +24 -0
- package/dist/gesture-handler-compat/fling.js +123 -0
- package/dist/gesture-handler-compat/fling.js.map +1 -0
- package/dist/gesture-handler-compat/force-touch.d.ts +13 -0
- package/dist/gesture-handler-compat/force-touch.js +40 -0
- package/dist/gesture-handler-compat/force-touch.js.map +1 -0
- package/dist/gesture-handler-compat/hooks.d.ts +157 -0
- package/dist/gesture-handler-compat/hooks.js +268 -0
- package/dist/gesture-handler-compat/hooks.js.map +1 -0
- package/dist/gesture-handler-compat/hover.d.ts +2 -0
- package/dist/gesture-handler-compat/hover.js +22 -0
- package/dist/gesture-handler-compat/hover.js.map +1 -0
- package/dist/gesture-handler-compat/index.d.ts +98 -0
- package/dist/gesture-handler-compat/index.js +255 -0
- package/dist/gesture-handler-compat/index.js.map +1 -0
- package/dist/gesture-handler-compat/long-press.d.ts +6 -0
- package/dist/gesture-handler-compat/long-press.js +21 -0
- package/dist/gesture-handler-compat/long-press.js.map +1 -0
- package/dist/gesture-handler-compat/manual.d.ts +2 -0
- package/dist/gesture-handler-compat/manual.js +18 -0
- package/dist/gesture-handler-compat/manual.js.map +1 -0
- package/dist/gesture-handler-compat/native.d.ts +7 -0
- package/dist/gesture-handler-compat/native.js +34 -0
- package/dist/gesture-handler-compat/native.js.map +1 -0
- package/dist/gesture-handler-compat/orchestrator.d.ts +77 -0
- package/dist/gesture-handler-compat/orchestrator.js +284 -0
- package/dist/gesture-handler-compat/orchestrator.js.map +1 -0
- package/dist/gesture-handler-compat/pan.d.ts +23 -0
- package/dist/gesture-handler-compat/pan.js +116 -0
- package/dist/gesture-handler-compat/pan.js.map +1 -0
- package/dist/gesture-handler-compat/recognizer.d.ts +268 -0
- package/dist/gesture-handler-compat/recognizer.js +1056 -0
- package/dist/gesture-handler-compat/recognizer.js.map +1 -0
- package/dist/gesture-handler-compat/relations.d.ts +43 -0
- package/dist/gesture-handler-compat/relations.js +128 -0
- package/dist/gesture-handler-compat/relations.js.map +1 -0
- package/dist/gesture-handler-compat/tap.d.ts +6 -0
- package/dist/gesture-handler-compat/tap.js +29 -0
- package/dist/gesture-handler-compat/tap.js.map +1 -0
- package/dist/gesture-handler-compat/touchpad.d.ts +41 -0
- package/dist/gesture-handler-compat/touchpad.js +64 -0
- package/dist/gesture-handler-compat/touchpad.js.map +1 -0
- package/dist/gesture-handler-compat/types.d.ts +441 -0
- package/dist/gesture-handler-compat/types.js +167 -0
- package/dist/gesture-handler-compat/types.js.map +1 -0
- package/dist/gtk/controllers.d.ts +39 -0
- package/dist/gtk/controllers.js +92 -0
- package/dist/gtk/controllers.js.map +1 -0
- package/dist/gtk/index.d.ts +2 -1
- package/dist/gtk/index.js +7 -1
- package/dist/gtk/index.js.map +1 -1
- package/dist/gtkx/bridge/geometry.js +6 -4
- package/dist/gtkx/bridge/geometry.js.map +1 -1
- package/dist/gtkx/bridge/index.d.ts +5 -3
- package/dist/gtkx/bridge/index.js +6 -3
- package/dist/gtkx/bridge/index.js.map +1 -1
- package/dist/gtkx/bridge/slot-portal.js.map +1 -1
- package/dist/gtkx/bridge/use-signal.js +1 -1
- package/dist/gtkx/bridge/use-signal.js.map +1 -1
- package/dist/gtkx/bridge/view-box.d.ts +56 -0
- package/dist/gtkx/bridge/view-box.js +394 -9
- package/dist/gtkx/bridge/view-box.js.map +1 -1
- package/dist/gtkx/bridge/widget-css.d.ts +17 -0
- package/dist/gtkx/bridge/widget-css.js +72 -0
- package/dist/gtkx/bridge/widget-css.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/layout/driven-size.d.ts +12 -0
- package/dist/layout/driven-size.js +70 -0
- package/dist/layout/driven-size.js.map +1 -0
- package/dist/layout/engine.d.ts +17 -1
- package/dist/layout/engine.js +3 -20
- package/dist/layout/engine.js.map +1 -1
- package/dist/layout/node.d.ts +13 -0
- package/dist/layout/node.js +14 -0
- package/dist/layout/node.js.map +1 -1
- package/dist/layout/yoga.d.ts +3 -2
- package/dist/layout/yoga.js +5 -2
- package/dist/layout/yoga.js.map +1 -1
- package/dist/mcp/data/generated.d.ts +257 -60
- package/dist/mcp/data/generated.js +306 -62
- package/dist/mcp/data/generated.js.map +1 -1
- package/dist/metro/index.d.ts +10 -0
- package/dist/metro/index.js +21 -12
- package/dist/metro/index.js.map +1 -1
- package/dist/navigation/sidebar.d.ts +16 -0
- package/dist/navigation/sidebar.js +65 -1
- package/dist/navigation/sidebar.js.map +1 -1
- package/dist/reanimated-compat/animated-ref.d.ts +32 -0
- package/dist/reanimated-compat/animated-ref.js +57 -0
- package/dist/reanimated-compat/animated-ref.js.map +1 -0
- package/dist/reanimated-compat/animation.d.ts +177 -0
- package/dist/reanimated-compat/animation.js +540 -0
- package/dist/reanimated-compat/animation.js.map +1 -0
- package/dist/reanimated-compat/color.d.ts +28 -0
- package/dist/reanimated-compat/color.js +249 -0
- package/dist/reanimated-compat/color.js.map +1 -0
- package/dist/reanimated-compat/decay.d.ts +39 -0
- package/dist/reanimated-compat/decay.js +96 -0
- package/dist/reanimated-compat/decay.js.map +1 -0
- package/dist/reanimated-compat/easing.d.ts +30 -0
- package/dist/reanimated-compat/easing.js +76 -0
- package/dist/reanimated-compat/easing.js.map +1 -0
- package/dist/reanimated-compat/hooks.d.ts +14 -0
- package/dist/reanimated-compat/hooks.js +217 -0
- package/dist/reanimated-compat/hooks.js.map +1 -0
- package/dist/reanimated-compat/index.d.ts +258 -0
- package/dist/reanimated-compat/index.js +464 -0
- package/dist/reanimated-compat/index.js.map +1 -0
- package/dist/reanimated-compat/interpolation.d.ts +18 -0
- package/dist/reanimated-compat/interpolation.js +122 -0
- package/dist/reanimated-compat/interpolation.js.map +1 -0
- package/dist/reanimated-compat/layout-animation-config.d.ts +43 -0
- package/dist/reanimated-compat/layout-animation-config.js +78 -0
- package/dist/reanimated-compat/layout-animation-config.js.map +1 -0
- package/dist/reanimated-compat/layout-animation-presets.d.ts +117 -0
- package/dist/reanimated-compat/layout-animation-presets.js +498 -0
- package/dist/reanimated-compat/layout-animation-presets.js.map +1 -0
- package/dist/reanimated-compat/layout-animation-runtime.d.ts +21 -0
- package/dist/reanimated-compat/layout-animation-runtime.js +311 -0
- package/dist/reanimated-compat/layout-animation-runtime.js.map +1 -0
- package/dist/reanimated-compat/layout-animation-view.d.ts +27 -0
- package/dist/reanimated-compat/layout-animation-view.js +266 -0
- package/dist/reanimated-compat/layout-animation-view.js.map +1 -0
- package/dist/reanimated-compat/layout-animation.d.ts +171 -0
- package/dist/reanimated-compat/layout-animation.js +469 -0
- package/dist/reanimated-compat/layout-animation.js.map +1 -0
- package/dist/reanimated-compat/layout-transitions.d.ts +83 -0
- package/dist/reanimated-compat/layout-transitions.js +350 -0
- package/dist/reanimated-compat/layout-transitions.js.map +1 -0
- package/dist/reanimated-compat/mutable.d.ts +29 -0
- package/dist/reanimated-compat/mutable.js +139 -0
- package/dist/reanimated-compat/mutable.js.map +1 -0
- package/dist/reanimated-compat/props.d.ts +18 -0
- package/dist/reanimated-compat/props.js +111 -0
- package/dist/reanimated-compat/props.js.map +1 -0
- package/dist/reanimated-compat/scroll-handler.d.ts +119 -0
- package/dist/reanimated-compat/scroll-handler.js +274 -0
- package/dist/reanimated-compat/scroll-handler.js.map +1 -0
- package/dist/reanimated-compat/scroll-offset.d.ts +12 -0
- package/dist/reanimated-compat/scroll-offset.js +104 -0
- package/dist/reanimated-compat/scroll-offset.js.map +1 -0
- package/dist/reanimated-compat/style.d.ts +90 -0
- package/dist/reanimated-compat/style.js +452 -0
- package/dist/reanimated-compat/style.js.map +1 -0
- package/dist/reanimated-compat/test-timers.d.ts +28 -0
- package/dist/reanimated-compat/test-timers.js +136 -0
- package/dist/reanimated-compat/test-timers.js.map +1 -0
- package/dist/reanimated-compat/threads.d.ts +13 -0
- package/dist/reanimated-compat/threads.js +41 -0
- package/dist/reanimated-compat/threads.js.map +1 -0
- package/dist/reanimated-compat/tracking.d.ts +41 -0
- package/dist/reanimated-compat/tracking.js +106 -0
- package/dist/reanimated-compat/tracking.js.map +1 -0
- package/dist/reanimated-compat/updater-animations.d.ts +36 -0
- package/dist/reanimated-compat/updater-animations.js +273 -0
- package/dist/reanimated-compat/updater-animations.js.map +1 -0
- package/dist/responder/system.d.ts +80 -7
- package/dist/responder/system.js +143 -23
- package/dist/responder/system.js.map +1 -1
- package/dist/responder/use-responder.d.ts +11 -0
- package/dist/responder/use-responder.js +225 -6
- package/dist/responder/use-responder.js.map +1 -1
- package/dist/runner/host-dev.js +1 -1
- package/dist/runner/host-dev.js.map +1 -1
- package/dist/runner/host.js +1 -1
- package/dist/runner/host.js.map +1 -1
- package/dist/runner/index.js +3 -3
- package/dist/runner/index.js.map +1 -1
- package/dist/sea/gtkx-config-module.js +1 -1
- package/dist/sea/gtkx-config-module.js.map +1 -1
- package/dist/style/absolute-insets.d.ts +26 -0
- package/dist/style/absolute-insets.js +113 -0
- package/dist/style/absolute-insets.js.map +1 -0
- package/dist/style/animated-size.d.ts +25 -0
- package/dist/style/animated-size.js +225 -0
- package/dist/style/animated-size.js.map +1 -0
- package/dist/style/colors.d.ts +17 -0
- package/dist/style/colors.js +25 -6
- package/dist/style/colors.js.map +1 -1
- package/dist/style/imperative-css.d.ts +21 -0
- package/dist/style/imperative-css.js +63 -0
- package/dist/style/imperative-css.js.map +1 -0
- package/dist/style/index.d.ts +2 -1
- package/dist/style/index.js +2 -1
- package/dist/style/index.js.map +1 -1
- package/dist/style/split-style.js +5 -0
- package/dist/style/split-style.js.map +1 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/unsupported-export.d.ts +8 -0
- package/dist/unsupported-export.js +66 -0
- package/dist/unsupported-export.js.map +1 -0
- package/dist/vite/index.d.ts +21 -8
- package/dist/vite/index.js +127 -82
- package/dist/vite/index.js.map +1 -1
- package/dist/vitest/index.d.ts +2 -2
- package/dist/vitest/index.js.map +1 -1
- package/dist/worklets-compat/index.d.ts +4 -0
- package/dist/worklets-compat/index.js +28 -0
- package/dist/worklets-compat/index.js.map +1 -0
- package/dist/worklets-compat/surface.d.ts +110 -0
- package/dist/worklets-compat/surface.js +153 -0
- package/dist/worklets-compat/surface.js.map +1 -0
- package/package.json +25 -9
- package/types.d.ts +9 -0
- package/dist/common/list.d.ts +0 -82
- package/dist/common/list.js +0 -166
- package/dist/common/list.js.map +0 -1
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
// The layout-animation builders' base class, and the four that are written by
|
|
2
|
+
// hand: `FadeIn`, `FadeOut`, `LinearTransition` and `Keyframe`.
|
|
3
|
+
//
|
|
4
|
+
// A builder is plain data with a fluent surface. `FadeIn`, the class itself,
|
|
5
|
+
// is a valid `entering` value; so is `FadeIn.duration(400).delay(100)`, which
|
|
6
|
+
// is why every chainable method exists twice — once as an instance method and
|
|
7
|
+
// once as a static that makes an instance first. That is upstream's own shape
|
|
8
|
+
// (`BaseAnimationBuilder`), mirrored rather than reinvented, because app code
|
|
9
|
+
// and library code both write it.
|
|
10
|
+
//
|
|
11
|
+
// `build()` returns upstream's function too: `(values) => ({ initialValues,
|
|
12
|
+
// animations, callback })`, where `animations` holds ordinary `withTiming` /
|
|
13
|
+
// `withSpring` descriptors keyed by property. Nothing here knows about GTK, a
|
|
14
|
+
// widget, or a retention — this file decides WHAT should happen; the runtime
|
|
15
|
+
// (layout-animation-runtime.ts) decides what of it this platform can honour
|
|
16
|
+
// and drives it.
|
|
17
|
+
//
|
|
18
|
+
// SCOPE. The base class plus the four builders that cannot be expressed as a
|
|
19
|
+
// table: three because they are the primitives everything else is measured
|
|
20
|
+
// against, and `Keyframe` because it is the one builder you INSTANTIATE with a
|
|
21
|
+
// track rather than configure. The catalogue proper — `BounceIn*`,
|
|
22
|
+
// `Pinwheel*`, `Roll*`, `Stretch*` and the rest — is exactly the same
|
|
23
|
+
// `initialValues`/`animations` pair over a different pair of numbers, so it
|
|
24
|
+
// lives as data in layout-animation-presets.ts; the four `*Transition`
|
|
25
|
+
// builders beside `LinearTransition` live in layout-transitions.ts.
|
|
26
|
+
import { parseAngle } from "../style/transform";
|
|
27
|
+
import { withDelay, withSequence, withSpring, withTiming, } from "./animation";
|
|
28
|
+
const DEFAULT_DURATION = 300;
|
|
29
|
+
export class AnimationBuilder {
|
|
30
|
+
durationV = undefined;
|
|
31
|
+
delayV = undefined;
|
|
32
|
+
easingV = undefined;
|
|
33
|
+
randomizeDelay = false;
|
|
34
|
+
type = "timing";
|
|
35
|
+
springConfigV = {};
|
|
36
|
+
initialValuesV = {};
|
|
37
|
+
callbackV = undefined;
|
|
38
|
+
rotateV = undefined;
|
|
39
|
+
static createInstance() {
|
|
40
|
+
return new this();
|
|
41
|
+
}
|
|
42
|
+
duration(durationMs) {
|
|
43
|
+
this.durationV = durationMs;
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
|
+
delay(delayMs) {
|
|
47
|
+
this.delayV = delayMs;
|
|
48
|
+
return this;
|
|
49
|
+
}
|
|
50
|
+
easing(easingFunction) {
|
|
51
|
+
this.easingV = easingFunction;
|
|
52
|
+
return this;
|
|
53
|
+
}
|
|
54
|
+
/** Upstream's "spread the delay over a window" helper, ported as-is. */
|
|
55
|
+
randomDelay() {
|
|
56
|
+
this.randomizeDelay = true;
|
|
57
|
+
return this;
|
|
58
|
+
}
|
|
59
|
+
springify(durationMs) {
|
|
60
|
+
this.type = "spring";
|
|
61
|
+
if (durationMs !== undefined) {
|
|
62
|
+
this.springConfigV.duration = durationMs;
|
|
63
|
+
// Upstream's `springify()` writes the same field `.duration()` does, so
|
|
64
|
+
// `getDuration()` reports the spring's length too. That matters here
|
|
65
|
+
// beyond parity: the retention fallback that keeps an exiting widget on
|
|
66
|
+
// screen is armed from `getMaxDuration()`, and a fallback shorter than
|
|
67
|
+
// the animation cuts the animation off.
|
|
68
|
+
this.durationV = durationMs;
|
|
69
|
+
}
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The angle `ZoomInRotate` / `ZoomOutRotate` spin through.
|
|
74
|
+
*
|
|
75
|
+
* Upstream takes a bare number of RADIANS in a string (its default is
|
|
76
|
+
* `'0.3'`, interpolated into `` `${rotate}rad` ``), and a united value like
|
|
77
|
+
* `'90deg'` reaches its template as `'90degrad'`. A bare number or numeric
|
|
78
|
+
* string is read as radians here, exactly as upstream; a value that carries
|
|
79
|
+
* its own `deg`/`rad` unit is parsed instead of being concatenated into
|
|
80
|
+
* nonsense.
|
|
81
|
+
*/
|
|
82
|
+
rotate(angle) {
|
|
83
|
+
this.rotateV = angle;
|
|
84
|
+
return this;
|
|
85
|
+
}
|
|
86
|
+
damping(value) {
|
|
87
|
+
this.springConfigV.damping = value;
|
|
88
|
+
return this;
|
|
89
|
+
}
|
|
90
|
+
dampingRatio(value) {
|
|
91
|
+
this.springConfigV.dampingRatio = value;
|
|
92
|
+
return this;
|
|
93
|
+
}
|
|
94
|
+
mass(value) {
|
|
95
|
+
this.springConfigV.mass = value;
|
|
96
|
+
return this;
|
|
97
|
+
}
|
|
98
|
+
stiffness(value) {
|
|
99
|
+
this.springConfigV.stiffness = value;
|
|
100
|
+
return this;
|
|
101
|
+
}
|
|
102
|
+
overshootClamping(value) {
|
|
103
|
+
this.springConfigV.overshootClamping = Boolean(value);
|
|
104
|
+
return this;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Accepted and ignored, because this platform's spring solver derives its
|
|
108
|
+
* rest condition from the same energy budget upstream stops on rather than
|
|
109
|
+
* from absolute thresholds — the difference is well under a pixel and is
|
|
110
|
+
* already in docs/api.md's differences table.
|
|
111
|
+
*/
|
|
112
|
+
restDisplacementThreshold() {
|
|
113
|
+
return this;
|
|
114
|
+
}
|
|
115
|
+
restSpeedThreshold() {
|
|
116
|
+
return this;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Accepted and ignored: no reduce-motion source is wired on this platform
|
|
120
|
+
* yet, so every value behaves as `ReduceMotion.Never` — the same answer
|
|
121
|
+
* `useReducedMotion()` gives.
|
|
122
|
+
*/
|
|
123
|
+
reduceMotion() {
|
|
124
|
+
return this;
|
|
125
|
+
}
|
|
126
|
+
withInitialValues(values) {
|
|
127
|
+
this.initialValuesV = values;
|
|
128
|
+
return this;
|
|
129
|
+
}
|
|
130
|
+
withCallback(callback) {
|
|
131
|
+
this.callbackV = callback;
|
|
132
|
+
return this;
|
|
133
|
+
}
|
|
134
|
+
getDelay() {
|
|
135
|
+
const delay = this.delayV ?? 0;
|
|
136
|
+
return this.randomizeDelay ? Math.random() * (delay || 1000) : delay;
|
|
137
|
+
}
|
|
138
|
+
/** The nominal length, as upstream reports it. */
|
|
139
|
+
getDuration() {
|
|
140
|
+
return this.durationV ?? DEFAULT_DURATION;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* The UPPER BOUND on delay plus duration, which is what a retention arms
|
|
144
|
+
* its fallback timer from. Not `getDelay() + getDuration()`: `randomDelay`
|
|
145
|
+
* draws a fresh number on every call — deliberately, so a list staggers —
|
|
146
|
+
* and a fallback armed from one draw could cut short an animation built
|
|
147
|
+
* from another.
|
|
148
|
+
*/
|
|
149
|
+
getMaxDuration() {
|
|
150
|
+
const delay = this.randomizeDelay
|
|
151
|
+
? (this.delayV ?? 0) || 1000
|
|
152
|
+
: (this.delayV ?? 0);
|
|
153
|
+
return delay + this.getDuration();
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* `.rotate()` resolved to degrees, or `fallbackDegrees` when it was never
|
|
157
|
+
* called. See {@link AnimationBuilder.rotate} for the unit rules.
|
|
158
|
+
*/
|
|
159
|
+
getRotationDegrees(fallbackDegrees) {
|
|
160
|
+
const configured = this.rotateV;
|
|
161
|
+
if (configured === undefined) {
|
|
162
|
+
return fallbackDegrees;
|
|
163
|
+
}
|
|
164
|
+
const bare = typeof configured === "number" ? configured : Number(configured);
|
|
165
|
+
if (Number.isFinite(bare)) {
|
|
166
|
+
return (bare * 180) / Math.PI;
|
|
167
|
+
}
|
|
168
|
+
return parseAngle(configured) ?? fallbackDegrees;
|
|
169
|
+
}
|
|
170
|
+
animation() {
|
|
171
|
+
if (this.type === "spring") {
|
|
172
|
+
const config = { ...this.springConfigV };
|
|
173
|
+
return (toValue) => withSpring(toValue, config);
|
|
174
|
+
}
|
|
175
|
+
const config = {};
|
|
176
|
+
if (this.durationV !== undefined) {
|
|
177
|
+
config.duration = this.durationV;
|
|
178
|
+
}
|
|
179
|
+
if (this.easingV !== undefined) {
|
|
180
|
+
config.easing = this.easingV;
|
|
181
|
+
}
|
|
182
|
+
return (toValue) => withTiming(toValue, config);
|
|
183
|
+
}
|
|
184
|
+
delayed(delayMs, animation) {
|
|
185
|
+
return delayMs <= 0 ? animation : withDelay(delayMs, animation);
|
|
186
|
+
}
|
|
187
|
+
build() {
|
|
188
|
+
throw new Error("react-native-reanimated: this animation builder does not implement build()");
|
|
189
|
+
}
|
|
190
|
+
// --- the statics, so `entering={FadeIn.duration(400)}` works ------------
|
|
191
|
+
static duration(durationMs) {
|
|
192
|
+
return this.createInstance().duration(durationMs);
|
|
193
|
+
}
|
|
194
|
+
static delay(delayMs) {
|
|
195
|
+
return this.createInstance().delay(delayMs);
|
|
196
|
+
}
|
|
197
|
+
static easing(easingFunction) {
|
|
198
|
+
return this.createInstance().easing(easingFunction);
|
|
199
|
+
}
|
|
200
|
+
static randomDelay() {
|
|
201
|
+
return this.createInstance().randomDelay();
|
|
202
|
+
}
|
|
203
|
+
static springify(durationMs) {
|
|
204
|
+
return this.createInstance().springify(durationMs);
|
|
205
|
+
}
|
|
206
|
+
static rotate(angle) {
|
|
207
|
+
return this.createInstance().rotate(angle);
|
|
208
|
+
}
|
|
209
|
+
static damping(value) {
|
|
210
|
+
return this.createInstance().damping(value);
|
|
211
|
+
}
|
|
212
|
+
static dampingRatio(value) {
|
|
213
|
+
return this.createInstance().dampingRatio(value);
|
|
214
|
+
}
|
|
215
|
+
static mass(value) {
|
|
216
|
+
return this.createInstance().mass(value);
|
|
217
|
+
}
|
|
218
|
+
static stiffness(value) {
|
|
219
|
+
return this.createInstance().stiffness(value);
|
|
220
|
+
}
|
|
221
|
+
static overshootClamping(value) {
|
|
222
|
+
return this.createInstance().overshootClamping(value);
|
|
223
|
+
}
|
|
224
|
+
static restDisplacementThreshold() {
|
|
225
|
+
return this.createInstance();
|
|
226
|
+
}
|
|
227
|
+
static restSpeedThreshold() {
|
|
228
|
+
return this.createInstance();
|
|
229
|
+
}
|
|
230
|
+
static reduceMotion() {
|
|
231
|
+
return this.createInstance();
|
|
232
|
+
}
|
|
233
|
+
static withInitialValues(values) {
|
|
234
|
+
return this.createInstance().withInitialValues(values);
|
|
235
|
+
}
|
|
236
|
+
static withCallback(callback) {
|
|
237
|
+
return this.createInstance().withCallback(callback);
|
|
238
|
+
}
|
|
239
|
+
static build() {
|
|
240
|
+
return this.createInstance().build();
|
|
241
|
+
}
|
|
242
|
+
static getDuration() {
|
|
243
|
+
return this.createInstance().getDuration();
|
|
244
|
+
}
|
|
245
|
+
static getDelay() {
|
|
246
|
+
return this.createInstance().getDelay();
|
|
247
|
+
}
|
|
248
|
+
static getMaxDuration() {
|
|
249
|
+
return this.createInstance().getMaxDuration();
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
/** Fades a view in as it mounts. */
|
|
253
|
+
export class FadeIn extends AnimationBuilder {
|
|
254
|
+
build() {
|
|
255
|
+
const animation = this.animation();
|
|
256
|
+
const delayMs = this.getDelay();
|
|
257
|
+
const callback = this.callbackV;
|
|
258
|
+
const initialValues = this.initialValuesV;
|
|
259
|
+
return () => ({
|
|
260
|
+
initialValues: { opacity: 0, ...initialValues },
|
|
261
|
+
animations: { opacity: this.delayed(delayMs, animation(1)) },
|
|
262
|
+
callback,
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
/** Fades a view out as it unmounts — the animation that needs retention. */
|
|
267
|
+
export class FadeOut extends AnimationBuilder {
|
|
268
|
+
build() {
|
|
269
|
+
const animation = this.animation();
|
|
270
|
+
const delayMs = this.getDelay();
|
|
271
|
+
const callback = this.callbackV;
|
|
272
|
+
const initialValues = this.initialValuesV;
|
|
273
|
+
return () => ({
|
|
274
|
+
initialValues: { opacity: 1, ...initialValues },
|
|
275
|
+
animations: { opacity: this.delayed(delayMs, animation(0)) },
|
|
276
|
+
callback,
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Walks a view from where it was to where the layout engine just put it.
|
|
282
|
+
*
|
|
283
|
+
* Upstream animates `originX`/`originY`/`width`/`height`; the same four are
|
|
284
|
+
* produced here, and the runtime honours the origins (as a translation, which
|
|
285
|
+
* is paint-only) and applies the size immediately. See docs/api.md.
|
|
286
|
+
*/
|
|
287
|
+
export class LinearTransition extends AnimationBuilder {
|
|
288
|
+
build() {
|
|
289
|
+
const animation = this.animation();
|
|
290
|
+
const delayMs = this.getDelay();
|
|
291
|
+
const callback = this.callbackV;
|
|
292
|
+
return (values) => ({
|
|
293
|
+
initialValues: {
|
|
294
|
+
originX: values.currentOriginX,
|
|
295
|
+
originY: values.currentOriginY,
|
|
296
|
+
width: values.currentWidth,
|
|
297
|
+
height: values.currentHeight,
|
|
298
|
+
},
|
|
299
|
+
animations: {
|
|
300
|
+
originX: this.delayed(delayMs, animation(values.targetOriginX)),
|
|
301
|
+
originY: this.delayed(delayMs, animation(values.targetOriginY)),
|
|
302
|
+
width: this.delayed(delayMs, animation(values.targetWidth)),
|
|
303
|
+
height: this.delayed(delayMs, animation(values.targetHeight)),
|
|
304
|
+
},
|
|
305
|
+
callback,
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
// A map rather than two comparisons, and that is not a style choice: the
|
|
310
|
+
// metro-preset test scans src for bare module specifiers with a regex that
|
|
311
|
+
// looks for the import keyword next to a quoted string, and a comparison
|
|
312
|
+
// against the quoted keyframe name reads to it as exactly that. Unquoted
|
|
313
|
+
// object keys keep the word away from a quote.
|
|
314
|
+
const NAMED_OFFSETS = { from: 0, to: 100 };
|
|
315
|
+
const offsetOf = (key) => {
|
|
316
|
+
const named = NAMED_OFFSETS[key];
|
|
317
|
+
if (named !== undefined) {
|
|
318
|
+
return named;
|
|
319
|
+
}
|
|
320
|
+
const parsed = Number(key);
|
|
321
|
+
return Number.isFinite(parsed) ? parsed : null;
|
|
322
|
+
};
|
|
323
|
+
const TRANSFORM_PREFIX = "transform.";
|
|
324
|
+
/**
|
|
325
|
+
* A hand-written keyframe track — the one builder that is a class you
|
|
326
|
+
* instantiate (`new Keyframe({...})`) rather than a preset you configure.
|
|
327
|
+
*
|
|
328
|
+
* Each keyframe is a percentage (or `from`/`to`) mapped to a style. Every
|
|
329
|
+
* property is turned into a `withSequence` of `withTiming` steps whose
|
|
330
|
+
* durations are the gaps between the offsets it appears at, which is exactly
|
|
331
|
+
* how upstream compiles them; a per-keyframe `easing` applies to the step
|
|
332
|
+
* that ENDS there, as in CSS.
|
|
333
|
+
*/
|
|
334
|
+
export class Keyframe extends AnimationBuilder {
|
|
335
|
+
definitions;
|
|
336
|
+
constructor(definitions) {
|
|
337
|
+
super();
|
|
338
|
+
this.definitions = definitions;
|
|
339
|
+
}
|
|
340
|
+
/** Keyframes and springs are different clocks; upstream refuses this too. */
|
|
341
|
+
springify() {
|
|
342
|
+
throw new Error("react-native-reanimated: Keyframe animations cannot be springified — a keyframe track is defined by " +
|
|
343
|
+
"its timeline, and a spring has none. Use `.duration()` and per-keyframe `easing` instead.");
|
|
344
|
+
}
|
|
345
|
+
// Keyframe values that are not numbers — a colour, a string length. They
|
|
346
|
+
// cannot be interpolated by a numeric animation, and DROPPING them is the
|
|
347
|
+
// one thing this repo does not do: they are handed to the built config as
|
|
348
|
+
// plain initial values instead, where the runtime names the property in a
|
|
349
|
+
// one-per-session warning rather than saying nothing.
|
|
350
|
+
unhandled = new Map();
|
|
351
|
+
tracks() {
|
|
352
|
+
const tracks = new Map();
|
|
353
|
+
this.unhandled.clear();
|
|
354
|
+
const push = (key, offset, value, easing) => {
|
|
355
|
+
if (typeof value !== "number") {
|
|
356
|
+
if (!this.unhandled.has(key)) {
|
|
357
|
+
this.unhandled.set(key, value);
|
|
358
|
+
}
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
const steps = tracks.get(key);
|
|
362
|
+
const step = { offset, value, easing };
|
|
363
|
+
if (steps) {
|
|
364
|
+
steps.push(step);
|
|
365
|
+
}
|
|
366
|
+
else {
|
|
367
|
+
tracks.set(key, [step]);
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
const offsets = [];
|
|
371
|
+
for (const key of Object.keys(this.definitions)) {
|
|
372
|
+
const offset = offsetOf(key);
|
|
373
|
+
if (offset === null) {
|
|
374
|
+
throw new Error(`react-native-reanimated: Keyframe offsets are percentages, \`from\` or \`to\` — got "${key}".`);
|
|
375
|
+
}
|
|
376
|
+
offsets.push(offset);
|
|
377
|
+
}
|
|
378
|
+
if (!offsets.includes(0)) {
|
|
379
|
+
throw new Error("react-native-reanimated: a Keyframe must define its `0` (or `from`) keyframe — there is nothing to start from otherwise.");
|
|
380
|
+
}
|
|
381
|
+
for (const key of Object.keys(this.definitions)) {
|
|
382
|
+
const offset = offsetOf(key);
|
|
383
|
+
const style = this.definitions[key];
|
|
384
|
+
const easing = style.easing;
|
|
385
|
+
for (const property of Object.keys(style)) {
|
|
386
|
+
if (property === "easing") {
|
|
387
|
+
continue;
|
|
388
|
+
}
|
|
389
|
+
if (property === "transform") {
|
|
390
|
+
const parts = style.transform;
|
|
391
|
+
if (!Array.isArray(parts)) {
|
|
392
|
+
continue;
|
|
393
|
+
}
|
|
394
|
+
parts.forEach((part, index) => {
|
|
395
|
+
if (typeof part !== "object" || part === null) {
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
for (const [name, value] of Object.entries(part)) {
|
|
399
|
+
push(`${TRANSFORM_PREFIX}${index}.${name}`, offset, value, easing);
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
continue;
|
|
403
|
+
}
|
|
404
|
+
push(property, offset, style[property], easing);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
for (const steps of tracks.values()) {
|
|
408
|
+
steps.sort((left, right) => left.offset - right.offset);
|
|
409
|
+
}
|
|
410
|
+
return tracks;
|
|
411
|
+
}
|
|
412
|
+
build() {
|
|
413
|
+
const tracks = this.tracks();
|
|
414
|
+
const totalDuration = this.getDuration();
|
|
415
|
+
const delayMs = this.getDelay();
|
|
416
|
+
const callback = this.callbackV;
|
|
417
|
+
const initialValues = {};
|
|
418
|
+
const animations = {};
|
|
419
|
+
const transformInitial = [];
|
|
420
|
+
const transformAnimated = [];
|
|
421
|
+
for (const [key, steps] of tracks) {
|
|
422
|
+
const first = steps[0];
|
|
423
|
+
const specs = [];
|
|
424
|
+
let previousOffset = first.offset;
|
|
425
|
+
for (const step of steps.slice(1)) {
|
|
426
|
+
const span = ((step.offset - previousOffset) / 100) * totalDuration;
|
|
427
|
+
previousOffset = step.offset;
|
|
428
|
+
specs.push(withTiming(step.value, {
|
|
429
|
+
duration: span,
|
|
430
|
+
...(step.easing ? { easing: step.easing } : {}),
|
|
431
|
+
}));
|
|
432
|
+
}
|
|
433
|
+
const track = specs.length === 0
|
|
434
|
+
? first.value
|
|
435
|
+
: this.delayed(delayMs, specs.length === 1 ? specs[0] : withSequence(...specs));
|
|
436
|
+
if (key.startsWith(TRANSFORM_PREFIX)) {
|
|
437
|
+
const [rawIndex, name] = key.slice(TRANSFORM_PREFIX.length).split(".");
|
|
438
|
+
const index = Number(rawIndex);
|
|
439
|
+
transformInitial[index] = {
|
|
440
|
+
...(transformInitial[index] ?? {}),
|
|
441
|
+
[name]: first.value,
|
|
442
|
+
};
|
|
443
|
+
transformAnimated[index] = {
|
|
444
|
+
...(transformAnimated[index] ?? {}),
|
|
445
|
+
[name]: track,
|
|
446
|
+
};
|
|
447
|
+
continue;
|
|
448
|
+
}
|
|
449
|
+
initialValues[key] = first.value;
|
|
450
|
+
animations[key] = track;
|
|
451
|
+
}
|
|
452
|
+
if (transformAnimated.length > 0) {
|
|
453
|
+
initialValues.transform = [...transformInitial];
|
|
454
|
+
animations.transform = [...transformAnimated];
|
|
455
|
+
}
|
|
456
|
+
// Whatever could not become a numeric track goes in as a plain value, so
|
|
457
|
+
// the runtime gets a chance to name it — see `unhandled` above.
|
|
458
|
+
for (const [key, value] of this.unhandled) {
|
|
459
|
+
initialValues[key] = value;
|
|
460
|
+
}
|
|
461
|
+
const extra = this.initialValuesV;
|
|
462
|
+
return () => ({
|
|
463
|
+
initialValues: { ...initialValues, ...extra },
|
|
464
|
+
animations,
|
|
465
|
+
callback,
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
//# sourceMappingURL=layout-animation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-animation.js","sourceRoot":"","sources":["../../src/reanimated-compat/layout-animation.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,gEAAgE;AAChE,EAAE;AACF,6EAA6E;AAC7E,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAC9E,kCAAkC;AAClC,EAAE;AACF,4EAA4E;AAC5E,6EAA6E;AAC7E,8EAA8E;AAC9E,6EAA6E;AAC7E,4EAA4E;AAC5E,iBAAiB;AACjB,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,+EAA+E;AAC/E,mEAAmE;AACnE,sEAAsE;AACtE,4EAA4E;AAC5E,uEAAuE;AACvE,oEAAoE;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,EACL,SAAS,EACT,YAAY,EACZ,UAAU,EACV,UAAU,GAEX,MAAM,aAAa,CAAA;AA4CpB,MAAM,gBAAgB,GAAG,GAAG,CAAA;AAI5B,MAAM,OAAO,gBAAgB;IAC3B,SAAS,GAAuB,SAAS,CAAA;IACzC,MAAM,GAAuB,SAAS,CAAA;IACtC,OAAO,GAAuD,SAAS,CAAA;IACvE,cAAc,GAAG,KAAK,CAAA;IACtB,IAAI,GAAwB,QAAQ,CAAA;IACpC,aAAa,GAAqB,EAAE,CA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AC,KAAK,CAAC,GAAG;oBACzB,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;oBACnC,CAAC,IAAK,CAAC,EAAE,KAAK;iBACf,CAAA;gBACD,SAAQ;YACV,CAAC;YACD,aAAa,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAA;YAChC,UAAU,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;QACzB,CAAC;QAED,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACjC,aAAa,CAAC,SAAS,GAAG,CAAC,GAAG,gBAAgB,CAAC,CAAA;YAC/C,UAAU,CAAC,SAAS,GAAG,CAAC,GAAG,iBAAiB,CAAC,CAAA;QAC/C,CAAC;QAED,yEAAyE;QACzE,gEAAgE;QAChE,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YAC1C,aAAa,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;QAC5B,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,cAAc,CAAA;QACjC,OAAO,GAAG,EAAE,CAAC,CAAC;YACZ,aAAa,EAAE,EAAE,GAAG,aAAa,EAAE,GAAG,KAAK,EAAE;YAC7C,UAAU;YACV,QAAQ;SACT,CAAC,CAAA;IACJ,CAAC;CACF","sourcesContent":["// The layout-animation builders' base class, and the four that are written by\n// hand: `FadeIn`, `FadeOut`, `LinearTransition` and `Keyframe`.\n//\n// A builder is plain data with a fluent surface. `FadeIn`, the class itself,\n// is a valid `entering` value; so is `FadeIn.duration(400).delay(100)`, which\n// is why every chainable method exists twice — once as an instance method and\n// once as a static that makes an instance first. That is upstream's own shape\n// (`BaseAnimationBuilder`), mirrored rather than reinvented, because app code\n// and library code both write it.\n//\n// `build()` returns upstream's function too: `(values) => ({ initialValues,\n// animations, callback })`, where `animations` holds ordinary `withTiming` /\n// `withSpring` descriptors keyed by property. Nothing here knows about GTK, a\n// widget, or a retention — this file decides WHAT should happen; the runtime\n// (layout-animation-runtime.ts) decides what of it this platform can honour\n// and drives it.\n//\n// SCOPE. The base class plus the four builders that cannot be expressed as a\n// table: three because they are the primitives everything else is measured\n// against, and `Keyframe` because it is the one builder you INSTANTIATE with a\n// track rather than configure. The catalogue proper — `BounceIn*`,\n// `Pinwheel*`, `Roll*`, `Stretch*` and the rest — is exactly the same\n// `initialValues`/`animations` pair over a different pair of numbers, so it\n// lives as data in layout-animation-presets.ts; the four `*Transition`\n// builders beside `LinearTransition` live in layout-transitions.ts.\nimport { parseAngle } from \"../style/transform\"\nimport {\n withDelay,\n withSequence,\n withSpring,\n withTiming,\n type WithSpringConfig,\n} from \"./animation\"\nimport type { EasingFunction, EasingFunctionFactory } from \"./easing\"\n\n/**\n * What a builder is handed when it is asked to produce a config. Upstream\n * fills the `target*` half for an entering animation and the `current*` half\n * for an exiting one; both halves are always populated here, from the rects\n * the layout engine committed, because a superset costs nothing and a builder\n * that reads the wrong half would otherwise get `undefined`.\n */\nexport type LayoutAnimationValues = {\n targetOriginX: number\n targetOriginY: number\n targetWidth: number\n targetHeight: number\n targetGlobalOriginX: number\n targetGlobalOriginY: number\n currentOriginX: number\n currentOriginY: number\n currentWidth: number\n currentHeight: number\n currentGlobalOriginX: number\n currentGlobalOriginY: number\n windowWidth: number\n windowHeight: number\n}\n\n/** Called when a layout animation settles or is cut short, as upstream. */\nexport type LayoutAnimationCallback = (finished: boolean) => void\n\n/** Upstream's built config: where to start, what to run, who to tell. */\nexport type BuiltLayoutAnimation = {\n initialValues: Record<string, unknown>\n animations: Record<string, unknown>\n callback?: LayoutAnimationCallback\n}\n\n/** Anything an `entering`, `exiting` or `layout` prop accepts. */\nexport type LayoutAnimationBuilderLike = {\n build(): (values: LayoutAnimationValues) => BuiltLayoutAnimation\n /** The longest this animation can run, which is what arms a retention. */\n getMaxDuration(): number\n}\n\nconst DEFAULT_DURATION = 300\n\ntype TimingLike = (toValue: number) => number\n\nexport class AnimationBuilder {\n durationV: number | undefined = undefined\n delayV: number | undefined = undefined\n easingV: EasingFunction | EasingFunctionFactory | undefined = undefined\n randomizeDelay = false\n type: \"timing\" | \"spring\" = \"timing\"\n springConfigV: WithSpringConfig = {}\n initialValuesV: Record<string, unknown> = {}\n callbackV: LayoutAnimationCallback | undefined = undefined\n rotateV: string | number | undefined = undefined\n\n static createInstance<T extends typeof AnimationBuilder>(\n this: T,\n ): InstanceType<T> {\n return new this() as InstanceType<T>\n }\n\n duration(durationMs: number): this {\n this.durationV = durationMs\n return this\n }\n\n delay(delayMs: number): this {\n this.delayV = delayMs\n return this\n }\n\n easing(easingFunction: EasingFunction | EasingFunctionFactory): this {\n this.easingV = easingFunction\n return this\n }\n\n /** Upstream's \"spread the delay over a window\" helper, ported as-is. */\n randomDelay(): this {\n this.randomizeDelay = true\n return this\n }\n\n springify(durationMs?: number): this {\n this.type = \"spring\"\n if (durationMs !== undefined) {\n this.springConfigV.duration = durationMs\n // Upstream's `springify()` writes the same field `.duration()` does, so\n // `getDuration()` reports the spring's length too. That matters here\n // beyond parity: the retention fallback that keeps an exiting widget on\n // screen is armed from `getMaxDuration()`, and a fallback shorter than\n // the animation cuts the animation off.\n this.durationV = durationMs\n }\n return this\n }\n\n /**\n * The angle `ZoomInRotate` / `ZoomOutRotate` spin through.\n *\n * Upstream takes a bare number of RADIANS in a string (its default is\n * `'0.3'`, interpolated into `` `${rotate}rad` ``), and a united value like\n * `'90deg'` reaches its template as `'90degrad'`. A bare number or numeric\n * string is read as radians here, exactly as upstream; a value that carries\n * its own `deg`/`rad` unit is parsed instead of being concatenated into\n * nonsense.\n */\n rotate(angle: string | number): this {\n this.rotateV = angle\n return this\n }\n\n damping(value: number): this {\n this.springConfigV.damping = value\n return this\n }\n\n dampingRatio(value: number): this {\n this.springConfigV.dampingRatio = value\n return this\n }\n\n mass(value: number): this {\n this.springConfigV.mass = value\n return this\n }\n\n stiffness(value: number): this {\n this.springConfigV.stiffness = value\n return this\n }\n\n overshootClamping(value: number): this {\n this.springConfigV.overshootClamping = Boolean(value)\n return this\n }\n\n /**\n * Accepted and ignored, because this platform's spring solver derives its\n * rest condition from the same energy budget upstream stops on rather than\n * from absolute thresholds — the difference is well under a pixel and is\n * already in docs/api.md's differences table.\n */\n restDisplacementThreshold(): this {\n return this\n }\n\n restSpeedThreshold(): this {\n return this\n }\n\n /**\n * Accepted and ignored: no reduce-motion source is wired on this platform\n * yet, so every value behaves as `ReduceMotion.Never` — the same answer\n * `useReducedMotion()` gives.\n */\n reduceMotion(): this {\n return this\n }\n\n withInitialValues(values: Record<string, unknown>): this {\n this.initialValuesV = values\n return this\n }\n\n withCallback(callback: LayoutAnimationCallback): this {\n this.callbackV = callback\n return this\n }\n\n getDelay(): number {\n const delay = this.delayV ?? 0\n return this.randomizeDelay ? Math.random() * (delay || 1000) : delay\n }\n\n /** The nominal length, as upstream reports it. */\n getDuration(): number {\n return this.durationV ?? DEFAULT_DURATION\n }\n\n /**\n * The UPPER BOUND on delay plus duration, which is what a retention arms\n * its fallback timer from. Not `getDelay() + getDuration()`: `randomDelay`\n * draws a fresh number on every call — deliberately, so a list staggers —\n * and a fallback armed from one draw could cut short an animation built\n * from another.\n */\n getMaxDuration(): number {\n const delay = this.randomizeDelay\n ? (this.delayV ?? 0) || 1000\n : (this.delayV ?? 0)\n return delay + this.getDuration()\n }\n\n /**\n * `.rotate()` resolved to degrees, or `fallbackDegrees` when it was never\n * called. See {@link AnimationBuilder.rotate} for the unit rules.\n */\n protected getRotationDegrees(fallbackDegrees: number): number {\n const configured = this.rotateV\n if (configured === undefined) {\n return fallbackDegrees\n }\n const bare =\n typeof configured === \"number\" ? configured : Number(configured)\n if (Number.isFinite(bare)) {\n return (bare * 180) / Math.PI\n }\n return parseAngle(configured) ?? fallbackDegrees\n }\n\n protected animation(): TimingLike {\n if (this.type === \"spring\") {\n const config = { ...this.springConfigV }\n return (toValue: number) => withSpring(toValue, config)\n }\n const config: {\n duration?: number\n easing?: EasingFunction | EasingFunctionFactory\n } = {}\n if (this.durationV !== undefined) {\n config.duration = this.durationV\n }\n if (this.easingV !== undefined) {\n config.easing = this.easingV\n }\n return (toValue: number) => withTiming(toValue, config)\n }\n\n protected delayed(delayMs: number, animation: number): number {\n return delayMs <= 0 ? animation : withDelay(delayMs, animation)\n }\n\n build(): (values: LayoutAnimationValues) => BuiltLayoutAnimation {\n throw new Error(\n \"react-native-reanimated: this animation builder does not implement build()\",\n )\n }\n\n // --- the statics, so `entering={FadeIn.duration(400)}` works ------------\n\n static duration<T extends typeof AnimationBuilder>(\n this: T,\n durationMs: number,\n ): InstanceType<T> {\n return this.createInstance().duration(durationMs) as InstanceType<T>\n }\n\n static delay<T extends typeof AnimationBuilder>(\n this: T,\n delayMs: number,\n ): InstanceType<T> {\n return this.createInstance().delay(delayMs) as InstanceType<T>\n }\n\n static easing<T extends typeof AnimationBuilder>(\n this: T,\n easingFunction: EasingFunction | EasingFunctionFactory,\n ): InstanceType<T> {\n return this.createInstance().easing(easingFunction) as InstanceType<T>\n }\n\n static randomDelay<T extends typeof AnimationBuilder>(\n this: T,\n ): InstanceType<T> {\n return this.createInstance().randomDelay() as InstanceType<T>\n }\n\n static springify<T extends typeof AnimationBuilder>(\n this: T,\n durationMs?: number,\n ): InstanceType<T> {\n return this.createInstance().springify(durationMs) as InstanceType<T>\n }\n\n static rotate<T extends typeof AnimationBuilder>(\n this: T,\n angle: string | number,\n ): InstanceType<T> {\n return this.createInstance().rotate(angle) as InstanceType<T>\n }\n\n static damping<T extends typeof AnimationBuilder>(\n this: T,\n value: number,\n ): InstanceType<T> {\n return this.createInstance().damping(value) as InstanceType<T>\n }\n\n static dampingRatio<T extends typeof AnimationBuilder>(\n this: T,\n value: number,\n ): InstanceType<T> {\n return this.createInstance().dampingRatio(value) as InstanceType<T>\n }\n\n static mass<T extends typeof AnimationBuilder>(\n this: T,\n value: number,\n ): InstanceType<T> {\n return this.createInstance().mass(value) as InstanceType<T>\n }\n\n static stiffness<T extends typeof AnimationBuilder>(\n this: T,\n value: number,\n ): InstanceType<T> {\n return this.createInstance().stiffness(value) as InstanceType<T>\n }\n\n static overshootClamping<T extends typeof AnimationBuilder>(\n this: T,\n value: number,\n ): InstanceType<T> {\n return this.createInstance().overshootClamping(value) as InstanceType<T>\n }\n\n static restDisplacementThreshold<T extends typeof AnimationBuilder>(\n this: T,\n ): InstanceType<T> {\n return this.createInstance() as InstanceType<T>\n }\n\n static restSpeedThreshold<T extends typeof AnimationBuilder>(\n this: T,\n ): InstanceType<T> {\n return this.createInstance() as InstanceType<T>\n }\n\n static reduceMotion<T extends typeof AnimationBuilder>(\n this: T,\n ): InstanceType<T> {\n return this.createInstance() as InstanceType<T>\n }\n\n static withInitialValues<T extends typeof AnimationBuilder>(\n this: T,\n values: Record<string, unknown>,\n ): InstanceType<T> {\n return this.createInstance().withInitialValues(values) as InstanceType<T>\n }\n\n static withCallback<T extends typeof AnimationBuilder>(\n this: T,\n callback: LayoutAnimationCallback,\n ): InstanceType<T> {\n return this.createInstance().withCallback(callback) as InstanceType<T>\n }\n\n static build<T extends typeof AnimationBuilder>(\n this: T,\n ): (values: LayoutAnimationValues) => BuiltLayoutAnimation {\n return this.createInstance().build()\n }\n\n static getDuration<T extends typeof AnimationBuilder>(this: T): number {\n return this.createInstance().getDuration()\n }\n\n static getDelay<T extends typeof AnimationBuilder>(this: T): number {\n return this.createInstance().getDelay()\n }\n\n static getMaxDuration<T extends typeof AnimationBuilder>(this: T): number {\n return this.createInstance().getMaxDuration()\n }\n}\n\n/** Fades a view in as it mounts. */\nexport class FadeIn extends AnimationBuilder {\n override build(): (values: LayoutAnimationValues) => BuiltLayoutAnimation {\n const animation = this.animation()\n const delayMs = this.getDelay()\n const callback = this.callbackV\n const initialValues = this.initialValuesV\n return () => ({\n initialValues: { opacity: 0, ...initialValues },\n animations: { opacity: this.delayed(delayMs, animation(1)) },\n callback,\n })\n }\n}\n\n/** Fades a view out as it unmounts — the animation that needs retention. */\nexport class FadeOut extends AnimationBuilder {\n override build(): (values: LayoutAnimationValues) => BuiltLayoutAnimation {\n const animation = this.animation()\n const delayMs = this.getDelay()\n const callback = this.callbackV\n const initialValues = this.initialValuesV\n return () => ({\n initialValues: { opacity: 1, ...initialValues },\n animations: { opacity: this.delayed(delayMs, animation(0)) },\n callback,\n })\n }\n}\n\n/**\n * Walks a view from where it was to where the layout engine just put it.\n *\n * Upstream animates `originX`/`originY`/`width`/`height`; the same four are\n * produced here, and the runtime honours the origins (as a translation, which\n * is paint-only) and applies the size immediately. See docs/api.md.\n */\nexport class LinearTransition extends AnimationBuilder {\n override build(): (values: LayoutAnimationValues) => BuiltLayoutAnimation {\n const animation = this.animation()\n const delayMs = this.getDelay()\n const callback = this.callbackV\n return (values) => ({\n initialValues: {\n originX: values.currentOriginX,\n originY: values.currentOriginY,\n width: values.currentWidth,\n height: values.currentHeight,\n },\n animations: {\n originX: this.delayed(delayMs, animation(values.targetOriginX)),\n originY: this.delayed(delayMs, animation(values.targetOriginY)),\n width: this.delayed(delayMs, animation(values.targetWidth)),\n height: this.delayed(delayMs, animation(values.targetHeight)),\n },\n callback,\n })\n }\n}\n\n// --- Keyframe ------------------------------------------------------------\n\ntype KeyframeStyle = Record<string, unknown> & {\n easing?: EasingFunction | EasingFunctionFactory\n}\n\nexport type KeyframeDefinitions = Record<string | number, KeyframeStyle>\n\ntype Step = {\n offset: number\n value: number\n easing: EasingFunction | EasingFunctionFactory | undefined\n}\n\n// A map rather than two comparisons, and that is not a style choice: the\n// metro-preset test scans src for bare module specifiers with a regex that\n// looks for the import keyword next to a quoted string, and a comparison\n// against the quoted keyframe name reads to it as exactly that. Unquoted\n// object keys keep the word away from a quote.\nconst NAMED_OFFSETS: Record<string, number> = { from: 0, to: 100 }\n\nconst offsetOf = (key: string): number | null => {\n const named = NAMED_OFFSETS[key]\n if (named !== undefined) {\n return named\n }\n const parsed = Number(key)\n return Number.isFinite(parsed) ? parsed : null\n}\n\nconst TRANSFORM_PREFIX = \"transform.\"\n\n/**\n * A hand-written keyframe track — the one builder that is a class you\n * instantiate (`new Keyframe({...})`) rather than a preset you configure.\n *\n * Each keyframe is a percentage (or `from`/`to`) mapped to a style. Every\n * property is turned into a `withSequence` of `withTiming` steps whose\n * durations are the gaps between the offsets it appears at, which is exactly\n * how upstream compiles them; a per-keyframe `easing` applies to the step\n * that ENDS there, as in CSS.\n */\nexport class Keyframe extends AnimationBuilder {\n private readonly definitions: KeyframeDefinitions\n\n constructor(definitions: KeyframeDefinitions) {\n super()\n this.definitions = definitions\n }\n\n /** Keyframes and springs are different clocks; upstream refuses this too. */\n override springify(): this {\n throw new Error(\n \"react-native-reanimated: Keyframe animations cannot be springified — a keyframe track is defined by \" +\n \"its timeline, and a spring has none. Use `.duration()` and per-keyframe `easing` instead.\",\n )\n }\n\n // Keyframe values that are not numbers — a colour, a string length. They\n // cannot be interpolated by a numeric animation, and DROPPING them is the\n // one thing this repo does not do: they are handed to the built config as\n // plain initial values instead, where the runtime names the property in a\n // one-per-session warning rather than saying nothing.\n private readonly unhandled = new Map<string, unknown>()\n\n private tracks(): Map<string, Step[]> {\n const tracks = new Map<string, Step[]>()\n this.unhandled.clear()\n const push = (\n key: string,\n offset: number,\n value: unknown,\n easing: EasingFunction | EasingFunctionFactory | undefined,\n ): void => {\n if (typeof value !== \"number\") {\n if (!this.unhandled.has(key)) {\n this.unhandled.set(key, value)\n }\n return\n }\n const steps = tracks.get(key)\n const step: Step = { offset, value, easing }\n if (steps) {\n steps.push(step)\n } else {\n tracks.set(key, [step])\n }\n }\n\n const offsets: number[] = []\n for (const key of Object.keys(this.definitions)) {\n const offset = offsetOf(key)\n if (offset === null) {\n throw new Error(\n `react-native-reanimated: Keyframe offsets are percentages, \\`from\\` or \\`to\\` — got \"${key}\".`,\n )\n }\n offsets.push(offset)\n }\n if (!offsets.includes(0)) {\n throw new Error(\n \"react-native-reanimated: a Keyframe must define its `0` (or `from`) keyframe — there is nothing to start from otherwise.\",\n )\n }\n\n for (const key of Object.keys(this.definitions)) {\n const offset = offsetOf(key)!\n const style = this.definitions[key]!\n const easing = style.easing\n for (const property of Object.keys(style)) {\n if (property === \"easing\") {\n continue\n }\n if (property === \"transform\") {\n const parts = style.transform\n if (!Array.isArray(parts)) {\n continue\n }\n parts.forEach((part, index) => {\n if (typeof part !== \"object\" || part === null) {\n return\n }\n for (const [name, value] of Object.entries(part)) {\n push(`${TRANSFORM_PREFIX}${index}.${name}`, offset, value, easing)\n }\n })\n continue\n }\n push(property, offset, style[property], easing)\n }\n }\n\n for (const steps of tracks.values()) {\n steps.sort((left, right) => left.offset - right.offset)\n }\n return tracks\n }\n\n override build(): (values: LayoutAnimationValues) => BuiltLayoutAnimation {\n const tracks = this.tracks()\n const totalDuration = this.getDuration()\n const delayMs = this.getDelay()\n const callback = this.callbackV\n const initialValues: Record<string, unknown> = {}\n const animations: Record<string, unknown> = {}\n const transformInitial: Record<string, unknown>[] = []\n const transformAnimated: Record<string, unknown>[] = []\n\n for (const [key, steps] of tracks) {\n const first = steps[0]!\n const specs: number[] = []\n let previousOffset = first.offset\n for (const step of steps.slice(1)) {\n const span = ((step.offset - previousOffset) / 100) * totalDuration\n previousOffset = step.offset\n specs.push(\n withTiming(step.value, {\n duration: span,\n ...(step.easing ? { easing: step.easing } : {}),\n }),\n )\n }\n const track =\n specs.length === 0\n ? first.value\n : this.delayed(\n delayMs,\n specs.length === 1 ? specs[0]! : withSequence(...specs),\n )\n\n if (key.startsWith(TRANSFORM_PREFIX)) {\n const [rawIndex, name] = key.slice(TRANSFORM_PREFIX.length).split(\".\")\n const index = Number(rawIndex)\n transformInitial[index] = {\n ...(transformInitial[index] ?? {}),\n [name!]: first.value,\n }\n transformAnimated[index] = {\n ...(transformAnimated[index] ?? {}),\n [name!]: track,\n }\n continue\n }\n initialValues[key] = first.value\n animations[key] = track\n }\n\n if (transformAnimated.length > 0) {\n initialValues.transform = [...transformInitial]\n animations.transform = [...transformAnimated]\n }\n\n // Whatever could not become a numeric track goes in as a plain value, so\n // the runtime gets a chance to name it — see `unhandled` above.\n for (const [key, value] of this.unhandled) {\n initialValues[key] = value\n }\n\n const extra = this.initialValuesV\n return () => ({\n initialValues: { ...initialValues, ...extra },\n animations,\n callback,\n })\n }\n}\n"]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { type EasingFunction, type EasingFunctionFactory } from "./easing";
|
|
2
|
+
import { AnimationBuilder, type BuiltLayoutAnimation, type LayoutAnimationBuilderLike, type LayoutAnimationValues } from "./layout-animation";
|
|
3
|
+
type AnyEasing = EasingFunction | EasingFunctionFactory;
|
|
4
|
+
/**
|
|
5
|
+
* A builder, or the builder CLASS itself: `.entering(FadeIn)` and
|
|
6
|
+
* `.entering(FadeIn.duration(400))` are both upstream's call surface.
|
|
7
|
+
*/
|
|
8
|
+
export type LayoutAnimationSource = LayoutAnimationBuilderLike | typeof AnimationBuilder;
|
|
9
|
+
/**
|
|
10
|
+
* Walks a view to its new rect with a SEPARATE easing per axis, which is what
|
|
11
|
+
* makes the path a curve rather than a straight line: an ease-in on x against
|
|
12
|
+
* an ease-out on y bends the trajectory.
|
|
13
|
+
*
|
|
14
|
+
* `.easingWidth()` and `.easingHeight()` are accepted and ignored — see the
|
|
15
|
+
* header, and docs/api.md.
|
|
16
|
+
*/
|
|
17
|
+
export declare class CurvedTransition extends AnimationBuilder {
|
|
18
|
+
easingXV: AnyEasing;
|
|
19
|
+
easingYV: AnyEasing;
|
|
20
|
+
easingWidthV: AnyEasing;
|
|
21
|
+
easingHeightV: AnyEasing;
|
|
22
|
+
easingX(easing: AnyEasing): this;
|
|
23
|
+
easingY(easing: AnyEasing): this;
|
|
24
|
+
easingWidth(easing: AnyEasing): this;
|
|
25
|
+
easingHeight(easing: AnyEasing): this;
|
|
26
|
+
static easingX(easing: AnyEasing): CurvedTransition;
|
|
27
|
+
static easingY(easing: AnyEasing): CurvedTransition;
|
|
28
|
+
static easingWidth(easing: AnyEasing): CurvedTransition;
|
|
29
|
+
static easingHeight(easing: AnyEasing): CurvedTransition;
|
|
30
|
+
build(): (values: LayoutAnimationValues) => BuiltLayoutAnimation;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Fades the view out, moves it while it is invisible, and fades it back in —
|
|
34
|
+
* the transition for a rect change too large to be worth watching. Upstream's
|
|
35
|
+
* default length is 500 ms rather than the 300 ms everything else uses.
|
|
36
|
+
*/
|
|
37
|
+
export declare class FadingTransition extends AnimationBuilder {
|
|
38
|
+
/** Upstream's own default for this transition, and only this one. */
|
|
39
|
+
getDuration(): number;
|
|
40
|
+
build(): (values: LayoutAnimationValues) => BuiltLayoutAnimation;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Arcs the view to its new position: it leaps clear of both the old and the
|
|
44
|
+
* new row on an ease-out-exp, then drops onto the target on a bounce. The
|
|
45
|
+
* height of the leap is the distance travelled, so a short move barely hops.
|
|
46
|
+
*/
|
|
47
|
+
export declare class JumpingTransition extends AnimationBuilder {
|
|
48
|
+
build(): (values: LayoutAnimationValues) => BuiltLayoutAnimation;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Moves one axis at a time: x first and then y, or the reverse with
|
|
52
|
+
* `.reverse()`. Upstream's default length is 500 ms, split evenly.
|
|
53
|
+
*/
|
|
54
|
+
export declare class SequencedTransition extends AnimationBuilder {
|
|
55
|
+
reversed: boolean;
|
|
56
|
+
reverse(): this;
|
|
57
|
+
static reverse(): SequencedTransition;
|
|
58
|
+
/** Upstream's own default for this transition. */
|
|
59
|
+
getDuration(): number;
|
|
60
|
+
build(): (values: LayoutAnimationValues) => BuiltLayoutAnimation;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Plays a full exit animation and then a full entry animation on the SAME
|
|
64
|
+
* view when its layout changes — the transition for a view whose content
|
|
65
|
+
* changed so much that moving it would read as the wrong thing moving.
|
|
66
|
+
*
|
|
67
|
+
* `.entering()` and `.exiting()` take any builder (or builder class); the
|
|
68
|
+
* defaults are `FadeIn` and `FadeOut`. The two built configs are composed
|
|
69
|
+
* here rather than run one after the other, so the whole thing is still one
|
|
70
|
+
* animation with one callback.
|
|
71
|
+
*/
|
|
72
|
+
export declare class EntryExitTransition extends AnimationBuilder {
|
|
73
|
+
enteringV: LayoutAnimationSource;
|
|
74
|
+
exitingV: LayoutAnimationSource;
|
|
75
|
+
entering(animation: LayoutAnimationSource): this;
|
|
76
|
+
exiting(animation: LayoutAnimationSource): this;
|
|
77
|
+
static entering(animation: LayoutAnimationSource): EntryExitTransition;
|
|
78
|
+
static exiting(animation: LayoutAnimationSource): EntryExitTransition;
|
|
79
|
+
build(): (values: LayoutAnimationValues) => BuiltLayoutAnimation;
|
|
80
|
+
/** The exit and the entry run one after the other, so the lengths add. */
|
|
81
|
+
getMaxDuration(): number;
|
|
82
|
+
}
|
|
83
|
+
export {};
|