@hanzogui/animations-moti 2.0.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.
- package/LICENSE +21 -0
- package/dist/cjs/createAnimations.cjs +256 -0
- package/dist/cjs/createAnimations.native.js +290 -0
- package/dist/cjs/createAnimations.native.js.map +1 -0
- package/dist/cjs/index.cjs +19 -0
- package/dist/cjs/index.native.js +22 -0
- package/dist/cjs/index.native.js.map +1 -0
- package/dist/cjs/polyfill.cjs +2 -0
- package/dist/cjs/polyfill.native.js +5 -0
- package/dist/cjs/polyfill.native.js.map +1 -0
- package/dist/esm/createAnimations.mjs +222 -0
- package/dist/esm/createAnimations.mjs.map +1 -0
- package/dist/esm/createAnimations.native.js +253 -0
- package/dist/esm/createAnimations.native.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/index.mjs +2 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/index.native.js +2 -0
- package/dist/esm/index.native.js.map +1 -0
- package/dist/esm/polyfill.mjs +3 -0
- package/dist/esm/polyfill.mjs.map +1 -0
- package/dist/esm/polyfill.native.js +3 -0
- package/dist/esm/polyfill.native.js.map +1 -0
- package/package.json +55 -0
- package/src/createAnimations.tsx +382 -0
- package/src/index.ts +3 -0
- package/src/polyfill.ts +9 -0
- package/types/createAnimations.d.ts +5 -0
- package/types/createAnimations.d.ts.map +11 -0
- package/types/index.d.ts +4 -0
- package/types/index.d.ts.map +11 -0
- package/types/polyfill.d.ts +2 -0
- package/types/polyfill.d.ts.map +11 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Nate Wienert
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf,
|
|
6
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
+
value: mod,
|
|
27
|
+
enumerable: !0
|
|
28
|
+
}) : target, mod)),
|
|
29
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
30
|
+
value: !0
|
|
31
|
+
}), mod);
|
|
32
|
+
var createAnimations_exports = {};
|
|
33
|
+
__export(createAnimations_exports, {
|
|
34
|
+
createAnimations: () => createAnimations
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(createAnimations_exports);
|
|
37
|
+
var import_use_presence = require("@hanzogui/use-presence"),
|
|
38
|
+
import_core = require("@hanzogui/core"),
|
|
39
|
+
import_author = require("moti/author"),
|
|
40
|
+
import_react = __toESM(require("react"), 1),
|
|
41
|
+
import_react_native_reanimated = __toESM(require("react-native-reanimated"), 1),
|
|
42
|
+
import_jsx_runtime = require("react/jsx-runtime");
|
|
43
|
+
const resolveDynamicValue = (value, isDark) => value && typeof value == "object" && "dynamic" in value ? isDark ? value.dynamic.dark : value.dynamic.light : value,
|
|
44
|
+
safeESModule = a => {
|
|
45
|
+
const b = a;
|
|
46
|
+
return (b.__esModule || b[Symbol.toStringTag] === "Module" ? b.default : b) || a;
|
|
47
|
+
},
|
|
48
|
+
Animated = safeESModule(import_react_native_reanimated.default);
|
|
49
|
+
function createGuiAnimatedComponent(defaultTag = "div") {
|
|
50
|
+
const isText = defaultTag === "span",
|
|
51
|
+
Component = Animated.createAnimatedComponent((0, import_react.forwardRef)((propsIn, ref) => {
|
|
52
|
+
const {
|
|
53
|
+
forwardedRef,
|
|
54
|
+
animation,
|
|
55
|
+
render = defaultTag,
|
|
56
|
+
...propsRest
|
|
57
|
+
} = propsIn,
|
|
58
|
+
hostRef = (0, import_react.useRef)(null),
|
|
59
|
+
composedRefs = (0, import_core.useComposedRefs)(forwardedRef, ref, hostRef),
|
|
60
|
+
stateRef = (0, import_react.useRef)(null);
|
|
61
|
+
stateRef.current || (stateRef.current = {
|
|
62
|
+
get host() {
|
|
63
|
+
return hostRef.current;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
const [_, state] = (0, import_core.useThemeWithState)({}),
|
|
67
|
+
props = (0, import_core.getSplitStyles)(propsRest, isText ? import_core.Text.staticConfig : import_core.View.staticConfig, state?.theme, state?.name, {
|
|
68
|
+
unmounted: !1
|
|
69
|
+
}, {
|
|
70
|
+
isAnimated: !1,
|
|
71
|
+
noClass: !0
|
|
72
|
+
})?.viewProps || {},
|
|
73
|
+
Element = render,
|
|
74
|
+
transformedProps = import_core.hooks.usePropsTransform?.(render, props, stateRef, !1);
|
|
75
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(Element, {
|
|
76
|
+
...transformedProps,
|
|
77
|
+
ref: composedRefs
|
|
78
|
+
});
|
|
79
|
+
}));
|
|
80
|
+
return Component.acceptRenderProp = !0, Component;
|
|
81
|
+
}
|
|
82
|
+
const AnimatedView = createGuiAnimatedComponent("div"),
|
|
83
|
+
AnimatedText = createGuiAnimatedComponent("span"),
|
|
84
|
+
onlyAnimateKeys = {
|
|
85
|
+
transform: !0,
|
|
86
|
+
opacity: !0,
|
|
87
|
+
height: !0,
|
|
88
|
+
width: !0,
|
|
89
|
+
backgroundColor: !0,
|
|
90
|
+
borderColor: !0,
|
|
91
|
+
borderLeftColor: !0,
|
|
92
|
+
borderRightColor: !0,
|
|
93
|
+
borderTopColor: !0,
|
|
94
|
+
borderBottomColor: !0,
|
|
95
|
+
borderRadius: !0,
|
|
96
|
+
borderTopLeftRadius: !0,
|
|
97
|
+
borderTopRightRadius: !0,
|
|
98
|
+
borderBottomLeftRadius: !0,
|
|
99
|
+
borderBottomRightRadius: !0,
|
|
100
|
+
borderLeftWidth: !0,
|
|
101
|
+
borderRightWidth: !0,
|
|
102
|
+
borderTopWidth: !0,
|
|
103
|
+
borderBottomWidth: !0,
|
|
104
|
+
color: !0,
|
|
105
|
+
left: !0,
|
|
106
|
+
right: !0,
|
|
107
|
+
top: !0,
|
|
108
|
+
bottom: !0,
|
|
109
|
+
fontSize: !0,
|
|
110
|
+
fontWeight: !0,
|
|
111
|
+
lineHeight: !0,
|
|
112
|
+
letterSpacing: !0
|
|
113
|
+
};
|
|
114
|
+
function createAnimations(animations) {
|
|
115
|
+
return {
|
|
116
|
+
needsCustomComponent: !0,
|
|
117
|
+
View: import_core.isWeb ? AnimatedView : Animated.View,
|
|
118
|
+
Text: import_core.isWeb ? AnimatedText : Animated.Text,
|
|
119
|
+
// View: Animated.View,
|
|
120
|
+
// Text: Animated.Text,
|
|
121
|
+
isReactNative: !0,
|
|
122
|
+
inputStyle: "value",
|
|
123
|
+
outputStyle: "inline",
|
|
124
|
+
animations,
|
|
125
|
+
usePresence: import_use_presence.usePresence,
|
|
126
|
+
ResetPresence: import_use_presence.ResetPresence,
|
|
127
|
+
useAnimatedNumber(initial) {
|
|
128
|
+
const sharedValue = (0, import_react_native_reanimated.useSharedValue)(initial);
|
|
129
|
+
return import_react.default.useMemo(() => ({
|
|
130
|
+
getInstance() {
|
|
131
|
+
"worklet";
|
|
132
|
+
|
|
133
|
+
return sharedValue;
|
|
134
|
+
},
|
|
135
|
+
getValue() {
|
|
136
|
+
"worklet";
|
|
137
|
+
|
|
138
|
+
return sharedValue.value;
|
|
139
|
+
},
|
|
140
|
+
setValue(next, config = {
|
|
141
|
+
type: "spring"
|
|
142
|
+
}, onFinish) {
|
|
143
|
+
"worklet";
|
|
144
|
+
|
|
145
|
+
config.type === "direct" ? (sharedValue.value = next, onFinish?.()) : config.type === "spring" ? sharedValue.value = (0, import_react_native_reanimated.withSpring)(next, config, onFinish ? () => {
|
|
146
|
+
"worklet";
|
|
147
|
+
|
|
148
|
+
(0, import_react_native_reanimated.runOnJS)(onFinish)();
|
|
149
|
+
} : void 0) : sharedValue.value = (0, import_react_native_reanimated.withTiming)(next, config, onFinish ? () => {
|
|
150
|
+
"worklet";
|
|
151
|
+
|
|
152
|
+
(0, import_react_native_reanimated.runOnJS)(onFinish)();
|
|
153
|
+
} : void 0);
|
|
154
|
+
},
|
|
155
|
+
stop() {
|
|
156
|
+
"worklet";
|
|
157
|
+
|
|
158
|
+
(0, import_react_native_reanimated.cancelAnimation)(sharedValue);
|
|
159
|
+
}
|
|
160
|
+
}), [sharedValue]);
|
|
161
|
+
},
|
|
162
|
+
useAnimatedNumberReaction({
|
|
163
|
+
value
|
|
164
|
+
}, onValue) {
|
|
165
|
+
const instance = value.getInstance();
|
|
166
|
+
return (0, import_react_native_reanimated.useAnimatedReaction)(() => instance.value, (next, prev) => {
|
|
167
|
+
prev !== next && (0, import_react_native_reanimated.runOnJS)(onValue)(next);
|
|
168
|
+
},
|
|
169
|
+
// dependency array is very important here
|
|
170
|
+
[onValue, instance]);
|
|
171
|
+
},
|
|
172
|
+
/**
|
|
173
|
+
* `getStyle` must be a worklet
|
|
174
|
+
*/
|
|
175
|
+
useAnimatedNumberStyle(val, getStyle) {
|
|
176
|
+
const instance = val.getInstance(),
|
|
177
|
+
derivedValue = (0, import_react_native_reanimated.useDerivedValue)(() => instance.value, [instance, getStyle]);
|
|
178
|
+
return (0, import_react_native_reanimated.useAnimatedStyle)(() => getStyle(derivedValue.value), [val, getStyle, derivedValue, instance]);
|
|
179
|
+
},
|
|
180
|
+
useAnimations: animationProps => {
|
|
181
|
+
const {
|
|
182
|
+
props,
|
|
183
|
+
presence,
|
|
184
|
+
style,
|
|
185
|
+
componentState
|
|
186
|
+
} = animationProps,
|
|
187
|
+
animationKey = Array.isArray(props.transition) ? props.transition[0] : props.transition,
|
|
188
|
+
isHydrating = componentState.unmounted === !0,
|
|
189
|
+
disableAnimation = isHydrating || !animationKey,
|
|
190
|
+
presenceContext = import_react.default.useContext(import_use_presence.PresenceContext),
|
|
191
|
+
[, themeState] = (0, import_core.useThemeWithState)({}),
|
|
192
|
+
isDark = themeState?.scheme === "dark" || themeState?.name?.startsWith("dark"),
|
|
193
|
+
{
|
|
194
|
+
dontAnimate,
|
|
195
|
+
motiProps
|
|
196
|
+
} = (0, import_react.useMemo)(() => {
|
|
197
|
+
let animate = {},
|
|
198
|
+
dontAnimate2 = {};
|
|
199
|
+
if (disableAnimation) for (const key in style) {
|
|
200
|
+
const rawValue = style[key],
|
|
201
|
+
value = resolveDynamicValue(rawValue, isDark);
|
|
202
|
+
value !== void 0 && (dontAnimate2[key] = value);
|
|
203
|
+
} else {
|
|
204
|
+
const animateOnly = props.animateOnly;
|
|
205
|
+
for (const key in style) {
|
|
206
|
+
const rawValue = style[key],
|
|
207
|
+
value = resolveDynamicValue(rawValue, isDark);
|
|
208
|
+
value !== void 0 && (!onlyAnimateKeys[key] || value === "auto" || typeof value == "string" && value.startsWith("calc") || animateOnly && !animateOnly.includes(key) ? dontAnimate2[key] = value : animate[key] = value);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
if (componentState.unmounted === "should-enter") for (const key in style) {
|
|
212
|
+
const rawValue = style[key],
|
|
213
|
+
value = resolveDynamicValue(rawValue, isDark);
|
|
214
|
+
value !== void 0 && (dontAnimate2[key] = value);
|
|
215
|
+
}
|
|
216
|
+
const styles = animate,
|
|
217
|
+
isExiting = !!presence?.[1],
|
|
218
|
+
usePresenceValue = presence || void 0;
|
|
219
|
+
let transition = isHydrating ? {
|
|
220
|
+
type: "transition",
|
|
221
|
+
duration: 0
|
|
222
|
+
} : animations[animationKey],
|
|
223
|
+
hasClonedTransition = !1;
|
|
224
|
+
if (Array.isArray(props.transition)) {
|
|
225
|
+
const config = props.transition[1];
|
|
226
|
+
if (config && typeof config == "object") for (const key in config) {
|
|
227
|
+
const val = config[key];
|
|
228
|
+
hasClonedTransition || (transition = Object.assign({}, transition), hasClonedTransition = !0), typeof val == "string" ? transition[key] = animations[val] : transition[key] = val;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return {
|
|
232
|
+
dontAnimate: dontAnimate2,
|
|
233
|
+
motiProps: {
|
|
234
|
+
animate: isExiting || componentState.unmounted === !0 ? {} : styles,
|
|
235
|
+
transition: componentState.unmounted ? {
|
|
236
|
+
duration: 0
|
|
237
|
+
} : transition,
|
|
238
|
+
usePresenceValue,
|
|
239
|
+
presenceContext,
|
|
240
|
+
exit: isExiting ? styles : void 0
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
}, [presenceContext, presence, animationKey, componentState.unmounted, JSON.stringify(style), presenceContext, isDark]),
|
|
244
|
+
moti = (0, import_author.useMotify)(motiProps);
|
|
245
|
+
return process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile" && console.info("useMotify(", JSON.stringify(motiProps, null, 2) + ")", {
|
|
246
|
+
"componentState.unmounted": componentState.unmounted,
|
|
247
|
+
animationProps,
|
|
248
|
+
motiProps,
|
|
249
|
+
moti,
|
|
250
|
+
style: [dontAnimate, moti.style]
|
|
251
|
+
}), {
|
|
252
|
+
style: [dontAnimate, moti.style]
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
}
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf,
|
|
8
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: !0
|
|
13
|
+
});
|
|
14
|
+
},
|
|
15
|
+
__copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: !0
|
|
30
|
+
}) : target, mod)),
|
|
31
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
+
value: !0
|
|
33
|
+
}), mod);
|
|
34
|
+
var createAnimations_exports = {};
|
|
35
|
+
__export(createAnimations_exports, {
|
|
36
|
+
createAnimations: () => createAnimations
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(createAnimations_exports);
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
40
|
+
import_use_presence = require("@hanzogui/use-presence"),
|
|
41
|
+
import_core = require("@hanzogui/core"),
|
|
42
|
+
import_author = require("moti/author"),
|
|
43
|
+
import_react = __toESM(require("react"), 1),
|
|
44
|
+
import_react_native_reanimated = __toESM(require("react-native-reanimated"), 1);
|
|
45
|
+
function _type_of(obj) {
|
|
46
|
+
"@swc/helpers - typeof";
|
|
47
|
+
|
|
48
|
+
return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
49
|
+
}
|
|
50
|
+
var resolveDynamicValue = function (value, isDark) {
|
|
51
|
+
if (value && (typeof value > "u" ? "undefined" : _type_of(value)) === "object" && "dynamic" in value) {
|
|
52
|
+
var dynamicValue = isDark ? value.dynamic.dark : value.dynamic.light;
|
|
53
|
+
return dynamicValue;
|
|
54
|
+
}
|
|
55
|
+
return value;
|
|
56
|
+
},
|
|
57
|
+
safeESModule = function (a) {
|
|
58
|
+
var b = a,
|
|
59
|
+
out = b.__esModule || b[Symbol.toStringTag] === "Module" ? b.default : b;
|
|
60
|
+
return out || a;
|
|
61
|
+
},
|
|
62
|
+
Animated = safeESModule(import_react_native_reanimated.default);
|
|
63
|
+
function createGuiAnimatedComponent() {
|
|
64
|
+
var defaultTag = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "div",
|
|
65
|
+
isText = defaultTag === "span",
|
|
66
|
+
Component = Animated.createAnimatedComponent(/* @__PURE__ */(0, import_react.forwardRef)(function (propsIn, ref) {
|
|
67
|
+
var _hooks_usePropsTransform,
|
|
68
|
+
{
|
|
69
|
+
forwardedRef,
|
|
70
|
+
animation,
|
|
71
|
+
render = defaultTag,
|
|
72
|
+
...propsRest
|
|
73
|
+
} = propsIn,
|
|
74
|
+
hostRef = (0, import_react.useRef)(null),
|
|
75
|
+
composedRefs = (0, import_core.useComposedRefs)(forwardedRef, ref, hostRef),
|
|
76
|
+
stateRef = (0, import_react.useRef)(null);
|
|
77
|
+
stateRef.current || (stateRef.current = {
|
|
78
|
+
get host() {
|
|
79
|
+
return hostRef.current;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
var [_, state] = (0, import_core.useThemeWithState)({}),
|
|
83
|
+
result = (0, import_core.getSplitStyles)(propsRest, isText ? import_core.Text.staticConfig : import_core.View.staticConfig, state?.theme, state?.name, {
|
|
84
|
+
unmounted: !1
|
|
85
|
+
}, {
|
|
86
|
+
isAnimated: !1,
|
|
87
|
+
noClass: !0
|
|
88
|
+
}),
|
|
89
|
+
props = result?.viewProps || {},
|
|
90
|
+
Element = render,
|
|
91
|
+
transformedProps = (_hooks_usePropsTransform = import_core.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_core.hooks, render, props, stateRef, !1);
|
|
92
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(Element, {
|
|
93
|
+
...transformedProps,
|
|
94
|
+
ref: composedRefs
|
|
95
|
+
});
|
|
96
|
+
}));
|
|
97
|
+
return Component.acceptRenderProp = !0, Component;
|
|
98
|
+
}
|
|
99
|
+
var AnimatedView = createGuiAnimatedComponent("div"),
|
|
100
|
+
AnimatedText = createGuiAnimatedComponent("span"),
|
|
101
|
+
onlyAnimateKeys = {
|
|
102
|
+
transform: !0,
|
|
103
|
+
opacity: !0,
|
|
104
|
+
height: !0,
|
|
105
|
+
width: !0,
|
|
106
|
+
backgroundColor: !0,
|
|
107
|
+
borderColor: !0,
|
|
108
|
+
borderLeftColor: !0,
|
|
109
|
+
borderRightColor: !0,
|
|
110
|
+
borderTopColor: !0,
|
|
111
|
+
borderBottomColor: !0,
|
|
112
|
+
borderRadius: !0,
|
|
113
|
+
borderTopLeftRadius: !0,
|
|
114
|
+
borderTopRightRadius: !0,
|
|
115
|
+
borderBottomLeftRadius: !0,
|
|
116
|
+
borderBottomRightRadius: !0,
|
|
117
|
+
borderLeftWidth: !0,
|
|
118
|
+
borderRightWidth: !0,
|
|
119
|
+
borderTopWidth: !0,
|
|
120
|
+
borderBottomWidth: !0,
|
|
121
|
+
color: !0,
|
|
122
|
+
left: !0,
|
|
123
|
+
right: !0,
|
|
124
|
+
top: !0,
|
|
125
|
+
bottom: !0,
|
|
126
|
+
fontSize: !0,
|
|
127
|
+
fontWeight: !0,
|
|
128
|
+
lineHeight: !0,
|
|
129
|
+
letterSpacing: !0
|
|
130
|
+
};
|
|
131
|
+
function createAnimations(animations) {
|
|
132
|
+
return {
|
|
133
|
+
needsCustomComponent: !0,
|
|
134
|
+
View: import_core.isWeb ? AnimatedView : Animated.View,
|
|
135
|
+
Text: import_core.isWeb ? AnimatedText : Animated.Text,
|
|
136
|
+
// View: Animated.View,
|
|
137
|
+
// Text: Animated.Text,
|
|
138
|
+
isReactNative: !0,
|
|
139
|
+
inputStyle: "value",
|
|
140
|
+
outputStyle: "inline",
|
|
141
|
+
animations,
|
|
142
|
+
usePresence: import_use_presence.usePresence,
|
|
143
|
+
ResetPresence: import_use_presence.ResetPresence,
|
|
144
|
+
useAnimatedNumber(initial) {
|
|
145
|
+
var sharedValue = (0, import_react_native_reanimated.useSharedValue)(initial);
|
|
146
|
+
return import_react.default.useMemo(function () {
|
|
147
|
+
return {
|
|
148
|
+
getInstance() {
|
|
149
|
+
"worklet";
|
|
150
|
+
|
|
151
|
+
return sharedValue;
|
|
152
|
+
},
|
|
153
|
+
getValue() {
|
|
154
|
+
"worklet";
|
|
155
|
+
|
|
156
|
+
return sharedValue.value;
|
|
157
|
+
},
|
|
158
|
+
setValue(next) {
|
|
159
|
+
"worklet";
|
|
160
|
+
|
|
161
|
+
var config = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
162
|
+
type: "spring"
|
|
163
|
+
},
|
|
164
|
+
onFinish = arguments.length > 2 ? arguments[2] : void 0;
|
|
165
|
+
config.type === "direct" ? (sharedValue.value = next, onFinish?.()) : config.type === "spring" ? sharedValue.value = (0, import_react_native_reanimated.withSpring)(next, config, onFinish ? function () {
|
|
166
|
+
"worklet";
|
|
167
|
+
|
|
168
|
+
(0, import_react_native_reanimated.runOnJS)(onFinish)();
|
|
169
|
+
} : void 0) : sharedValue.value = (0, import_react_native_reanimated.withTiming)(next, config, onFinish ? function () {
|
|
170
|
+
"worklet";
|
|
171
|
+
|
|
172
|
+
(0, import_react_native_reanimated.runOnJS)(onFinish)();
|
|
173
|
+
} : void 0);
|
|
174
|
+
},
|
|
175
|
+
stop() {
|
|
176
|
+
"worklet";
|
|
177
|
+
|
|
178
|
+
(0, import_react_native_reanimated.cancelAnimation)(sharedValue);
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
}, [sharedValue]);
|
|
182
|
+
},
|
|
183
|
+
useAnimatedNumberReaction(param, onValue) {
|
|
184
|
+
var {
|
|
185
|
+
value
|
|
186
|
+
} = param,
|
|
187
|
+
instance = value.getInstance();
|
|
188
|
+
return (0, import_react_native_reanimated.useAnimatedReaction)(function () {
|
|
189
|
+
return instance.value;
|
|
190
|
+
}, function (next, prev) {
|
|
191
|
+
prev !== next && (0, import_react_native_reanimated.runOnJS)(onValue)(next);
|
|
192
|
+
},
|
|
193
|
+
// dependency array is very important here
|
|
194
|
+
[onValue, instance]);
|
|
195
|
+
},
|
|
196
|
+
/**
|
|
197
|
+
* `getStyle` must be a worklet
|
|
198
|
+
*/
|
|
199
|
+
useAnimatedNumberStyle(val, getStyle) {
|
|
200
|
+
var instance = val.getInstance(),
|
|
201
|
+
derivedValue = (0, import_react_native_reanimated.useDerivedValue)(function () {
|
|
202
|
+
return instance.value;
|
|
203
|
+
},
|
|
204
|
+
// dependency array is very important here
|
|
205
|
+
[instance, getStyle]);
|
|
206
|
+
return (0, import_react_native_reanimated.useAnimatedStyle)(function () {
|
|
207
|
+
return getStyle(derivedValue.value);
|
|
208
|
+
},
|
|
209
|
+
// dependency array is very important here
|
|
210
|
+
[val, getStyle, derivedValue, instance]);
|
|
211
|
+
},
|
|
212
|
+
useAnimations: function (animationProps) {
|
|
213
|
+
var _themeState_name,
|
|
214
|
+
{
|
|
215
|
+
props,
|
|
216
|
+
presence,
|
|
217
|
+
style,
|
|
218
|
+
componentState
|
|
219
|
+
} = animationProps,
|
|
220
|
+
animationKey = Array.isArray(props.transition) ? props.transition[0] : props.transition,
|
|
221
|
+
isHydrating = componentState.unmounted === !0,
|
|
222
|
+
disableAnimation = isHydrating || !animationKey,
|
|
223
|
+
presenceContext = import_react.default.useContext(import_use_presence.PresenceContext),
|
|
224
|
+
[, themeState] = (0, import_core.useThemeWithState)({}),
|
|
225
|
+
isDark = themeState?.scheme === "dark" || (themeState == null || (_themeState_name = themeState.name) === null || _themeState_name === void 0 ? void 0 : _themeState_name.startsWith("dark")),
|
|
226
|
+
{
|
|
227
|
+
dontAnimate,
|
|
228
|
+
motiProps
|
|
229
|
+
} = (0, import_react.useMemo)(function () {
|
|
230
|
+
var animate = {},
|
|
231
|
+
dontAnimate2 = {};
|
|
232
|
+
if (disableAnimation) for (var key in style) {
|
|
233
|
+
var rawValue = style[key],
|
|
234
|
+
value = resolveDynamicValue(rawValue, isDark);
|
|
235
|
+
value !== void 0 && (dontAnimate2[key] = value);
|
|
236
|
+
} else {
|
|
237
|
+
var animateOnly = props.animateOnly;
|
|
238
|
+
for (var key1 in style) {
|
|
239
|
+
var rawValue1 = style[key1],
|
|
240
|
+
value1 = resolveDynamicValue(rawValue1, isDark);
|
|
241
|
+
value1 !== void 0 && (!onlyAnimateKeys[key1] || value1 === "auto" || typeof value1 == "string" && value1.startsWith("calc") || animateOnly && !animateOnly.includes(key1) ? dontAnimate2[key1] = value1 : animate[key1] = value1);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
if (componentState.unmounted === "should-enter") for (var key2 in style) {
|
|
245
|
+
var rawValue2 = style[key2],
|
|
246
|
+
value2 = resolveDynamicValue(rawValue2, isDark);
|
|
247
|
+
value2 !== void 0 && (dontAnimate2[key2] = value2);
|
|
248
|
+
}
|
|
249
|
+
var styles = animate,
|
|
250
|
+
isExiting = !!presence?.[1],
|
|
251
|
+
usePresenceValue = presence || void 0,
|
|
252
|
+
transition = isHydrating ? {
|
|
253
|
+
type: "transition",
|
|
254
|
+
duration: 0
|
|
255
|
+
} : animations[animationKey],
|
|
256
|
+
hasClonedTransition = !1;
|
|
257
|
+
if (Array.isArray(props.transition)) {
|
|
258
|
+
var config = props.transition[1];
|
|
259
|
+
if (config && (typeof config > "u" ? "undefined" : _type_of(config)) === "object") for (var key3 in config) {
|
|
260
|
+
var val = config[key3];
|
|
261
|
+
hasClonedTransition || (transition = Object.assign({}, transition), hasClonedTransition = !0), typeof val == "string" ? transition[key3] = animations[val] : transition[key3] = val;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
return {
|
|
265
|
+
dontAnimate: dontAnimate2,
|
|
266
|
+
motiProps: {
|
|
267
|
+
animate: isExiting || componentState.unmounted === !0 ? {} : styles,
|
|
268
|
+
transition: componentState.unmounted ? {
|
|
269
|
+
duration: 0
|
|
270
|
+
} : transition,
|
|
271
|
+
usePresenceValue,
|
|
272
|
+
presenceContext,
|
|
273
|
+
exit: isExiting ? styles : void 0
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
}, [presenceContext, presence, animationKey, componentState.unmounted, JSON.stringify(style), presenceContext, isDark]),
|
|
277
|
+
moti = (0, import_author.useMotify)(motiProps);
|
|
278
|
+
return process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile" && console.info("useMotify(", JSON.stringify(motiProps, null, 2) + ")", {
|
|
279
|
+
"componentState.unmounted": componentState.unmounted,
|
|
280
|
+
animationProps,
|
|
281
|
+
motiProps,
|
|
282
|
+
moti,
|
|
283
|
+
style: [dontAnimate, moti.style]
|
|
284
|
+
}), {
|
|
285
|
+
style: [dontAnimate, moti.style]
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
//# sourceMappingURL=createAnimations.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","createAnimations_exports","__export","createAnimations","module","exports","import_jsx_runtime","require","import_use_presence","import_core","import_author","import_react","__toESM","import_react_native_reanimated","_type_of","obj","Symbol","constructor","resolveDynamicValue","isDark","dynamicValue","dynamic","dark","light","safeESModule","a","b","out","__esModule","toStringTag","default","Animated","createGuiAnimatedComponent","defaultTag","arguments","length","isText","Component","createAnimatedComponent","forwardRef","propsIn","ref","_hooks_usePropsTransform","forwardedRef","animation","render","propsRest","hostRef","useRef","composedRefs","useComposedRefs","stateRef","current","host","_","state","useThemeWithState","result","getSplitStyles","Text","staticConfig","View","theme","name","unmounted","isAnimated","noClass","props","viewProps","Element","transformedProps","hooks","usePropsTransform","call","jsx","acceptRenderProp","AnimatedView","AnimatedText","onlyAnimateKeys","transform","opacity","height","width","backgroundColor","borderColor","borderLeftColor","borderRightColor","borderTopColor","borderBottomColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","color","left","right","top","bottom","fontSize","fontWeight","lineHeight","letterSpacing","animations","needsCustomComponent","isWeb","isReactNative","inputStyle","outputStyle","usePresence","ResetPresence","useAnimatedNumber","initial","sharedValue","useSharedValue","useMemo","getInstance","getValue","setValue","next","config","type","onFinish","withSpring","runOnJS","withTiming","stop","cancelAnimation","useAnimatedNumberReaction","param","onValue","instance","useAnimatedReaction","prev","useAnimatedNumberStyle","val","getStyle","derivedValue","useDerivedValue","useAnimatedStyle","useAnimations","animationProps","_themeState_name","presence","style","componentState","animationKey","Array","isArray","transition","isHydrating","disableAnimation","presenceContext","useContext","PresenceContext","themeState","scheme","startsWith","dontAnimate","motiProps","animate","dontAnimate2","key","rawValue","animateOnly","key1","rawValue1","value1","includes","key2","rawValue2","value2","styles","isExiting","usePresenceValue","duration","hasClonedTransition","key3","Object","assign"],"sources":["../../src/createAnimations.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,wBAAA;AAAAC,QAAA,CAAAD,wBAAA;EAAAE,gBAAA,EAAAA,CAAA,KAAAA;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAAT,YAA4D,CAAAK,wBAAA;AAe5D,IAAAK,kBAAM,GAAAC,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
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
7
|
+
get: () => from[key],
|
|
8
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
9
|
+
});
|
|
10
|
+
return to;
|
|
11
|
+
},
|
|
12
|
+
__reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
13
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
14
|
+
value: !0
|
|
15
|
+
}), mod);
|
|
16
|
+
var index_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(index_exports);
|
|
18
|
+
var import_polyfill = require("./polyfill.cjs");
|
|
19
|
+
__reExport(index_exports, require("./createAnimations.cjs"), module.exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
9
|
+
get: () => from[key],
|
|
10
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
|
+
});
|
|
12
|
+
return to;
|
|
13
|
+
},
|
|
14
|
+
__reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
+
value: !0
|
|
17
|
+
}), mod);
|
|
18
|
+
var index_exports = {};
|
|
19
|
+
module.exports = __toCommonJS(index_exports);
|
|
20
|
+
var import_polyfill = require("./polyfill.native.js");
|
|
21
|
+
__reExport(index_exports, require("./createAnimations.native.js"), module.exports);
|
|
22
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","import_polyfill","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAO,CAAAK,aAAA;AAEP,IAAAG,eAAA,GAAAC,OAAc","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["requestAnimationFrame","globalThis","setTimeout"],"sources":["../../src/polyfill.ts"],"sourcesContent":[null],"mappings":"AACI,YAAO;;AAKP,OAAOA,qBACT,WAAWC,UAAY,CAAAD,qBAAA,GAAAE,UAAA","ignoreList":[]}
|