@rootnative/inertia 0.0.0-alpha.6 → 0.0.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/CHANGELOG.md +4 -0
- package/README.md +1 -1
- package/dist/gestureLayer/index.d.mts +2 -2
- package/dist/gestureLayer/index.d.ts +2 -2
- package/dist/index.d.mts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/motion/Image.d.mts +1 -1
- package/dist/motion/Image.d.ts +1 -1
- package/dist/motion/Pressable.d.mts +1 -1
- package/dist/motion/Pressable.d.ts +1 -1
- package/dist/motion/ScrollView.d.mts +1 -1
- package/dist/motion/ScrollView.d.ts +1 -1
- package/dist/motion/Text.d.mts +1 -1
- package/dist/motion/Text.d.ts +1 -1
- package/dist/motion/View.d.mts +1 -1
- package/dist/motion/View.d.ts +1 -1
- package/dist/reanimated/index.d.mts +1 -0
- package/dist/reanimated/index.d.ts +1 -0
- package/dist/reanimated/index.js +46 -0
- package/dist/reanimated/index.mjs +1 -0
- package/dist/touch/index.d.mts +1 -1
- package/dist/touch/index.d.ts +1 -1
- package/dist/{types-BzEgiUdJ.d.mts → types-G1dBU2IQ.d.mts} +1 -1
- package/dist/{types-BzEgiUdJ.d.ts → types-G1dBU2IQ.d.ts} +1 -1
- package/dist/{useGesture-BRLgiNOC.d.ts → useGesture-D1e4ixJo.d.ts} +1 -1
- package/dist/{useGesture-C0GBS7d2.d.mts → useGesture-RFY6kTL3.d.mts} +1 -1
- package/llms.txt +5 -1
- package/package.json +8 -1
- package/src/index.ts +5 -0
- package/src/reanimated/index.ts +43 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ All notable changes to `@rootnative/inertia` are documented here. The format fol
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.0.1] - 2026-07-23
|
|
8
|
+
|
|
9
|
+
**First stable release.** Graduates the `0.0.0-alpha.x` line, absorbing Milestones 1–3 in a single tag: the declarative core (primitives, per-property transitions, sequences/keyframes, unified `repeat`, variants, `gesture` prop, `<Presence>`, `<MotionConfig>` with reduced-motion + named transitions), the value-layer hooks, the `layout` prop and rect-only `layoutId` shared-element transitions, and the `inertia-gestures` / `inertia-gradients` / `inertia-svg` adapter packages (released in lockstep). See the alpha entries below for the per-change history.
|
|
10
|
+
|
|
7
11
|
### Added
|
|
8
12
|
|
|
9
13
|
- **`useShadow` now interpolates CSS `boxShadow`.** The classic `shadow*`/`elevation` keys never reach the web renderer, so a `useShadow` elevation crossfade silently dropped its shadow on web — the platform where hover, its most common driver, matters most (gap surfaced by the RootNative UI Card migration). `ShadowConfig` gains `boxShadow?: string | BoxShadowLayer[]`: pass the CSS string form design systems store elevation tokens in (px lengths only; parsed once on the JS thread, `cubicBezier`-style — malformed tokens throw at setup rather than warning) or structured layers mirroring RN's `BoxShadowValue`. Multi-layer shadows interpolate per layer with CSS-transition padding semantics (shorter side padded with invisible layers; a genuine `inset` mismatch throws); blur clamps at 0 under springy overshoot. Emitted as a `boxShadow` style string — passed through as CSS by react-native-web and rendered natively on RN 0.76+ new architecture; keep `shadow*`/`elevation` alongside it for old-arch native. New `BoxShadowLayer` type exported from the root.
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Declarative animation primitives for React Native, built as a thin wrapper around [`react-native-reanimated`](https://docs.swmansion.com/react-native-reanimated/). Inspired by Framer Motion (web) and react-spring (cross-platform).
|
|
8
8
|
|
|
9
|
-
> **Status:** `0.0.
|
|
9
|
+
> **Status:** `0.0.1` — the first stable release. Pre-`1.0.0` minor versions may break — see the root [README](https://github.com/rootnative/inertia#versioning--release).
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SharedValue, AnimatedStyle } from 'react-native-reanimated';
|
|
2
|
-
import { U as UseGestureHandlers } from '../useGesture-
|
|
3
|
-
import {
|
|
2
|
+
import { U as UseGestureHandlers } from '../useGesture-RFY6kTL3.mjs';
|
|
3
|
+
import { a as TransitionInput, G as GestureLayerTransitions } from '../types-G1dBU2IQ.mjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'react-native';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SharedValue, AnimatedStyle } from 'react-native-reanimated';
|
|
2
|
-
import { U as UseGestureHandlers } from '../useGesture-
|
|
3
|
-
import {
|
|
2
|
+
import { U as UseGestureHandlers } from '../useGesture-D1e4ixJo.js';
|
|
3
|
+
import { a as TransitionInput, G as GestureLayerTransitions } from '../types-G1dBU2IQ.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'react-native';
|
|
6
6
|
|
package/dist/index.d.mts
CHANGED
|
@@ -2,10 +2,11 @@ import * as react from 'react';
|
|
|
2
2
|
import { ComponentType, ReactNode } from 'react';
|
|
3
3
|
import * as react_native from 'react-native';
|
|
4
4
|
import { NativeSyntheticEvent, NativeScrollEvent } from 'react-native';
|
|
5
|
-
import { M as MotionComponent, N as NamedTransitions,
|
|
6
|
-
export { c as AnimateStyle, d as AnimationCallbackInfo, D as DecayTransition, e as EasingFunction, f as EasingFunctionFactory,
|
|
5
|
+
import { M as MotionComponent, N as NamedTransitions, a as TransitionInput, T as TransitionConfig, A as AnimatableValue, E as EasingInput, S as SpringTransition, b as TransitionName, V as VariantController } from './types-G1dBU2IQ.mjs';
|
|
6
|
+
export { c as AnimateStyle, d as AnimationCallbackInfo, D as DecayTransition, e as EasingFunction, f as EasingFunctionFactory, g as GestureSubStates, h as MotionProps, i as NoAnimationTransition, P as PerPropertyTransition, R as RegisteredTransitions, j as RepeatConfig, k as SequenceStep, l as TimingTransition, m as Transition, n as VariantsMap } from './types-G1dBU2IQ.mjs';
|
|
7
7
|
import { SharedValue, useAnimatedStyle } from 'react-native-reanimated';
|
|
8
|
-
export {
|
|
8
|
+
export { SharedValue } from 'react-native-reanimated';
|
|
9
|
+
export { U as UseGestureHandlers, a as UseGestureResult, u as useGesture } from './useGesture-RFY6kTL3.mjs';
|
|
9
10
|
export { MotionImage } from './motion/Image.mjs';
|
|
10
11
|
export { MotionPressable } from './motion/Pressable.mjs';
|
|
11
12
|
export { MotionScrollView } from './motion/ScrollView.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -2,10 +2,11 @@ import * as react from 'react';
|
|
|
2
2
|
import { ComponentType, ReactNode } from 'react';
|
|
3
3
|
import * as react_native from 'react-native';
|
|
4
4
|
import { NativeSyntheticEvent, NativeScrollEvent } from 'react-native';
|
|
5
|
-
import { M as MotionComponent, N as NamedTransitions,
|
|
6
|
-
export { c as AnimateStyle, d as AnimationCallbackInfo, D as DecayTransition, e as EasingFunction, f as EasingFunctionFactory,
|
|
5
|
+
import { M as MotionComponent, N as NamedTransitions, a as TransitionInput, T as TransitionConfig, A as AnimatableValue, E as EasingInput, S as SpringTransition, b as TransitionName, V as VariantController } from './types-G1dBU2IQ.js';
|
|
6
|
+
export { c as AnimateStyle, d as AnimationCallbackInfo, D as DecayTransition, e as EasingFunction, f as EasingFunctionFactory, g as GestureSubStates, h as MotionProps, i as NoAnimationTransition, P as PerPropertyTransition, R as RegisteredTransitions, j as RepeatConfig, k as SequenceStep, l as TimingTransition, m as Transition, n as VariantsMap } from './types-G1dBU2IQ.js';
|
|
7
7
|
import { SharedValue, useAnimatedStyle } from 'react-native-reanimated';
|
|
8
|
-
export {
|
|
8
|
+
export { SharedValue } from 'react-native-reanimated';
|
|
9
|
+
export { U as UseGestureHandlers, a as UseGestureResult, u as useGesture } from './useGesture-D1e4ixJo.js';
|
|
9
10
|
export { MotionImage } from './motion/Image.js';
|
|
10
11
|
export { MotionPressable } from './motion/Pressable.js';
|
|
11
12
|
export { MotionScrollView } from './motion/ScrollView.js';
|
package/dist/motion/Image.d.mts
CHANGED
package/dist/motion/Image.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import * as react_native from 'react-native';
|
|
3
|
-
import { M as MotionComponent } from '../types-
|
|
3
|
+
import { M as MotionComponent } from '../types-G1dBU2IQ.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Animatable `Pressable`. The `gesture` prop's `pressed` sub-state hooks into
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import * as react_native from 'react-native';
|
|
3
|
-
import { M as MotionComponent } from '../types-
|
|
3
|
+
import { M as MotionComponent } from '../types-G1dBU2IQ.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Animatable `Pressable`. The `gesture` prop's `pressed` sub-state hooks into
|
package/dist/motion/Text.d.mts
CHANGED
package/dist/motion/Text.d.ts
CHANGED
package/dist/motion/View.d.mts
CHANGED
package/dist/motion/View.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Animated, AnimatedProps, AnimatedStyle, DerivedValue, Extrapolation, SharedValue, cancelAnimation, createAnimatedComponent, interpolate, interpolateColor, useAnimatedProps, useAnimatedStyle, useDerivedValue } from 'react-native-reanimated';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Animated, AnimatedProps, AnimatedStyle, DerivedValue, Extrapolation, SharedValue, cancelAnimation, createAnimatedComponent, interpolate, interpolateColor, useAnimatedProps, useAnimatedStyle, useDerivedValue } from 'react-native-reanimated';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var reactNativeReanimated = require('react-native-reanimated');
|
|
4
|
+
|
|
5
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
6
|
+
|
|
7
|
+
var reactNativeReanimated__default = /*#__PURE__*/_interopDefault(reactNativeReanimated);
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Object.defineProperty(exports, "Animated", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return reactNativeReanimated__default.default; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "Extrapolation", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return reactNativeReanimated.Extrapolation; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "cancelAnimation", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return reactNativeReanimated.cancelAnimation; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "createAnimatedComponent", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return reactNativeReanimated.createAnimatedComponent; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "interpolate", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return reactNativeReanimated.interpolate; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "interpolateColor", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return reactNativeReanimated.interpolateColor; }
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, "useAnimatedProps", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () { return reactNativeReanimated.useAnimatedProps; }
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports, "useAnimatedStyle", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () { return reactNativeReanimated.useAnimatedStyle; }
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, "useDerivedValue", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () { return reactNativeReanimated.useDerivedValue; }
|
|
46
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Animated, Extrapolation, cancelAnimation, createAnimatedComponent, interpolate, interpolateColor, useAnimatedProps, useAnimatedStyle, useDerivedValue } from 'react-native-reanimated';
|
package/dist/touch/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PanResponderInstance } from 'react-native';
|
|
2
2
|
import { useAnimatedStyle, SharedValue } from 'react-native-reanimated';
|
|
3
|
-
import {
|
|
3
|
+
import { T as TransitionConfig } from '../types-G1dBU2IQ.mjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/touch/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PanResponderInstance } from 'react-native';
|
|
2
2
|
import { useAnimatedStyle, SharedValue } from 'react-native-reanimated';
|
|
3
|
-
import {
|
|
3
|
+
import { T as TransitionConfig } from '../types-G1dBU2IQ.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -385,4 +385,4 @@ interface MotionComponent<C extends ComponentType<any>> {
|
|
|
385
385
|
displayName?: string;
|
|
386
386
|
}
|
|
387
387
|
|
|
388
|
-
export type { AnimatableValue as A, DecayTransition as D, EasingInput as E,
|
|
388
|
+
export type { AnimatableValue as A, DecayTransition as D, EasingInput as E, GestureLayerTransitions as G, MotionComponent as M, NamedTransitions as N, PerPropertyTransition as P, RegisteredTransitions as R, SpringTransition as S, TransitionConfig as T, VariantController as V, TransitionInput as a, TransitionName as b, AnimateStyle as c, AnimationCallbackInfo as d, EasingFunction as e, EasingFunctionFactory as f, GestureSubStates as g, MotionProps as h, NoAnimationTransition as i, RepeatConfig as j, SequenceStep as k, TimingTransition as l, Transition as m, VariantsMap as n };
|
|
@@ -385,4 +385,4 @@ interface MotionComponent<C extends ComponentType<any>> {
|
|
|
385
385
|
displayName?: string;
|
|
386
386
|
}
|
|
387
387
|
|
|
388
|
-
export type { AnimatableValue as A, DecayTransition as D, EasingInput as E,
|
|
388
|
+
export type { AnimatableValue as A, DecayTransition as D, EasingInput as E, GestureLayerTransitions as G, MotionComponent as M, NamedTransitions as N, PerPropertyTransition as P, RegisteredTransitions as R, SpringTransition as S, TransitionConfig as T, VariantController as V, TransitionInput as a, TransitionName as b, AnimateStyle as c, AnimationCallbackInfo as d, EasingFunction as e, EasingFunctionFactory as f, GestureSubStates as g, MotionProps as h, NoAnimationTransition as i, RepeatConfig as j, SequenceStep as k, TimingTransition as l, Transition as m, VariantsMap as n };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SharedValue } from 'react-native-reanimated';
|
|
2
|
-
import {
|
|
2
|
+
import { a as TransitionInput, G as GestureLayerTransitions } from './types-G1dBU2IQ.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Handler bag returned by `useGesture`. Spread on a `Pressable` to drive the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SharedValue } from 'react-native-reanimated';
|
|
2
|
-
import {
|
|
2
|
+
import { a as TransitionInput, G as GestureLayerTransitions } from './types-G1dBU2IQ.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Handler bag returned by `useGesture`. Spread on a `Pressable` to drive the
|
package/llms.txt
CHANGED
|
@@ -30,6 +30,8 @@ import {
|
|
|
30
30
|
} from '@rootnative/inertia'
|
|
31
31
|
// Opt-in MD3 / iOS state-layer overlay helper:
|
|
32
32
|
import { useGestureLayer } from '@rootnative/inertia/gesture-layer'
|
|
33
|
+
// Render-layer Reanimated interop for custom animated components:
|
|
34
|
+
import { Animated, useAnimatedStyle } from '@rootnative/inertia/reanimated'
|
|
33
35
|
// or for tree-shaking the primitives:
|
|
34
36
|
import { MotionView } from '@rootnative/inertia/view'
|
|
35
37
|
import { MotionText } from '@rootnative/inertia/text'
|
|
@@ -60,6 +62,8 @@ import { MotionScrollView } from '@rootnative/inertia/scroll-view'
|
|
|
60
62
|
- `resolveAnimatableValue(value, base, factory?)` — one level up: resolves a full per-property `animate` value (plain target, `{ to, ...override }` step, or keyframe array → `withSequence` with sequence-level `repeat`) into one animation. Gives custom components the complete `animate` grammar.
|
|
61
63
|
- `cubicBezier(x1, y1, x2, y2)` / `cubicBezier(css)` — builds a `timing.easing` value from cubic-bezier control points: four numbers, a W3C CSS `cubic-bezier(0.2, 0, 0, 1)` string (design-token form), or a CSS keyword (`'linear'` | `'ease'` | `'ease-in'` | `'ease-out'` | `'ease-in-out'`). Makes CSS-format easing tokens directly consumable — pair with named transitions to feed a theme's motion tokens into the registry. Invalid input throws (`x1`/`x2` must be within [0, 1]; `step-*` and `linear(...)` unsupported).
|
|
62
64
|
- `ensureWorkletEasing(easing)` — normalizes any accepted easing input (plain function, worklet, or Reanimated 4 `EasingFunctionFactory`) into a worklet `withTiming` can consume. Only needed for manual `withTiming` calls — the resolvers and primitives apply it automatically.
|
|
65
|
+
- `SharedValue<T>` (type) — re-exported from the root entry so props/refs that carry a value-layer hook result can be typed without importing from `react-native-reanimated`.
|
|
66
|
+
- `@rootnative/inertia/reanimated` — render-layer interop subpath: pure re-exports of `Animated`, `createAnimatedComponent`, `useAnimatedStyle`, `useAnimatedProps`, `useDerivedValue`, `interpolate`, `interpolateColor`, `Extrapolation`, `cancelAnimation` (plus `SharedValue` / `DerivedValue` / `AnimatedStyle` / `AnimatedProps` types) under their original Reanimated names, for components that own their own `useAnimatedStyle` worklet over Inertia-driven shared values. Names must stay original — the Reanimated Babel plugin auto-workletizes callbacks by callee name. The `with*` animation factories are deliberately not re-exported; start animations with `useAnimation` / `resolveTransition` / `buildReleaseAnimation`.
|
|
63
67
|
|
|
64
68
|
## Motion props
|
|
65
69
|
|
|
@@ -129,7 +133,7 @@ Numeric: `opacity`, `translateX`, `translateY`, `scale`, `scaleX`, `scaleY`, `ro
|
|
|
129
133
|
|
|
130
134
|
Color: `backgroundColor`, `borderColor`, `color`, `tintColor` (Image only), `shadowColor`. Hex, `rgb()` / `rgba()`, `hsl()` / `hsla()`, and named colors all work; the target string is forwarded straight through `withSpring` / `withTiming` and Reanimated handles RGBA interpolation natively.
|
|
131
135
|
|
|
132
|
-
Nested object: `shadowOffset: { width, height }`. The only nested-object style on the surface — internally decomposes into two synthetic axis SVs that the worklet recomposes into a single `shadowOffset` prop.
|
|
136
|
+
Nested object: `shadowOffset: { width, height }`. The only nested-object style on the surface — internally decomposes into two synthetic axis SVs that the worklet recomposes into a single `shadowOffset` prop. `0.0.1` supports the **single-value form only** (`{ width: 0, height: 4 }`); sequences / array keyframes / per-axis transition splits are out of scope, drop to `useMotionValue` for those.
|
|
133
137
|
|
|
134
138
|
Auto-layout transitions ship via the `layout` prop (`true` / `TransitionConfig`) on every `Motion.*` primitive — see Layout. Shared element transitions ship via the `layoutId` prop: pair the same id on a source and target `Motion.*` and Inertia FLIPs between them on mount (parent-relative coords, rect-only animation, 1s TTL).
|
|
135
139
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rootnative/inertia",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1",
|
|
4
4
|
"description": "Declarative animation primitives for React Native, built on react-native-reanimated.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "RootNative",
|
|
@@ -93,6 +93,13 @@
|
|
|
93
93
|
"import": "./dist/gestureLayer/index.mjs",
|
|
94
94
|
"require": "./dist/gestureLayer/index.js"
|
|
95
95
|
},
|
|
96
|
+
"./reanimated": {
|
|
97
|
+
"types": "./dist/reanimated/index.d.ts",
|
|
98
|
+
"react-native": "./src/reanimated/index.ts",
|
|
99
|
+
"source": "./src/reanimated/index.ts",
|
|
100
|
+
"import": "./dist/reanimated/index.mjs",
|
|
101
|
+
"require": "./dist/reanimated/index.js"
|
|
102
|
+
},
|
|
96
103
|
"./jest-preset": "./jest-preset.js",
|
|
97
104
|
"./jest-setup": "./jest-setup.js",
|
|
98
105
|
"./package.json": "./package.json"
|
package/src/index.ts
CHANGED
|
@@ -51,6 +51,11 @@ export {
|
|
|
51
51
|
useTransform,
|
|
52
52
|
useVariants,
|
|
53
53
|
} from './values'
|
|
54
|
+
// The value-layer hooks above all return Reanimated `SharedValue`s — export
|
|
55
|
+
// the type so consumers can annotate props/refs that carry one (e.g. a
|
|
56
|
+
// scroll-offset prop) without importing from `react-native-reanimated`.
|
|
57
|
+
// Runtime render-layer interop lives in `@rootnative/inertia/reanimated`.
|
|
58
|
+
export type { SharedValue } from 'react-native-reanimated'
|
|
54
59
|
export type {
|
|
55
60
|
BoxShadowLayer,
|
|
56
61
|
ColorStyleKey,
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@rootnative/inertia/reanimated` — the render-layer interop surface for
|
|
3
|
+
* building custom animated components on top of Inertia's value layer
|
|
4
|
+
* (`useMotionValue` / `useSpring` / `useGesture` / `useScroll` / …).
|
|
5
|
+
*
|
|
6
|
+
* Inertia's contract is that consumers should not need to import from
|
|
7
|
+
* `react-native-reanimated` directly. Most of the time the declarative
|
|
8
|
+
* `Motion.*` primitives cover that; when they don't — a component that owns
|
|
9
|
+
* its own `useAnimatedStyle` worklet over Inertia-driven shared values —
|
|
10
|
+
* this subpath provides the remaining rendering primitives so the consumer's
|
|
11
|
+
* animation dependency stays `@rootnative/inertia` alone.
|
|
12
|
+
*
|
|
13
|
+
* Scope is deliberately render-layer only: animated host components, the
|
|
14
|
+
* animated style/props hooks, worklet-safe interpolators, and cancellation.
|
|
15
|
+
* Starting animations stays in Inertia's transition vocabulary —
|
|
16
|
+
* `useAnimation` / `useSpring` declaratively, `resolveTransition` /
|
|
17
|
+
* `buildReleaseAnimation` imperatively — so the `with*` animation factories
|
|
18
|
+
* are intentionally not re-exported here.
|
|
19
|
+
*
|
|
20
|
+
* Everything is re-exported under its original Reanimated name. That is a
|
|
21
|
+
* hard constraint, not a style choice: the Reanimated Babel plugin
|
|
22
|
+
* auto-workletizes the callbacks passed to `useAnimatedStyle` /
|
|
23
|
+
* `useAnimatedProps` / `useDerivedValue` by callee *name*, so a renamed
|
|
24
|
+
* wrapper would silently stop workletizing consumer callbacks. Re-exports
|
|
25
|
+
* keep the name and the behavior from any import path.
|
|
26
|
+
*/
|
|
27
|
+
export {
|
|
28
|
+
default as Animated,
|
|
29
|
+
Extrapolation,
|
|
30
|
+
cancelAnimation,
|
|
31
|
+
createAnimatedComponent,
|
|
32
|
+
interpolate,
|
|
33
|
+
interpolateColor,
|
|
34
|
+
useAnimatedProps,
|
|
35
|
+
useAnimatedStyle,
|
|
36
|
+
useDerivedValue,
|
|
37
|
+
} from 'react-native-reanimated'
|
|
38
|
+
export type {
|
|
39
|
+
AnimatedProps,
|
|
40
|
+
AnimatedStyle,
|
|
41
|
+
DerivedValue,
|
|
42
|
+
SharedValue,
|
|
43
|
+
} from 'react-native-reanimated'
|