react-native-ease 0.1.0-alpha.0

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.
@@ -0,0 +1,186 @@
1
+ "use strict";
2
+
3
+ import { StyleSheet } from 'react-native';
4
+ import NativeEaseView from './EaseViewNativeComponent';
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ /** Identity values used as defaults for animate/initialAnimate. */
7
+ const IDENTITY = {
8
+ opacity: 1,
9
+ translateX: 0,
10
+ translateY: 0,
11
+ scaleX: 1,
12
+ scaleY: 1,
13
+ rotate: 0,
14
+ rotateX: 0,
15
+ rotateY: 0,
16
+ borderRadius: 0
17
+ };
18
+
19
+ /** Bitmask flags — must match native constants. */
20
+ /* eslint-disable no-bitwise */
21
+ const MASK_OPACITY = 1 << 0;
22
+ const MASK_TRANSLATE_X = 1 << 1;
23
+ const MASK_TRANSLATE_Y = 1 << 2;
24
+ const MASK_SCALE_X = 1 << 3;
25
+ const MASK_SCALE_Y = 1 << 4;
26
+ const MASK_ROTATE = 1 << 5;
27
+ const MASK_ROTATE_X = 1 << 6;
28
+ const MASK_ROTATE_Y = 1 << 7;
29
+ const MASK_BORDER_RADIUS = 1 << 8;
30
+ /* eslint-enable no-bitwise */
31
+
32
+ /** Maps animate prop keys to style keys that conflict. */
33
+ const ANIMATE_TO_STYLE_KEYS = {
34
+ opacity: 'opacity',
35
+ translateX: 'transform',
36
+ translateY: 'transform',
37
+ scale: 'transform',
38
+ scaleX: 'transform',
39
+ scaleY: 'transform',
40
+ rotate: 'transform',
41
+ rotateX: 'transform',
42
+ rotateY: 'transform',
43
+ borderRadius: 'borderRadius'
44
+ };
45
+
46
+ /** Preset easing curves as cubic bezier control points. */
47
+ const EASING_PRESETS = {
48
+ linear: [0, 0, 1, 1],
49
+ easeIn: [0.42, 0, 1, 1],
50
+ easeOut: [0, 0, 0.58, 1],
51
+ easeInOut: [0.42, 0, 0.58, 1]
52
+ };
53
+ export function EaseView({
54
+ animate,
55
+ initialAnimate,
56
+ transition,
57
+ onTransitionEnd,
58
+ useHardwareLayer = false,
59
+ transformOrigin,
60
+ style,
61
+ ...rest
62
+ }) {
63
+ // Compute bitmask of which properties are animated.
64
+ // Native uses this to skip non-animated properties (lets style handle them).
65
+ /* eslint-disable no-bitwise */
66
+ let animatedProperties = 0;
67
+ if (animate?.opacity != null) animatedProperties |= MASK_OPACITY;
68
+ if (animate?.translateX != null) animatedProperties |= MASK_TRANSLATE_X;
69
+ if (animate?.translateY != null) animatedProperties |= MASK_TRANSLATE_Y;
70
+ if (animate?.scaleX != null || animate?.scale != null) animatedProperties |= MASK_SCALE_X;
71
+ if (animate?.scaleY != null || animate?.scale != null) animatedProperties |= MASK_SCALE_Y;
72
+ if (animate?.rotate != null) animatedProperties |= MASK_ROTATE;
73
+ if (animate?.rotateX != null) animatedProperties |= MASK_ROTATE_X;
74
+ if (animate?.rotateY != null) animatedProperties |= MASK_ROTATE_Y;
75
+ if (animate?.borderRadius != null) animatedProperties |= MASK_BORDER_RADIUS;
76
+ /* eslint-enable no-bitwise */
77
+
78
+ // Resolve animate values (identity defaults for non-animated — safe values).
79
+ const resolved = {
80
+ ...IDENTITY,
81
+ ...animate,
82
+ scaleX: animate?.scaleX ?? animate?.scale ?? IDENTITY.scaleX,
83
+ scaleY: animate?.scaleY ?? animate?.scale ?? IDENTITY.scaleY,
84
+ rotateX: animate?.rotateX ?? IDENTITY.rotateX,
85
+ rotateY: animate?.rotateY ?? IDENTITY.rotateY
86
+ };
87
+
88
+ // Resolve initialAnimate:
89
+ // - No initialAnimate: same as resolved (no enter animation)
90
+ // - With initialAnimate: use initial values for animated properties,
91
+ // falling back to identity defaults.
92
+ const initial = initialAnimate ?? animate;
93
+ const resolvedInitial = {
94
+ ...IDENTITY,
95
+ ...initial,
96
+ scaleX: initial?.scaleX ?? initial?.scale ?? IDENTITY.scaleX,
97
+ scaleY: initial?.scaleY ?? initial?.scale ?? IDENTITY.scaleY,
98
+ rotateX: initial?.rotateX ?? IDENTITY.rotateX,
99
+ rotateY: initial?.rotateY ?? IDENTITY.rotateY
100
+ };
101
+
102
+ // Strip style keys that conflict with animated properties
103
+ let cleanStyle = style;
104
+ if (animate && style) {
105
+ const flat = StyleSheet.flatten(style);
106
+ if (flat) {
107
+ const conflicting = new Set();
108
+ for (const key of Object.keys(animate)) {
109
+ if (animate[key] != null) {
110
+ const styleKey = ANIMATE_TO_STYLE_KEYS[key];
111
+ if (styleKey && styleKey in flat) {
112
+ conflicting.add(styleKey);
113
+ }
114
+ }
115
+ }
116
+ if (conflicting.size > 0) {
117
+ if (__DEV__) {
118
+ console.warn(`react-native-ease: ${[...conflicting].join(', ')} found in both style and animate. ` + 'The animated value takes priority; the style value will be ignored.');
119
+ }
120
+ const cleaned = {};
121
+ for (const [k, v] of Object.entries(flat)) {
122
+ if (!conflicting.has(k)) {
123
+ cleaned[k] = v;
124
+ }
125
+ }
126
+ cleanStyle = cleaned;
127
+ }
128
+ }
129
+ }
130
+
131
+ // Resolve transition config
132
+ const transitionType = transition?.type ?? 'timing';
133
+ const transitionDuration = transition?.type === 'timing' ? transition.duration ?? 300 : 300;
134
+ const rawEasing = transition?.type === 'timing' ? transition.easing ?? 'easeInOut' : 'easeInOut';
135
+ if (__DEV__) {
136
+ if (Array.isArray(rawEasing)) {
137
+ if (rawEasing.length !== 4) {
138
+ console.warn('react-native-ease: Custom easing must be a [x1, y1, x2, y2] tuple (got length ' + rawEasing.length + ').');
139
+ }
140
+ if (rawEasing[0] < 0 || rawEasing[0] > 1 || rawEasing[2] < 0 || rawEasing[2] > 1) {
141
+ console.warn('react-native-ease: Easing x-values (x1, x2) must be between 0 and 1.');
142
+ }
143
+ }
144
+ }
145
+ const bezier = Array.isArray(rawEasing) ? rawEasing : EASING_PRESETS[rawEasing];
146
+ const transitionDamping = transition?.type === 'spring' ? transition.damping ?? 15 : 15;
147
+ const transitionStiffness = transition?.type === 'spring' ? transition.stiffness ?? 120 : 120;
148
+ const transitionMass = transition?.type === 'spring' ? transition.mass ?? 1 : 1;
149
+ const transitionLoop = transition?.type === 'timing' ? transition.loop ?? 'none' : 'none';
150
+ const handleTransitionEnd = onTransitionEnd ? event => onTransitionEnd(event.nativeEvent) : undefined;
151
+ return /*#__PURE__*/_jsx(NativeEaseView, {
152
+ style: cleanStyle,
153
+ onTransitionEnd: handleTransitionEnd,
154
+ animatedProperties: animatedProperties,
155
+ animateOpacity: resolved.opacity,
156
+ animateTranslateX: resolved.translateX,
157
+ animateTranslateY: resolved.translateY,
158
+ animateScaleX: resolved.scaleX,
159
+ animateScaleY: resolved.scaleY,
160
+ animateRotate: resolved.rotate,
161
+ animateRotateX: resolved.rotateX,
162
+ animateRotateY: resolved.rotateY,
163
+ animateBorderRadius: resolved.borderRadius,
164
+ initialAnimateOpacity: resolvedInitial.opacity,
165
+ initialAnimateTranslateX: resolvedInitial.translateX,
166
+ initialAnimateTranslateY: resolvedInitial.translateY,
167
+ initialAnimateScaleX: resolvedInitial.scaleX,
168
+ initialAnimateScaleY: resolvedInitial.scaleY,
169
+ initialAnimateRotate: resolvedInitial.rotate,
170
+ initialAnimateRotateX: resolvedInitial.rotateX,
171
+ initialAnimateRotateY: resolvedInitial.rotateY,
172
+ initialAnimateBorderRadius: resolvedInitial.borderRadius,
173
+ transitionType: transitionType,
174
+ transitionDuration: transitionDuration,
175
+ transitionEasingBezier: bezier,
176
+ transitionDamping: transitionDamping,
177
+ transitionStiffness: transitionStiffness,
178
+ transitionMass: transitionMass,
179
+ transitionLoop: transitionLoop,
180
+ useHardwareLayer: useHardwareLayer,
181
+ transformOriginX: transformOrigin?.x ?? 0.5,
182
+ transformOriginY: transformOrigin?.y ?? 0.5,
183
+ ...rest
184
+ });
185
+ }
186
+ //# sourceMappingURL=EaseView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["StyleSheet","NativeEaseView","jsx","_jsx","IDENTITY","opacity","translateX","translateY","scaleX","scaleY","rotate","rotateX","rotateY","borderRadius","MASK_OPACITY","MASK_TRANSLATE_X","MASK_TRANSLATE_Y","MASK_SCALE_X","MASK_SCALE_Y","MASK_ROTATE","MASK_ROTATE_X","MASK_ROTATE_Y","MASK_BORDER_RADIUS","ANIMATE_TO_STYLE_KEYS","scale","EASING_PRESETS","linear","easeIn","easeOut","easeInOut","EaseView","animate","initialAnimate","transition","onTransitionEnd","useHardwareLayer","transformOrigin","style","rest","animatedProperties","resolved","initial","resolvedInitial","cleanStyle","flat","flatten","conflicting","Set","key","Object","keys","styleKey","add","size","__DEV__","console","warn","join","cleaned","k","v","entries","has","transitionType","type","transitionDuration","duration","rawEasing","easing","Array","isArray","length","bezier","transitionDamping","damping","transitionStiffness","stiffness","transitionMass","mass","transitionLoop","loop","handleTransitionEnd","event","nativeEvent","undefined","animateOpacity","animateTranslateX","animateTranslateY","animateScaleX","animateScaleY","animateRotate","animateRotateX","animateRotateY","animateBorderRadius","initialAnimateOpacity","initialAnimateTranslateX","initialAnimateTranslateY","initialAnimateScaleX","initialAnimateScaleY","initialAnimateRotate","initialAnimateRotateX","initialAnimateRotateY","initialAnimateBorderRadius","transitionEasingBezier","transformOriginX","x","transformOriginY","y"],"sourceRoot":"../../src","sources":["EaseView.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwC,cAAc;AACzE,OAAOC,cAAc,MAAM,2BAA2B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AASvD;AACA,MAAMC,QAAQ,GAAG;EACfC,OAAO,EAAE,CAAC;EACVC,UAAU,EAAE,CAAC;EACbC,UAAU,EAAE,CAAC;EACbC,MAAM,EAAE,CAAC;EACTC,MAAM,EAAE,CAAC;EACTC,MAAM,EAAE,CAAC;EACTC,OAAO,EAAE,CAAC;EACVC,OAAO,EAAE,CAAC;EACVC,YAAY,EAAE;AAChB,CAAC;;AAED;AACA;AACA,MAAMC,YAAY,GAAG,CAAC,IAAI,CAAC;AAC3B,MAAMC,gBAAgB,GAAG,CAAC,IAAI,CAAC;AAC/B,MAAMC,gBAAgB,GAAG,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,OAAQ;IAC/C0F,0BAA0B,EAAE5D,eAAe,CAAC7B,YAAa;IACzDkD,cAAc,EAAEA,cAAe;IAC/BE,kBAAkB,EAAEA,kBAAmB;IACvCsC,sBAAsB,EAAE/B,MAAO;IAC/BC,iBAAiB,EAAEA,iBAAkB;IACrCE,mBAAmB,EAAEA,mBAAoB;IACzCE,cAAc,EAAEA,cAAe;IAC/BE,cAAc,EAAEA,cAAe;IAC/B5C,gBAAgB,EAAEA,gBAAiB;IACnCqE,gBAAgB,EAAEpE,eAAe,EAAEqE,CAAC,IAAI,GAAI;IAC5CC,gBAAgB,EAAEtE,eAAe,EAAEuE,CAAC,IAAI,GAAI;IAAA,GACxCrE;EAAI,CACT,CAAC;AAEN","ignoreList":[]}
@@ -0,0 +1,68 @@
1
+ import {
2
+ codegenNativeComponent,
3
+ type CodegenTypes,
4
+ type ViewProps,
5
+ type HostComponent,
6
+ } from 'react-native';
7
+
8
+ export interface NativeProps extends ViewProps {
9
+ // Bitmask of which properties are animated (0 = none, let style handle all)
10
+ animatedProperties?: CodegenTypes.WithDefault<CodegenTypes.Int32, 0>;
11
+
12
+ // Animate target values
13
+ animateOpacity?: CodegenTypes.WithDefault<CodegenTypes.Float, 1.0>;
14
+ animateTranslateX?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
15
+ animateTranslateY?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
16
+ animateScaleX?: CodegenTypes.WithDefault<CodegenTypes.Float, 1.0>;
17
+ animateScaleY?: CodegenTypes.WithDefault<CodegenTypes.Float, 1.0>;
18
+ animateRotate?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
19
+ animateRotateX?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
20
+ animateRotateY?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
21
+ animateBorderRadius?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
22
+
23
+ // Initial values for enter animations
24
+ initialAnimateOpacity?: CodegenTypes.WithDefault<CodegenTypes.Float, 1.0>;
25
+ initialAnimateTranslateX?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
26
+ initialAnimateTranslateY?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
27
+ initialAnimateScaleX?: CodegenTypes.WithDefault<CodegenTypes.Float, 1.0>;
28
+ initialAnimateScaleY?: CodegenTypes.WithDefault<CodegenTypes.Float, 1.0>;
29
+ initialAnimateRotate?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
30
+ initialAnimateRotateX?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
31
+ initialAnimateRotateY?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
32
+ initialAnimateBorderRadius?: CodegenTypes.WithDefault<
33
+ CodegenTypes.Float,
34
+ 0.0
35
+ >;
36
+
37
+ // Transition config
38
+ transitionType?: CodegenTypes.WithDefault<
39
+ 'timing' | 'spring' | 'none',
40
+ 'timing'
41
+ >;
42
+ transitionDuration?: CodegenTypes.WithDefault<CodegenTypes.Int32, 300>;
43
+ // Easing cubic bezier control points [x1, y1, x2, y2] (default: easeInOut)
44
+ transitionEasingBezier?: ReadonlyArray<CodegenTypes.Float>;
45
+ transitionDamping?: CodegenTypes.WithDefault<CodegenTypes.Float, 15.0>;
46
+ transitionStiffness?: CodegenTypes.WithDefault<CodegenTypes.Float, 120.0>;
47
+ transitionMass?: CodegenTypes.WithDefault<CodegenTypes.Float, 1.0>;
48
+ transitionLoop?: CodegenTypes.WithDefault<
49
+ 'none' | 'repeat' | 'reverse',
50
+ 'none'
51
+ >;
52
+
53
+ // Transform origin (0–1 fractions, default center)
54
+ transformOriginX?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.5>;
55
+ transformOriginY?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.5>;
56
+
57
+ // Events
58
+ onTransitionEnd?: CodegenTypes.DirectEventHandler<
59
+ Readonly<{ finished: boolean }>
60
+ >;
61
+
62
+ // Android hardware layer optimization (no-op on iOS)
63
+ useHardwareLayer?: CodegenTypes.WithDefault<boolean, false>;
64
+ }
65
+
66
+ export default codegenNativeComponent<NativeProps>(
67
+ 'EaseView',
68
+ ) as HostComponent<NativeProps>;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export { EaseView } from "./EaseView.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["EaseView"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,eAAY","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,33 @@
1
+ import { type ViewProps } from 'react-native';
2
+ import type { AnimateProps, Transition, TransitionEndEvent, TransformOrigin } from './types';
3
+ export type EaseViewProps = ViewProps & {
4
+ /** Target values for animated properties. */
5
+ animate?: AnimateProps;
6
+ /** Starting values for enter animations. Animates to `animate` on mount. */
7
+ initialAnimate?: AnimateProps;
8
+ /** Animation configuration (timing or spring). */
9
+ transition?: Transition;
10
+ /** Called when all animations complete. Reports whether they finished naturally or were interrupted. */
11
+ onTransitionEnd?: (event: TransitionEndEvent) => void;
12
+ /**
13
+ * Enable Android hardware layer during animations. The view is rasterized to
14
+ * a GPU texture so animated property changes (opacity, scale, rotation) are
15
+ * composited on the RenderThread without redrawing the view hierarchy.
16
+ *
17
+ * **Trade-offs:**
18
+ * - Faster rendering of opacity/scale/rotation animations.
19
+ * - Uses additional GPU memory for the off-screen texture.
20
+ * - Children that overflow the view's layout bounds are clipped by the
21
+ * texture, which can cause visual artifacts with `translateX`/`translateY`.
22
+ *
23
+ * Best suited for views that animate opacity, scale, or rotation without
24
+ * overflowing children. No-op on iOS where Core Animation already composites
25
+ * off the main thread.
26
+ * @default false
27
+ */
28
+ useHardwareLayer?: boolean;
29
+ /** Pivot point for scale and rotation as 0–1 fractions. @default { x: 0.5, y: 0.5 } (center) */
30
+ transformOrigin?: TransformOrigin;
31
+ };
32
+ export declare function EaseView({ animate, initialAnimate, transition, onTransitionEnd, useHardwareLayer, transformOrigin, style, ...rest }: EaseViewProps): import("react/jsx-runtime").JSX.Element;
33
+ //# sourceMappingURL=EaseView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EaseView.d.ts","sourceRoot":"","sources":["../../../src/EaseView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAkB,MAAM,cAAc,CAAC;AAE1E,OAAO,KAAK,EACV,YAAY,EAEZ,UAAU,EACV,kBAAkB,EAClB,eAAe,EAChB,MAAM,SAAS,CAAC;AAkDjB,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG;IACtC,6CAA6C;IAC7C,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,4EAA4E;IAC5E,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,kDAAkD;IAClD,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,wGAAwG;IACxG,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACtD;;;;;;;;;;;;;;;OAeG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gGAAgG;IAChG,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,cAAc,EACd,UAAU,EACV,eAAe,EACf,gBAAwB,EACxB,eAAe,EACf,KAAK,EACL,GAAG,IAAI,EACR,EAAE,aAAa,2CA8Jf"}
@@ -0,0 +1,38 @@
1
+ import { type CodegenTypes, type ViewProps, type HostComponent } from 'react-native';
2
+ export interface NativeProps extends ViewProps {
3
+ animatedProperties?: CodegenTypes.WithDefault<CodegenTypes.Int32, 0>;
4
+ animateOpacity?: CodegenTypes.WithDefault<CodegenTypes.Float, 1.0>;
5
+ animateTranslateX?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
6
+ animateTranslateY?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
7
+ animateScaleX?: CodegenTypes.WithDefault<CodegenTypes.Float, 1.0>;
8
+ animateScaleY?: CodegenTypes.WithDefault<CodegenTypes.Float, 1.0>;
9
+ animateRotate?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
10
+ animateRotateX?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
11
+ animateRotateY?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
12
+ animateBorderRadius?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
13
+ initialAnimateOpacity?: CodegenTypes.WithDefault<CodegenTypes.Float, 1.0>;
14
+ initialAnimateTranslateX?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
15
+ initialAnimateTranslateY?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
16
+ initialAnimateScaleX?: CodegenTypes.WithDefault<CodegenTypes.Float, 1.0>;
17
+ initialAnimateScaleY?: CodegenTypes.WithDefault<CodegenTypes.Float, 1.0>;
18
+ initialAnimateRotate?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
19
+ initialAnimateRotateX?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
20
+ initialAnimateRotateY?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
21
+ initialAnimateBorderRadius?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.0>;
22
+ transitionType?: CodegenTypes.WithDefault<'timing' | 'spring' | 'none', 'timing'>;
23
+ transitionDuration?: CodegenTypes.WithDefault<CodegenTypes.Int32, 300>;
24
+ transitionEasingBezier?: ReadonlyArray<CodegenTypes.Float>;
25
+ transitionDamping?: CodegenTypes.WithDefault<CodegenTypes.Float, 15.0>;
26
+ transitionStiffness?: CodegenTypes.WithDefault<CodegenTypes.Float, 120.0>;
27
+ transitionMass?: CodegenTypes.WithDefault<CodegenTypes.Float, 1.0>;
28
+ transitionLoop?: CodegenTypes.WithDefault<'none' | 'repeat' | 'reverse', 'none'>;
29
+ transformOriginX?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.5>;
30
+ transformOriginY?: CodegenTypes.WithDefault<CodegenTypes.Float, 0.5>;
31
+ onTransitionEnd?: CodegenTypes.DirectEventHandler<Readonly<{
32
+ finished: boolean;
33
+ }>>;
34
+ useHardwareLayer?: CodegenTypes.WithDefault<boolean, false>;
35
+ }
36
+ declare const _default: HostComponent<NativeProps>;
37
+ export default _default;
38
+ //# sourceMappingURL=EaseViewNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EaseViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/EaseViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,aAAa,EACnB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,WAAY,SAAQ,SAAS;IAE5C,kBAAkB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAGrE,cAAc,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACnE,iBAAiB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACtE,iBAAiB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACtE,aAAa,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAClE,aAAa,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,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F,cAAc,CAAC,EAAE,YAAY,CAAC,WAAW,CACvC,QAAQ,GAAG,QAAQ,GAAG,MAAM,EAC5B,QAAQ,CACT,CAAC;IACF,kBAAkB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAEvE,sBAAsB,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC3D,iBAAiB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACvE,mBAAmB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC1E,cAAc,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACnE,cAAc,CAAC,EAAE,YAAY,CAAC,WAAW,CACvC,MAAM,GAAG,QAAQ,GAAG,SAAS,EAC7B,MAAM,CACP,CAAC;IAGF,gBAAgB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACrE,gBAAgB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAGrE,eAAe,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAC/C,QAAQ,CAAC;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC,CAChC,CAAC;IAGF,gBAAgB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;CAC7D;wBAII,aAAa,CAAC,WAAW,CAAC;AAF/B,wBAEgC"}
@@ -0,0 +1,4 @@
1
+ export { EaseView } from './EaseView';
2
+ export type { EaseViewProps } from './EaseView';
3
+ export type { AnimateProps, CubicBezier, Transition, TimingTransition, SpringTransition, NoneTransition, EasingType, TransitionEndEvent, TransformOrigin, } from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,YAAY,EACV,YAAY,EACZ,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,eAAe,GAChB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,66 @@
1
+ /** Cubic bezier control points: [x1, y1, x2, y2]. */
2
+ export type CubicBezier = [number, number, number, number];
3
+ /** Easing curve for timing animations. */
4
+ export type EasingType = 'linear' | 'easeIn' | 'easeOut' | 'easeInOut' | CubicBezier;
5
+ /** Timing-based transition with fixed duration and easing curve. */
6
+ export type TimingTransition = {
7
+ type: 'timing';
8
+ /** Duration in milliseconds. @default 300 */
9
+ duration?: number;
10
+ /** Easing curve. @default 'easeInOut' */
11
+ easing?: EasingType;
12
+ /** Loop mode — 'repeat' restarts from the beginning, 'reverse' alternates direction. */
13
+ loop?: 'repeat' | 'reverse';
14
+ };
15
+ /** Physics-based spring transition. */
16
+ export type SpringTransition = {
17
+ type: 'spring';
18
+ /** Friction — higher values reduce oscillation. @default 15 */
19
+ damping?: number;
20
+ /** Spring constant — higher values mean faster animation. @default 120 */
21
+ stiffness?: number;
22
+ /** Mass of the object — higher values mean slower, more momentum. @default 1 */
23
+ mass?: number;
24
+ };
25
+ /** No transition — values are applied immediately without animation. */
26
+ export type NoneTransition = {
27
+ type: 'none';
28
+ };
29
+ /** Animation transition configuration. */
30
+ export type Transition = TimingTransition | SpringTransition | NoneTransition;
31
+ /** Event fired when the animation ends. */
32
+ export type TransitionEndEvent = {
33
+ /** True if the animation completed naturally, false if interrupted. */
34
+ finished: boolean;
35
+ };
36
+ /** Transform origin as 0–1 fractions. Default is center (0.5, 0.5). */
37
+ export type TransformOrigin = {
38
+ /** Horizontal origin. 0 = left, 0.5 = center, 1 = right. @default 0.5 */
39
+ x?: number;
40
+ /** Vertical origin. 0 = top, 0.5 = center, 1 = bottom. @default 0.5 */
41
+ y?: number;
42
+ };
43
+ /** Animatable view properties. Unspecified properties default to their identity values. */
44
+ export type AnimateProps = {
45
+ /** View opacity (0–1). @default 1 */
46
+ opacity?: number;
47
+ /** Horizontal translation in pixels. @default 0 */
48
+ translateX?: number;
49
+ /** Vertical translation in pixels. @default 0 */
50
+ translateY?: number;
51
+ /** Uniform scale factor (shorthand for scaleX + scaleY). @default 1 */
52
+ scale?: number;
53
+ /** Horizontal scale factor. Overrides `scale` for the X axis. @default 1 */
54
+ scaleX?: number;
55
+ /** Vertical scale factor. Overrides `scale` for the Y axis. @default 1 */
56
+ scaleY?: number;
57
+ /** Z-axis rotation in degrees. @default 0 */
58
+ rotate?: number;
59
+ /** X-axis rotation in degrees (3D). @default 0 */
60
+ rotateX?: number;
61
+ /** Y-axis rotation in degrees (3D). @default 0 */
62
+ rotateY?: number;
63
+ /** Border radius in pixels. Uses hardware-accelerated clipping (ViewOutlineProvider on Android, layer.cornerRadius on iOS). @default 0 */
64
+ borderRadius?: number;
65
+ };
66
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,MAAM,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE3D,0CAA0C;AAC1C,MAAM,MAAM,UAAU,GAClB,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,WAAW,GACX,WAAW,CAAC;AAEhB,oEAAoE;AACpE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,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AAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0IAA0I;IAC1I,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,187 @@
1
+ {
2
+ "name": "react-native-ease",
3
+ "version": "0.1.0-alpha.0",
4
+ "description": "Lightweight declarative animations powered by platform APIs",
5
+ "main": "./lib/module/index.js",
6
+ "types": "./lib/typescript/src/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "source": "./src/index.tsx",
10
+ "types": "./lib/typescript/src/index.d.ts",
11
+ "default": "./lib/module/index.js"
12
+ },
13
+ "./package.json": "./package.json"
14
+ },
15
+ "files": [
16
+ "src",
17
+ "lib",
18
+ "android",
19
+ "ios",
20
+ "cpp",
21
+ "*.podspec",
22
+ "!ios/build",
23
+ "!android/build",
24
+ "!android/gradle",
25
+ "!android/gradlew",
26
+ "!android/gradlew.bat",
27
+ "!android/local.properties",
28
+ "!**/__tests__",
29
+ "!**/__fixtures__",
30
+ "!**/__mocks__",
31
+ "!**/.*"
32
+ ],
33
+ "scripts": {
34
+ "example": "yarn workspace react-native-ease-example",
35
+ "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
36
+ "prepare": "bob build",
37
+ "test": "jest",
38
+ "lint": "yarn lint:eslint && yarn lint:ts",
39
+ "lint:ts": "tsc",
40
+ "lint:eslint": "eslint \"**/*.{js,ts,tsx}\"",
41
+ "release": "release-it --only-version",
42
+ "format:prettier:check": "prettier \"src/**/*.{js,ts,tsx}\" \"example/**/*.{js,ts,tsx}\" --check",
43
+ "format:prettier:write": "yarn format:prettier:check --write",
44
+ "format:clang:check": "clang-format --dry-run --Werror --glob='{ios,android/src}/**/*.{h,cpp,m,mm}'",
45
+ "format:clang:write": "clang-format -i --glob='{ios,android/src}/**/*.{h,hpp,cpp,m,mm}'",
46
+ "format:check": "yarn format:prettier:check && yarn format:clang:check",
47
+ "format:write": "yarn format:prettier:write && yarn format:clang:write"
48
+ },
49
+ "keywords": [
50
+ "react-native",
51
+ "ios",
52
+ "android"
53
+ ],
54
+ "repository": {
55
+ "type": "git",
56
+ "url": "git+https://github.com/janicduplessis/react-native-ease.git"
57
+ },
58
+ "author": "Janic Duplessis <janic@appandflow.com> (https://github.com/janicduplessis)",
59
+ "license": "MIT",
60
+ "bugs": {
61
+ "url": "https://github.com/janicduplessis/react-native-ease/issues"
62
+ },
63
+ "homepage": "https://github.com/janicduplessis/react-native-ease#readme",
64
+ "publishConfig": {
65
+ "registry": "https://registry.npmjs.org/"
66
+ },
67
+ "devDependencies": {
68
+ "@commitlint/config-conventional": "^19.8.1",
69
+ "@eslint/compat": "^1.3.2",
70
+ "@eslint/eslintrc": "^3.3.1",
71
+ "@eslint/js": "^9.35.0",
72
+ "@react-native/babel-preset": "0.83.0",
73
+ "@react-native/eslint-config": "0.83.0",
74
+ "@release-it/conventional-changelog": "^10.0.1",
75
+ "@testing-library/jest-native": "^5.4.3",
76
+ "@testing-library/react-native": "^13.3.3",
77
+ "@types/jest": "^29.5.14",
78
+ "@types/react": "^19.2.0",
79
+ "@types/react-test-renderer": "^19",
80
+ "clang-format": "^1.8.0",
81
+ "commitlint": "^19.8.1",
82
+ "del-cli": "^6.0.0",
83
+ "eslint": "^9.35.0",
84
+ "eslint-config-prettier": "^10.1.8",
85
+ "eslint-plugin-prettier": "^5.5.4",
86
+ "jest": "^30.2.0",
87
+ "lefthook": "^2.0.3",
88
+ "prettier": "^2.8.8",
89
+ "react": "19.2.0",
90
+ "react-native": "0.83.0",
91
+ "react-native-builder-bob": "^0.40.18",
92
+ "react-test-renderer": "19.2.0",
93
+ "release-it": "^19.0.4",
94
+ "turbo": "^2.5.6",
95
+ "typescript": "^5.9.2"
96
+ },
97
+ "peerDependencies": {
98
+ "react": "*",
99
+ "react-native": "*"
100
+ },
101
+ "workspaces": [
102
+ "example"
103
+ ],
104
+ "packageManager": "yarn@4.11.0",
105
+ "react-native-builder-bob": {
106
+ "source": "src",
107
+ "output": "lib",
108
+ "targets": [
109
+ [
110
+ "module",
111
+ {
112
+ "esm": true
113
+ }
114
+ ],
115
+ [
116
+ "typescript",
117
+ {
118
+ "project": "tsconfig.build.json"
119
+ }
120
+ ]
121
+ ]
122
+ },
123
+ "codegenConfig": {
124
+ "name": "EaseViewSpec",
125
+ "type": "all",
126
+ "jsSrcsDir": "src",
127
+ "android": {
128
+ "javaPackageName": "com.ease"
129
+ },
130
+ "ios": {
131
+ "components": {
132
+ "EaseView": {
133
+ "className": "EaseView"
134
+ }
135
+ }
136
+ }
137
+ },
138
+ "prettier": {
139
+ "quoteProps": "consistent",
140
+ "singleQuote": true,
141
+ "tabWidth": 2,
142
+ "trailingComma": "all",
143
+ "useTabs": false
144
+ },
145
+ "jest": {
146
+ "preset": "react-native",
147
+ "modulePathIgnorePatterns": [
148
+ "<rootDir>/example/node_modules",
149
+ "<rootDir>/lib/"
150
+ ]
151
+ },
152
+ "commitlint": {
153
+ "extends": [
154
+ "@commitlint/config-conventional"
155
+ ]
156
+ },
157
+ "release-it": {
158
+ "git": {
159
+ "commitMessage": "chore: release ${version}",
160
+ "tagName": "v${version}"
161
+ },
162
+ "npm": {
163
+ "publish": true
164
+ },
165
+ "github": {
166
+ "release": true
167
+ },
168
+ "plugins": {
169
+ "@release-it/conventional-changelog": {
170
+ "preset": {
171
+ "name": "angular"
172
+ }
173
+ }
174
+ }
175
+ },
176
+ "create-react-native-library": {
177
+ "type": "fabric-view",
178
+ "languages": "kotlin-objc",
179
+ "tools": [
180
+ "eslint",
181
+ "jest",
182
+ "lefthook",
183
+ "release-it"
184
+ ],
185
+ "version": "0.57.2"
186
+ }
187
+ }