@animicons/react-native 0.1.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 +88 -0
- package/dist/index.d.mts +70 -0
- package/dist/index.d.ts +70 -0
- package/dist/index.esm.js +739 -0
- package/dist/index.js +768 -0
- package/package.json +51 -0
|
@@ -0,0 +1,739 @@
|
|
|
1
|
+
import React6, { useEffect, useCallback } from 'react';
|
|
2
|
+
import { Circle, Path, Svg } from 'react-native-svg';
|
|
3
|
+
import Animated4, { useAnimatedProps, useSharedValue, withRepeat, withTiming, Easing, withDelay, runOnJS, cancelAnimation, useAnimatedStyle, withSequence } from 'react-native-reanimated';
|
|
4
|
+
import { DURATION, PulsePaths, CheckPaths, LoaderPaths, UploadPaths, WifiPaths, BellPaths, StarPaths, HeartPaths, ECGPaths, HeartRatePaths, LungsPaths, PillPaths, ThermometerPaths, DNAPaths, SyringePaths, BrainPaths, BloodDropPaths, StepsPaths, SleepPaths, OxygenPaths, MedkitPaths } from '@animicons/shared';
|
|
5
|
+
import { Pressable } from 'react-native';
|
|
6
|
+
|
|
7
|
+
// src/icons/ui/Pulse.tsx
|
|
8
|
+
|
|
9
|
+
// src/utils/resolveStyle.ts
|
|
10
|
+
function resolveStyle(props, defaults) {
|
|
11
|
+
const base = props.color ?? defaults.defaultColor;
|
|
12
|
+
return {
|
|
13
|
+
stroke: props.strokeColor ?? base,
|
|
14
|
+
fill: props.fillColor ?? base,
|
|
15
|
+
secondaryColor: props.secondaryColor ?? `${base}33`,
|
|
16
|
+
opacity: props.opacity ?? 1,
|
|
17
|
+
strokeWidth: props.strokeWidth ?? defaults.defaultStrokeWidth
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function getAnimDuration(speed = "normal") {
|
|
21
|
+
return DURATION[speed];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// src/icons/ui/Pulse.tsx
|
|
25
|
+
var AnimatedCircle = Animated4.createAnimatedComponent(Circle);
|
|
26
|
+
function usePulseRing(stagger, duration, autoPlay, loop) {
|
|
27
|
+
const r = useSharedValue(4);
|
|
28
|
+
const opacity = useSharedValue(0.8);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
if (autoPlay) {
|
|
31
|
+
r.value = withDelay(stagger, withRepeat(withTiming(20, { duration, easing: Easing.out(Easing.ease) }), loop ? -1 : 1));
|
|
32
|
+
opacity.value = withDelay(stagger, withRepeat(withTiming(0, { duration, easing: Easing.out(Easing.ease) }), loop ? -1 : 1));
|
|
33
|
+
} else {
|
|
34
|
+
cancelAnimation(r);
|
|
35
|
+
cancelAnimation(opacity);
|
|
36
|
+
}
|
|
37
|
+
return () => {
|
|
38
|
+
cancelAnimation(r);
|
|
39
|
+
cancelAnimation(opacity);
|
|
40
|
+
};
|
|
41
|
+
}, [autoPlay, loop, duration, stagger]);
|
|
42
|
+
return { r, opacity };
|
|
43
|
+
}
|
|
44
|
+
var Pulse = ({
|
|
45
|
+
size = 48,
|
|
46
|
+
autoPlay = true,
|
|
47
|
+
loop = true,
|
|
48
|
+
speed = "normal",
|
|
49
|
+
style,
|
|
50
|
+
...colorProps
|
|
51
|
+
}) => {
|
|
52
|
+
const d = getAnimDuration(speed);
|
|
53
|
+
const s = resolveStyle(colorProps, PulsePaths);
|
|
54
|
+
const ring1 = usePulseRing(0, d.medium, autoPlay, loop);
|
|
55
|
+
const ring2 = usePulseRing(d.stagger, d.medium, autoPlay, loop);
|
|
56
|
+
const ring3 = usePulseRing(d.stagger * 2, d.medium, autoPlay, loop);
|
|
57
|
+
const ap1 = useAnimatedProps(() => ({ r: ring1.r.value, opacity: ring1.opacity.value }));
|
|
58
|
+
const ap2 = useAnimatedProps(() => ({ r: ring2.r.value, opacity: ring2.opacity.value }));
|
|
59
|
+
const ap3 = useAnimatedProps(() => ({ r: ring3.r.value, opacity: ring3.opacity.value }));
|
|
60
|
+
return /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: PulsePaths.viewBox, style }, /* @__PURE__ */ React6.createElement(AnimatedCircle, { animatedProps: ap1, cx: "24", cy: "24", stroke: s.stroke, strokeWidth: s.strokeWidth, fill: "none" }), /* @__PURE__ */ React6.createElement(AnimatedCircle, { animatedProps: ap2, cx: "24", cy: "24", stroke: s.stroke, strokeWidth: s.strokeWidth, fill: "none" }), /* @__PURE__ */ React6.createElement(AnimatedCircle, { animatedProps: ap3, cx: "24", cy: "24", stroke: s.stroke, strokeWidth: s.strokeWidth, fill: "none" }), /* @__PURE__ */ React6.createElement(Circle, { cx: "24", cy: "24", r: 3, fill: s.stroke, opacity: s.opacity }));
|
|
61
|
+
};
|
|
62
|
+
var AnimatedPath = Animated4.createAnimatedComponent(Path);
|
|
63
|
+
var Check = ({
|
|
64
|
+
size = 48,
|
|
65
|
+
autoPlay = true,
|
|
66
|
+
loop = false,
|
|
67
|
+
speed = "normal",
|
|
68
|
+
onAnimationEnd,
|
|
69
|
+
style,
|
|
70
|
+
...colorProps
|
|
71
|
+
}) => {
|
|
72
|
+
const circleProgress = useSharedValue(126);
|
|
73
|
+
const checkProgress = useSharedValue(30);
|
|
74
|
+
const d = getAnimDuration(speed);
|
|
75
|
+
const s = resolveStyle(colorProps, CheckPaths);
|
|
76
|
+
useEffect(() => {
|
|
77
|
+
if (autoPlay) {
|
|
78
|
+
if (loop) {
|
|
79
|
+
circleProgress.value = withRepeat(withTiming(0, { duration: d.short, easing: Easing.ease }), -1);
|
|
80
|
+
checkProgress.value = withRepeat(withDelay(d.short * 0.6, withTiming(0, { duration: d.short * 0.6, easing: Easing.ease })), -1);
|
|
81
|
+
} else {
|
|
82
|
+
circleProgress.value = withTiming(0, { duration: d.short, easing: Easing.ease });
|
|
83
|
+
checkProgress.value = withDelay(d.short * 0.6, withTiming(0, { duration: d.short * 0.6, easing: Easing.ease }, () => {
|
|
84
|
+
if (onAnimationEnd) runOnJS(onAnimationEnd)();
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
cancelAnimation(circleProgress);
|
|
89
|
+
cancelAnimation(checkProgress);
|
|
90
|
+
}
|
|
91
|
+
}, [autoPlay, loop, speed]);
|
|
92
|
+
const circleProps = useAnimatedProps(() => ({ strokeDashoffset: circleProgress.value }));
|
|
93
|
+
const checkProps = useAnimatedProps(() => ({ strokeDashoffset: checkProgress.value }));
|
|
94
|
+
return /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: CheckPaths.viewBox, style }, /* @__PURE__ */ React6.createElement(AnimatedPath, { animatedProps: circleProps, d: CheckPaths.circle, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: "none", strokeDasharray: 126, opacity: s.opacity }), /* @__PURE__ */ React6.createElement(AnimatedPath, { animatedProps: checkProps, d: CheckPaths.check, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: "none", strokeDasharray: 30, strokeLinecap: "round", opacity: s.opacity }));
|
|
95
|
+
};
|
|
96
|
+
var AnimatedPath2 = Animated4.createAnimatedComponent(Path);
|
|
97
|
+
var Loader = ({
|
|
98
|
+
size = 48,
|
|
99
|
+
autoPlay = true,
|
|
100
|
+
loop = true,
|
|
101
|
+
speed = "normal",
|
|
102
|
+
onAnimationEnd,
|
|
103
|
+
style,
|
|
104
|
+
...colorProps
|
|
105
|
+
}) => {
|
|
106
|
+
const rotation = useSharedValue(0);
|
|
107
|
+
const d = getAnimDuration(speed);
|
|
108
|
+
const s = resolveStyle(colorProps, LoaderPaths);
|
|
109
|
+
useEffect(() => {
|
|
110
|
+
if (autoPlay) {
|
|
111
|
+
rotation.value = withRepeat(
|
|
112
|
+
withTiming(360, { duration: d.medium, easing: Easing.linear }),
|
|
113
|
+
loop ? -1 : 1,
|
|
114
|
+
false,
|
|
115
|
+
() => {
|
|
116
|
+
if (onAnimationEnd) runOnJS(onAnimationEnd)();
|
|
117
|
+
}
|
|
118
|
+
);
|
|
119
|
+
} else {
|
|
120
|
+
cancelAnimation(rotation);
|
|
121
|
+
}
|
|
122
|
+
return () => {
|
|
123
|
+
cancelAnimation(rotation);
|
|
124
|
+
};
|
|
125
|
+
}, [autoPlay, loop, speed, onAnimationEnd]);
|
|
126
|
+
const animatedProps = useAnimatedProps(() => ({
|
|
127
|
+
transform: [{ rotate: `${rotation.value}deg` }],
|
|
128
|
+
originX: 24,
|
|
129
|
+
originY: 24
|
|
130
|
+
}));
|
|
131
|
+
return /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: LoaderPaths.viewBox, style }, /* @__PURE__ */ React6.createElement(
|
|
132
|
+
AnimatedPath2,
|
|
133
|
+
{
|
|
134
|
+
animatedProps,
|
|
135
|
+
d: LoaderPaths.arc,
|
|
136
|
+
stroke: s.stroke,
|
|
137
|
+
strokeWidth: s.strokeWidth,
|
|
138
|
+
strokeLinecap: "round",
|
|
139
|
+
fill: "none",
|
|
140
|
+
opacity: s.opacity
|
|
141
|
+
}
|
|
142
|
+
));
|
|
143
|
+
};
|
|
144
|
+
var AnimatedPath3 = Animated4.createAnimatedComponent(Path);
|
|
145
|
+
var Upload = ({
|
|
146
|
+
size = 48,
|
|
147
|
+
autoPlay = true,
|
|
148
|
+
loop = true,
|
|
149
|
+
speed = "normal",
|
|
150
|
+
style,
|
|
151
|
+
...colorProps
|
|
152
|
+
}) => {
|
|
153
|
+
const translateY = useSharedValue(0);
|
|
154
|
+
const barDash = useSharedValue(28);
|
|
155
|
+
const d = getAnimDuration(speed);
|
|
156
|
+
const s = resolveStyle(colorProps, UploadPaths);
|
|
157
|
+
useEffect(() => {
|
|
158
|
+
if (autoPlay) {
|
|
159
|
+
translateY.value = withRepeat(
|
|
160
|
+
withTiming(-6, { duration: d.short, easing: Easing.inOut(Easing.ease) }),
|
|
161
|
+
loop ? -1 : 1,
|
|
162
|
+
true
|
|
163
|
+
);
|
|
164
|
+
barDash.value = withRepeat(
|
|
165
|
+
withTiming(0, { duration: d.medium, easing: Easing.inOut(Easing.ease) }),
|
|
166
|
+
loop ? -1 : 1,
|
|
167
|
+
true
|
|
168
|
+
);
|
|
169
|
+
} else {
|
|
170
|
+
cancelAnimation(translateY);
|
|
171
|
+
cancelAnimation(barDash);
|
|
172
|
+
}
|
|
173
|
+
}, [autoPlay, loop, speed]);
|
|
174
|
+
const arrowStyle = useAnimatedStyle(() => ({ transform: [{ translateY: translateY.value }] }));
|
|
175
|
+
const barProps = useAnimatedProps(() => ({ strokeDashoffset: barDash.value }));
|
|
176
|
+
return /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: UploadPaths.viewBox, style }, /* @__PURE__ */ React6.createElement(Animated4.View, { style: arrowStyle }, /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: UploadPaths.viewBox, style: { position: "absolute" } }, /* @__PURE__ */ React6.createElement(Path, { d: UploadPaths.arrow, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: "none", strokeLinecap: "round", strokeLinejoin: "round", opacity: s.opacity }))), /* @__PURE__ */ React6.createElement(AnimatedPath3, { animatedProps: barProps, d: UploadPaths.bar, stroke: s.stroke, strokeWidth: s.strokeWidth, strokeLinecap: "round", fill: "none", strokeDasharray: 28, opacity: s.opacity }));
|
|
177
|
+
};
|
|
178
|
+
var AnimatedPath4 = Animated4.createAnimatedComponent(Path);
|
|
179
|
+
var Wifi = ({
|
|
180
|
+
size = 48,
|
|
181
|
+
autoPlay = true,
|
|
182
|
+
loop = true,
|
|
183
|
+
speed = "normal",
|
|
184
|
+
style,
|
|
185
|
+
...colorProps
|
|
186
|
+
}) => {
|
|
187
|
+
const op1 = useSharedValue(0);
|
|
188
|
+
const op2 = useSharedValue(0);
|
|
189
|
+
const op3 = useSharedValue(0);
|
|
190
|
+
const d = getAnimDuration(speed);
|
|
191
|
+
const s = resolveStyle(colorProps, WifiPaths);
|
|
192
|
+
useEffect(() => {
|
|
193
|
+
if (autoPlay) {
|
|
194
|
+
const anim = (sv, delay) => {
|
|
195
|
+
sv.value = withDelay(delay, withRepeat(
|
|
196
|
+
withTiming(1, { duration: d.medium, easing: Easing.inOut(Easing.ease) }),
|
|
197
|
+
loop ? -1 : 1,
|
|
198
|
+
true
|
|
199
|
+
));
|
|
200
|
+
};
|
|
201
|
+
anim(op1, 0);
|
|
202
|
+
anim(op2, d.stagger);
|
|
203
|
+
anim(op3, d.stagger * 2);
|
|
204
|
+
} else {
|
|
205
|
+
cancelAnimation(op1);
|
|
206
|
+
cancelAnimation(op2);
|
|
207
|
+
cancelAnimation(op3);
|
|
208
|
+
}
|
|
209
|
+
return () => {
|
|
210
|
+
cancelAnimation(op1);
|
|
211
|
+
cancelAnimation(op2);
|
|
212
|
+
cancelAnimation(op3);
|
|
213
|
+
};
|
|
214
|
+
}, [autoPlay, loop, speed]);
|
|
215
|
+
const ap1 = useAnimatedProps(() => ({ opacity: op1.value }));
|
|
216
|
+
const ap2 = useAnimatedProps(() => ({ opacity: op2.value }));
|
|
217
|
+
const ap3 = useAnimatedProps(() => ({ opacity: op3.value }));
|
|
218
|
+
return /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: WifiPaths.viewBox, style }, /* @__PURE__ */ React6.createElement(AnimatedPath4, { animatedProps: ap1, d: WifiPaths.arc1, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: "none", strokeLinecap: "round" }), /* @__PURE__ */ React6.createElement(AnimatedPath4, { animatedProps: ap2, d: WifiPaths.arc2, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: "none", strokeLinecap: "round" }), /* @__PURE__ */ React6.createElement(AnimatedPath4, { animatedProps: ap3, d: WifiPaths.arc3, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: "none", strokeLinecap: "round" }), /* @__PURE__ */ React6.createElement(Circle, { cx: "24", cy: "40", r: 2, fill: s.stroke, opacity: s.opacity }));
|
|
219
|
+
};
|
|
220
|
+
var Bell = ({
|
|
221
|
+
size = 48,
|
|
222
|
+
autoPlay = true,
|
|
223
|
+
loop = true,
|
|
224
|
+
speed = "normal",
|
|
225
|
+
style,
|
|
226
|
+
...colorProps
|
|
227
|
+
}) => {
|
|
228
|
+
const rotation = useSharedValue(0);
|
|
229
|
+
const badgeScale = useSharedValue(1);
|
|
230
|
+
const d = getAnimDuration(speed);
|
|
231
|
+
const s = resolveStyle(colorProps, BellPaths);
|
|
232
|
+
useEffect(() => {
|
|
233
|
+
if (autoPlay) {
|
|
234
|
+
rotation.value = withRepeat(
|
|
235
|
+
withSequence(
|
|
236
|
+
withTiming(15, { duration: d.long * 0.2 }),
|
|
237
|
+
withTiming(-15, { duration: d.long * 0.2 }),
|
|
238
|
+
withTiming(8, { duration: d.long * 0.2 }),
|
|
239
|
+
withTiming(-8, { duration: d.long * 0.2 }),
|
|
240
|
+
withTiming(0, { duration: d.long * 0.2 })
|
|
241
|
+
),
|
|
242
|
+
loop ? -1 : 1
|
|
243
|
+
);
|
|
244
|
+
badgeScale.value = withRepeat(
|
|
245
|
+
withSequence(withTiming(1.3, { duration: d.long * 0.3 }), withTiming(1, { duration: d.long * 0.7 })),
|
|
246
|
+
loop ? -1 : 1
|
|
247
|
+
);
|
|
248
|
+
} else {
|
|
249
|
+
cancelAnimation(rotation);
|
|
250
|
+
cancelAnimation(badgeScale);
|
|
251
|
+
}
|
|
252
|
+
}, [autoPlay, loop, speed]);
|
|
253
|
+
const bellStyle = useAnimatedStyle(() => ({ transform: [{ rotate: `${rotation.value}deg` }] }));
|
|
254
|
+
const badgeStyle = useAnimatedStyle(() => ({ transform: [{ scale: badgeScale.value }] }));
|
|
255
|
+
return /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: BellPaths.viewBox, style }, /* @__PURE__ */ React6.createElement(Animated4.View, { style: [{ position: "absolute" }, bellStyle] }, /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: BellPaths.viewBox, style: { position: "absolute" } }, /* @__PURE__ */ React6.createElement(Path, { d: BellPaths.bell, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: s.secondaryColor, opacity: s.opacity }), /* @__PURE__ */ React6.createElement(Path, { d: BellPaths.clapper, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: "none", strokeLinecap: "round", opacity: s.opacity }), /* @__PURE__ */ React6.createElement(Path, { d: BellPaths.handle, stroke: s.stroke, strokeWidth: s.strokeWidth, strokeLinecap: "round", fill: "none", opacity: s.opacity }))), /* @__PURE__ */ React6.createElement(Animated4.View, { style: [{ position: "absolute" }, badgeStyle] }, /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: BellPaths.viewBox, style: { position: "absolute" } }, /* @__PURE__ */ React6.createElement(Circle, { cx: "34", cy: "12", r: 5, fill: s.stroke, opacity: s.opacity }))));
|
|
256
|
+
};
|
|
257
|
+
var AnimatedPath5 = Animated4.createAnimatedComponent(Path);
|
|
258
|
+
var Star = ({
|
|
259
|
+
size = 48,
|
|
260
|
+
autoPlay = true,
|
|
261
|
+
speed = "normal",
|
|
262
|
+
onAnimationEnd,
|
|
263
|
+
style,
|
|
264
|
+
...colorProps
|
|
265
|
+
}) => {
|
|
266
|
+
const scaleVal = useSharedValue(1);
|
|
267
|
+
const sparkleOp = useSharedValue(0);
|
|
268
|
+
const d = getAnimDuration(speed);
|
|
269
|
+
const s = resolveStyle(colorProps, StarPaths);
|
|
270
|
+
const trigger = useCallback(() => {
|
|
271
|
+
scaleVal.value = withTiming(1.3, { duration: d.short * 0.5 }, () => {
|
|
272
|
+
scaleVal.value = withTiming(1, { duration: d.short * 0.5 }, () => {
|
|
273
|
+
if (onAnimationEnd) runOnJS(onAnimationEnd)();
|
|
274
|
+
});
|
|
275
|
+
});
|
|
276
|
+
sparkleOp.value = withTiming(1, { duration: d.short * 0.5 }, () => {
|
|
277
|
+
sparkleOp.value = withTiming(0, { duration: d.short * 0.5 });
|
|
278
|
+
});
|
|
279
|
+
}, [onAnimationEnd, d.short, scaleVal, sparkleOp]);
|
|
280
|
+
useEffect(() => {
|
|
281
|
+
if (autoPlay) trigger();
|
|
282
|
+
return () => {
|
|
283
|
+
cancelAnimation(scaleVal);
|
|
284
|
+
cancelAnimation(sparkleOp);
|
|
285
|
+
};
|
|
286
|
+
}, [autoPlay, trigger]);
|
|
287
|
+
const starProps = useAnimatedProps(() => ({ transform: [{ scale: scaleVal.value }], originX: 24, originY: 24 }));
|
|
288
|
+
const sparkleProps = useAnimatedProps(() => ({ opacity: sparkleOp.value }));
|
|
289
|
+
return /* @__PURE__ */ React6.createElement(Pressable, { onPress: trigger, style }, /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: StarPaths.viewBox }, /* @__PURE__ */ React6.createElement(AnimatedPath5, { animatedProps: starProps, d: StarPaths.star, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: "none", opacity: s.opacity }), /* @__PURE__ */ React6.createElement(AnimatedPath5, { animatedProps: sparkleProps, d: StarPaths.sparkle1, fill: s.stroke, opacity: s.opacity }), /* @__PURE__ */ React6.createElement(AnimatedPath5, { animatedProps: sparkleProps, d: StarPaths.sparkle2, fill: s.stroke, opacity: s.opacity }), /* @__PURE__ */ React6.createElement(AnimatedPath5, { animatedProps: sparkleProps, d: StarPaths.sparkle3, fill: s.stroke, opacity: s.opacity })));
|
|
290
|
+
};
|
|
291
|
+
var AnimatedPath6 = Animated4.createAnimatedComponent(Path);
|
|
292
|
+
var Heart = ({
|
|
293
|
+
size = 48,
|
|
294
|
+
autoPlay = true,
|
|
295
|
+
loop = true,
|
|
296
|
+
speed = "normal",
|
|
297
|
+
style,
|
|
298
|
+
...colorProps
|
|
299
|
+
}) => {
|
|
300
|
+
const scaleVal = useSharedValue(1);
|
|
301
|
+
const glowOp = useSharedValue(0);
|
|
302
|
+
const d = getAnimDuration(speed);
|
|
303
|
+
const s = resolveStyle(colorProps, HeartPaths);
|
|
304
|
+
useEffect(() => {
|
|
305
|
+
if (autoPlay) {
|
|
306
|
+
const beat = withSequence(
|
|
307
|
+
withTiming(1.2, { duration: d.short * 0.35, easing: Easing.out(Easing.ease) }),
|
|
308
|
+
withTiming(1, { duration: d.short * 0.35 }),
|
|
309
|
+
withTiming(1.15, { duration: d.short * 0.3 }),
|
|
310
|
+
withTiming(1, { duration: d.medium - d.short })
|
|
311
|
+
);
|
|
312
|
+
scaleVal.value = withRepeat(beat, loop ? -1 : 1);
|
|
313
|
+
glowOp.value = withRepeat(
|
|
314
|
+
withSequence(
|
|
315
|
+
withTiming(0.4, { duration: d.short * 0.35 }),
|
|
316
|
+
withTiming(0, { duration: d.medium - d.short * 0.35 })
|
|
317
|
+
),
|
|
318
|
+
loop ? -1 : 1
|
|
319
|
+
);
|
|
320
|
+
} else {
|
|
321
|
+
cancelAnimation(scaleVal);
|
|
322
|
+
cancelAnimation(glowOp);
|
|
323
|
+
}
|
|
324
|
+
}, [autoPlay, loop, speed]);
|
|
325
|
+
const heartStyle = useAnimatedStyle(() => ({ transform: [{ scale: scaleVal.value }] }));
|
|
326
|
+
const glowProps = useAnimatedProps(() => ({ opacity: glowOp.value }));
|
|
327
|
+
return /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: HeartPaths.viewBox, style }, /* @__PURE__ */ React6.createElement(AnimatedPath6, { animatedProps: glowProps, d: HeartPaths.glow, fill: s.secondaryColor, stroke: "none" }), /* @__PURE__ */ React6.createElement(Animated4.View, { style: [{ position: "absolute" }, heartStyle] }, /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: HeartPaths.viewBox, style: { position: "absolute" } }, /* @__PURE__ */ React6.createElement(Path, { d: HeartPaths.heart, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: s.fill, opacity: s.opacity }))));
|
|
328
|
+
};
|
|
329
|
+
var AnimatedPath7 = Animated4.createAnimatedComponent(Path);
|
|
330
|
+
var ECG = ({
|
|
331
|
+
size = 48,
|
|
332
|
+
autoPlay = true,
|
|
333
|
+
loop = true,
|
|
334
|
+
speed = "normal",
|
|
335
|
+
onAnimationEnd,
|
|
336
|
+
style,
|
|
337
|
+
...colorProps
|
|
338
|
+
}) => {
|
|
339
|
+
const dashOffset = useSharedValue(100);
|
|
340
|
+
const opacity = useSharedValue(1);
|
|
341
|
+
const d = getAnimDuration(speed);
|
|
342
|
+
const s = resolveStyle(colorProps, ECGPaths);
|
|
343
|
+
useEffect(() => {
|
|
344
|
+
if (autoPlay) {
|
|
345
|
+
dashOffset.value = withRepeat(
|
|
346
|
+
withTiming(0, { duration: d.long * 0.7, easing: Easing.inOut(Easing.ease) }),
|
|
347
|
+
loop ? -1 : 1,
|
|
348
|
+
false,
|
|
349
|
+
() => {
|
|
350
|
+
if (!loop && onAnimationEnd) runOnJS(onAnimationEnd)();
|
|
351
|
+
}
|
|
352
|
+
);
|
|
353
|
+
opacity.value = withRepeat(withTiming(0, { duration: d.long * 0.3, easing: Easing.ease }), loop ? -1 : 1);
|
|
354
|
+
} else {
|
|
355
|
+
cancelAnimation(dashOffset);
|
|
356
|
+
cancelAnimation(opacity);
|
|
357
|
+
}
|
|
358
|
+
}, [autoPlay, loop, speed, onAnimationEnd]);
|
|
359
|
+
const animProps = useAnimatedProps(() => ({ strokeDashoffset: dashOffset.value, opacity: opacity.value }));
|
|
360
|
+
return /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: ECGPaths.viewBox, style }, /* @__PURE__ */ React6.createElement(AnimatedPath7, { animatedProps: animProps, d: ECGPaths.line, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeDasharray: 100 }));
|
|
361
|
+
};
|
|
362
|
+
var AnimatedPath8 = Animated4.createAnimatedComponent(Path);
|
|
363
|
+
var AnimatedCircle2 = Animated4.createAnimatedComponent(Circle);
|
|
364
|
+
var HeartRate = ({
|
|
365
|
+
size = 48,
|
|
366
|
+
autoPlay = true,
|
|
367
|
+
loop = true,
|
|
368
|
+
speed = "normal",
|
|
369
|
+
onAnimationEnd,
|
|
370
|
+
style,
|
|
371
|
+
...colorProps
|
|
372
|
+
}) => {
|
|
373
|
+
const scaleVal = useSharedValue(1);
|
|
374
|
+
const glowR = useSharedValue(16);
|
|
375
|
+
const glowOp = useSharedValue(0);
|
|
376
|
+
const d = getAnimDuration(speed);
|
|
377
|
+
const s = resolveStyle(colorProps, HeartRatePaths);
|
|
378
|
+
useEffect(() => {
|
|
379
|
+
if (autoPlay) {
|
|
380
|
+
scaleVal.value = withRepeat(
|
|
381
|
+
withSequence(withTiming(1.2, { duration: d.medium * 0.2 }), withTiming(1, { duration: d.medium * 0.8 })),
|
|
382
|
+
loop ? -1 : 1,
|
|
383
|
+
false,
|
|
384
|
+
() => {
|
|
385
|
+
if (!loop && onAnimationEnd) runOnJS(onAnimationEnd)();
|
|
386
|
+
}
|
|
387
|
+
);
|
|
388
|
+
glowR.value = withRepeat(
|
|
389
|
+
withSequence(withTiming(20, { duration: d.medium * 0.2 }), withTiming(16, { duration: d.medium * 0.8 })),
|
|
390
|
+
loop ? -1 : 1
|
|
391
|
+
);
|
|
392
|
+
glowOp.value = withRepeat(
|
|
393
|
+
withSequence(withTiming(0.5, { duration: d.medium * 0.2 }), withTiming(0, { duration: d.medium * 0.8 })),
|
|
394
|
+
loop ? -1 : 1
|
|
395
|
+
);
|
|
396
|
+
} else {
|
|
397
|
+
cancelAnimation(scaleVal);
|
|
398
|
+
cancelAnimation(glowR);
|
|
399
|
+
cancelAnimation(glowOp);
|
|
400
|
+
}
|
|
401
|
+
}, [autoPlay, loop, speed, onAnimationEnd]);
|
|
402
|
+
const heartProps = useAnimatedProps(() => ({ transform: [{ scale: scaleVal.value }], originX: 24, originY: 24 }));
|
|
403
|
+
const glowProps = useAnimatedProps(() => ({ r: glowR.value, opacity: glowOp.value }));
|
|
404
|
+
return /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: HeartRatePaths.viewBox, style }, /* @__PURE__ */ React6.createElement(AnimatedCircle2, { animatedProps: glowProps, cx: "24", cy: "24", fill: s.secondaryColor }), /* @__PURE__ */ React6.createElement(AnimatedPath8, { animatedProps: heartProps, d: HeartRatePaths.heart, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: s.fill, opacity: s.opacity }));
|
|
405
|
+
};
|
|
406
|
+
var AnimatedPath9 = Animated4.createAnimatedComponent(Path);
|
|
407
|
+
var Lungs = ({
|
|
408
|
+
size = 48,
|
|
409
|
+
autoPlay = true,
|
|
410
|
+
loop = true,
|
|
411
|
+
speed = "normal",
|
|
412
|
+
style,
|
|
413
|
+
...colorProps
|
|
414
|
+
}) => {
|
|
415
|
+
const scaleL = useSharedValue(1);
|
|
416
|
+
const scaleR = useSharedValue(1);
|
|
417
|
+
const d = getAnimDuration(speed);
|
|
418
|
+
const s = resolveStyle(colorProps, LungsPaths);
|
|
419
|
+
useEffect(() => {
|
|
420
|
+
if (autoPlay) {
|
|
421
|
+
scaleL.value = withRepeat(withTiming(1.08, { duration: d.long, easing: Easing.inOut(Easing.ease) }), loop ? -1 : 1, true);
|
|
422
|
+
scaleR.value = withRepeat(withTiming(1.08, { duration: d.long, easing: Easing.inOut(Easing.ease) }), loop ? -1 : 1, true);
|
|
423
|
+
} else {
|
|
424
|
+
cancelAnimation(scaleL);
|
|
425
|
+
cancelAnimation(scaleR);
|
|
426
|
+
}
|
|
427
|
+
}, [autoPlay, loop, speed]);
|
|
428
|
+
const leftProps = useAnimatedProps(() => ({ transform: [{ scaleX: scaleL.value }, { scaleY: scaleL.value }], originX: 16, originY: 26 }));
|
|
429
|
+
const rightProps = useAnimatedProps(() => ({ transform: [{ scaleX: scaleR.value }, { scaleY: scaleR.value }], originX: 32, originY: 26 }));
|
|
430
|
+
return /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: LungsPaths.viewBox, style }, /* @__PURE__ */ React6.createElement(AnimatedPath9, { animatedProps: leftProps, d: LungsPaths.leftLobe, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: s.secondaryColor, strokeLinecap: "round", opacity: s.opacity }), /* @__PURE__ */ React6.createElement(AnimatedPath9, { animatedProps: rightProps, d: LungsPaths.rightLobe, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: s.secondaryColor, strokeLinecap: "round", opacity: s.opacity }), /* @__PURE__ */ React6.createElement(Path, { d: LungsPaths.trunk, stroke: s.stroke, strokeWidth: s.strokeWidth, strokeLinecap: "round", fill: "none", opacity: s.opacity }));
|
|
431
|
+
};
|
|
432
|
+
var AnimatedPath10 = Animated4.createAnimatedComponent(Path);
|
|
433
|
+
var Pill = ({
|
|
434
|
+
size = 48,
|
|
435
|
+
autoPlay = true,
|
|
436
|
+
loop = true,
|
|
437
|
+
speed = "normal",
|
|
438
|
+
style,
|
|
439
|
+
...colorProps
|
|
440
|
+
}) => {
|
|
441
|
+
const translateY = useSharedValue(0);
|
|
442
|
+
const shineOp = useSharedValue(0);
|
|
443
|
+
const d = getAnimDuration(speed);
|
|
444
|
+
const s = resolveStyle(colorProps, PillPaths);
|
|
445
|
+
useEffect(() => {
|
|
446
|
+
if (autoPlay) {
|
|
447
|
+
translateY.value = withRepeat(withTiming(-5, { duration: d.long, easing: Easing.inOut(Easing.ease) }), loop ? -1 : 1, true);
|
|
448
|
+
shineOp.value = withRepeat(withTiming(0.8, { duration: d.long, easing: Easing.inOut(Easing.ease) }), loop ? -1 : 1, true);
|
|
449
|
+
} else {
|
|
450
|
+
cancelAnimation(translateY);
|
|
451
|
+
cancelAnimation(shineOp);
|
|
452
|
+
}
|
|
453
|
+
}, [autoPlay, loop, speed]);
|
|
454
|
+
const bodyStyle = useAnimatedStyle(() => ({ transform: [{ translateY: translateY.value }] }));
|
|
455
|
+
const shineProps = useAnimatedProps(() => ({ opacity: shineOp.value }));
|
|
456
|
+
return /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: PillPaths.viewBox, style }, /* @__PURE__ */ React6.createElement(Animated4.View, { style: [{ position: "absolute" }, bodyStyle] }, /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: PillPaths.viewBox, style: { position: "absolute" } }, /* @__PURE__ */ React6.createElement(Path, { d: PillPaths.capsule, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: s.secondaryColor, opacity: s.opacity }), /* @__PURE__ */ React6.createElement(Path, { d: PillPaths.divider, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: "none", opacity: s.opacity }))), /* @__PURE__ */ React6.createElement(AnimatedPath10, { animatedProps: shineProps, d: PillPaths.shine, stroke: "white", strokeWidth: 2, fill: "none", strokeLinecap: "round" }));
|
|
457
|
+
};
|
|
458
|
+
var AnimatedPath11 = Animated4.createAnimatedComponent(Path);
|
|
459
|
+
var Thermometer = ({
|
|
460
|
+
size = 48,
|
|
461
|
+
autoPlay = true,
|
|
462
|
+
loop = true,
|
|
463
|
+
speed = "normal",
|
|
464
|
+
style,
|
|
465
|
+
...colorProps
|
|
466
|
+
}) => {
|
|
467
|
+
const mercuryScale = useSharedValue(0.2);
|
|
468
|
+
const tubeRotation = useSharedValue(0);
|
|
469
|
+
const d = getAnimDuration(speed);
|
|
470
|
+
const s = resolveStyle(colorProps, ThermometerPaths);
|
|
471
|
+
useEffect(() => {
|
|
472
|
+
if (autoPlay) {
|
|
473
|
+
mercuryScale.value = withRepeat(withTiming(1, { duration: d.long * 0.7, easing: Easing.inOut(Easing.ease) }), loop ? -1 : 1, true);
|
|
474
|
+
tubeRotation.value = withRepeat(
|
|
475
|
+
withSequence(
|
|
476
|
+
withTiming(0, { duration: d.long * 0.6 }),
|
|
477
|
+
withTiming(3, { duration: d.long * 0.1 }),
|
|
478
|
+
withTiming(-3, { duration: d.long * 0.1 }),
|
|
479
|
+
withTiming(2, { duration: d.long * 0.1 }),
|
|
480
|
+
withTiming(0, { duration: d.long * 0.1 })
|
|
481
|
+
),
|
|
482
|
+
loop ? -1 : 1
|
|
483
|
+
);
|
|
484
|
+
} else {
|
|
485
|
+
cancelAnimation(mercuryScale);
|
|
486
|
+
cancelAnimation(tubeRotation);
|
|
487
|
+
}
|
|
488
|
+
}, [autoPlay, loop, speed]);
|
|
489
|
+
const mercuryProps = useAnimatedProps(() => ({ transform: [{ scaleY: mercuryScale.value }], originY: 34 }));
|
|
490
|
+
const tubeStyle = useAnimatedStyle(() => ({ transform: [{ rotate: `${tubeRotation.value}deg` }] }));
|
|
491
|
+
return /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: ThermometerPaths.viewBox, style }, /* @__PURE__ */ React6.createElement(Animated4.View, { style: [{ position: "absolute" }, tubeStyle] }, /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: ThermometerPaths.viewBox, style: { position: "absolute" } }, /* @__PURE__ */ React6.createElement(Path, { d: ThermometerPaths.tube, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: s.secondaryColor, opacity: s.opacity }))), /* @__PURE__ */ React6.createElement(AnimatedPath11, { animatedProps: mercuryProps, d: ThermometerPaths.mercury, fill: s.fill, opacity: s.opacity }), /* @__PURE__ */ React6.createElement(Circle, { cx: "24", cy: "40", r: 5, fill: s.fill, opacity: s.opacity }));
|
|
492
|
+
};
|
|
493
|
+
var AnimatedPath12 = Animated4.createAnimatedComponent(Path);
|
|
494
|
+
var DNA = ({
|
|
495
|
+
size = 48,
|
|
496
|
+
autoPlay = true,
|
|
497
|
+
loop = true,
|
|
498
|
+
speed = "normal",
|
|
499
|
+
style,
|
|
500
|
+
...colorProps
|
|
501
|
+
}) => {
|
|
502
|
+
const translateY = useSharedValue(0);
|
|
503
|
+
const d = getAnimDuration(speed);
|
|
504
|
+
const s = resolveStyle(colorProps, DNAPaths);
|
|
505
|
+
useEffect(() => {
|
|
506
|
+
if (autoPlay) {
|
|
507
|
+
translateY.value = withRepeat(withTiming(-16, { duration: d.medium, easing: Easing.linear }), loop ? -1 : 1, true);
|
|
508
|
+
} else {
|
|
509
|
+
cancelAnimation(translateY);
|
|
510
|
+
}
|
|
511
|
+
}, [autoPlay, loop, speed]);
|
|
512
|
+
const animProps = useAnimatedProps(() => ({ transform: [{ translateY: translateY.value }] }));
|
|
513
|
+
return /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: DNAPaths.viewBox, style }, /* @__PURE__ */ React6.createElement(AnimatedPath12, { animatedProps: animProps, d: DNAPaths.strand1, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: "none", strokeLinecap: "round", opacity: s.opacity }), /* @__PURE__ */ React6.createElement(AnimatedPath12, { animatedProps: animProps, d: DNAPaths.strand2, stroke: s.secondaryColor, strokeWidth: s.strokeWidth, fill: "none", strokeLinecap: "round", opacity: s.opacity }), /* @__PURE__ */ React6.createElement(AnimatedPath12, { animatedProps: animProps, d: `${DNAPaths.rung1} ${DNAPaths.rung2} ${DNAPaths.rung3}`, stroke: s.stroke, strokeWidth: 1.5, fill: "none", strokeLinecap: "round", opacity: s.opacity * 0.6 }));
|
|
514
|
+
};
|
|
515
|
+
var AnimatedPath13 = Animated4.createAnimatedComponent(Path);
|
|
516
|
+
var Syringe = ({
|
|
517
|
+
size = 48,
|
|
518
|
+
autoPlay = true,
|
|
519
|
+
loop = true,
|
|
520
|
+
speed = "normal",
|
|
521
|
+
style,
|
|
522
|
+
...colorProps
|
|
523
|
+
}) => {
|
|
524
|
+
const plungerX = useSharedValue(0);
|
|
525
|
+
const liquidScale = useSharedValue(1);
|
|
526
|
+
const dropOp = useSharedValue(0);
|
|
527
|
+
const dropY = useSharedValue(0);
|
|
528
|
+
const d = getAnimDuration(speed);
|
|
529
|
+
const s = resolveStyle(colorProps, SyringePaths);
|
|
530
|
+
useEffect(() => {
|
|
531
|
+
if (autoPlay) {
|
|
532
|
+
plungerX.value = withRepeat(withSequence(withTiming(8, { duration: d.long * 0.5 }), withTiming(0, { duration: d.long * 0.5 })), loop ? -1 : 1);
|
|
533
|
+
liquidScale.value = withRepeat(withSequence(withTiming(0.3, { duration: d.long * 0.5 }), withTiming(1, { duration: d.long * 0.5 })), loop ? -1 : 1);
|
|
534
|
+
dropOp.value = withRepeat(withSequence(withTiming(0, { duration: d.long * 0.49 }), withTiming(1, { duration: d.long * 0.01 }), withTiming(0, { duration: d.long * 0.5 })), loop ? -1 : 1);
|
|
535
|
+
dropY.value = withRepeat(withSequence(withTiming(0, { duration: d.long * 0.5 }), withTiming(6, { duration: d.long * 0.5 })), loop ? -1 : 1);
|
|
536
|
+
} else {
|
|
537
|
+
cancelAnimation(plungerX);
|
|
538
|
+
cancelAnimation(liquidScale);
|
|
539
|
+
cancelAnimation(dropOp);
|
|
540
|
+
cancelAnimation(dropY);
|
|
541
|
+
}
|
|
542
|
+
}, [autoPlay, loop, speed]);
|
|
543
|
+
const plungerStyle = useAnimatedStyle(() => ({ transform: [{ translateX: plungerX.value }] }));
|
|
544
|
+
const liquidProps = useAnimatedProps(() => ({ transform: [{ scaleX: liquidScale.value }], originX: 14 }));
|
|
545
|
+
const dropProps = useAnimatedProps(() => ({ opacity: dropOp.value, transform: [{ translateY: dropY.value }] }));
|
|
546
|
+
return /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: SyringePaths.viewBox, style }, /* @__PURE__ */ React6.createElement(Path, { d: SyringePaths.barrel, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: s.secondaryColor, opacity: s.opacity }), /* @__PURE__ */ React6.createElement(AnimatedPath13, { animatedProps: liquidProps, d: SyringePaths.liquid, fill: s.fill, opacity: s.opacity * 0.7 }), /* @__PURE__ */ React6.createElement(Animated4.View, { style: [{ position: "absolute" }, plungerStyle] }, /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: SyringePaths.viewBox, style: { position: "absolute" } }, /* @__PURE__ */ React6.createElement(Path, { d: SyringePaths.plunger, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: "none", strokeLinecap: "round", opacity: s.opacity }))), /* @__PURE__ */ React6.createElement(Path, { d: SyringePaths.needle, stroke: s.stroke, strokeWidth: s.strokeWidth, strokeLinecap: "round", fill: "none", opacity: s.opacity }), /* @__PURE__ */ React6.createElement(AnimatedPath13, { animatedProps: dropProps, d: SyringePaths.drop, fill: s.fill }));
|
|
547
|
+
};
|
|
548
|
+
var AnimatedCircle3 = Animated4.createAnimatedComponent(Circle);
|
|
549
|
+
var Brain = ({
|
|
550
|
+
size = 48,
|
|
551
|
+
autoPlay = true,
|
|
552
|
+
loop = true,
|
|
553
|
+
speed = "normal",
|
|
554
|
+
style,
|
|
555
|
+
...colorProps
|
|
556
|
+
}) => {
|
|
557
|
+
const n1r = useSharedValue(3);
|
|
558
|
+
const n1op = useSharedValue(0.2);
|
|
559
|
+
const n2r = useSharedValue(3);
|
|
560
|
+
const n2op = useSharedValue(0.2);
|
|
561
|
+
const n3r = useSharedValue(3);
|
|
562
|
+
const n3op = useSharedValue(0.2);
|
|
563
|
+
const d = getAnimDuration(speed);
|
|
564
|
+
const s = resolveStyle(colorProps, BrainPaths);
|
|
565
|
+
useEffect(() => {
|
|
566
|
+
if (autoPlay) {
|
|
567
|
+
const fire = (r, op, delay) => {
|
|
568
|
+
r.value = withDelay(delay, withRepeat(withTiming(4.5, { duration: d.long, easing: Easing.inOut(Easing.ease) }), loop ? -1 : 1, true));
|
|
569
|
+
op.value = withDelay(delay, withRepeat(withTiming(1, { duration: d.long, easing: Easing.inOut(Easing.ease) }), loop ? -1 : 1, true));
|
|
570
|
+
};
|
|
571
|
+
fire(n1r, n1op, 0);
|
|
572
|
+
fire(n2r, n2op, d.stagger);
|
|
573
|
+
fire(n3r, n3op, d.stagger * 2);
|
|
574
|
+
} else {
|
|
575
|
+
[n1r, n2r, n3r, n1op, n2op, n3op].forEach((sv) => cancelAnimation(sv));
|
|
576
|
+
}
|
|
577
|
+
return () => {
|
|
578
|
+
[n1r, n2r, n3r, n1op, n2op, n3op].forEach((sv) => cancelAnimation(sv));
|
|
579
|
+
};
|
|
580
|
+
}, [autoPlay, loop, speed]);
|
|
581
|
+
const ap1 = useAnimatedProps(() => ({ r: n1r.value, opacity: n1op.value }));
|
|
582
|
+
const ap2 = useAnimatedProps(() => ({ r: n2r.value, opacity: n2op.value }));
|
|
583
|
+
const ap3 = useAnimatedProps(() => ({ r: n3r.value, opacity: n3op.value }));
|
|
584
|
+
return /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: BrainPaths.viewBox, style }, /* @__PURE__ */ React6.createElement(Path, { d: BrainPaths.left, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: s.secondaryColor, strokeLinecap: "round", opacity: s.opacity }), /* @__PURE__ */ React6.createElement(Path, { d: BrainPaths.right, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: s.secondaryColor, strokeLinecap: "round", opacity: s.opacity }), /* @__PURE__ */ React6.createElement(Path, { d: `${BrainPaths.synapse1} ${BrainPaths.synapse2}`, stroke: s.stroke, strokeWidth: 1, fill: "none", opacity: s.opacity * 0.5 }), /* @__PURE__ */ React6.createElement(AnimatedCircle3, { animatedProps: ap1, cx: "16", cy: "20", fill: s.fill }), /* @__PURE__ */ React6.createElement(AnimatedCircle3, { animatedProps: ap2, cx: "24", cy: "16", fill: s.fill }), /* @__PURE__ */ React6.createElement(AnimatedCircle3, { animatedProps: ap3, cx: "32", cy: "20", fill: s.fill }));
|
|
585
|
+
};
|
|
586
|
+
var AnimatedPath14 = Animated4.createAnimatedComponent(Path);
|
|
587
|
+
var AnimatedCircle4 = Animated4.createAnimatedComponent(Circle);
|
|
588
|
+
var BloodDrop = ({
|
|
589
|
+
size = 48,
|
|
590
|
+
autoPlay = true,
|
|
591
|
+
loop = true,
|
|
592
|
+
speed = "normal",
|
|
593
|
+
style,
|
|
594
|
+
...colorProps
|
|
595
|
+
}) => {
|
|
596
|
+
const scaleY = useSharedValue(1);
|
|
597
|
+
const r1 = useSharedValue(6);
|
|
598
|
+
const op1 = useSharedValue(0.6);
|
|
599
|
+
const r2 = useSharedValue(6);
|
|
600
|
+
const op2 = useSharedValue(0.6);
|
|
601
|
+
const d = getAnimDuration(speed);
|
|
602
|
+
const s = resolveStyle(colorProps, BloodDropPaths);
|
|
603
|
+
useEffect(() => {
|
|
604
|
+
if (autoPlay) {
|
|
605
|
+
scaleY.value = withRepeat(withTiming(0.85, { duration: d.long, easing: Easing.inOut(Easing.ease) }), loop ? -1 : 1, true);
|
|
606
|
+
r1.value = withRepeat(withTiming(10, { duration: d.long, easing: Easing.out(Easing.ease) }), loop ? -1 : 1);
|
|
607
|
+
op1.value = withRepeat(withTiming(0, { duration: d.long }), loop ? -1 : 1);
|
|
608
|
+
r2.value = withDelay(d.stagger, withRepeat(withTiming(10, { duration: d.long, easing: Easing.out(Easing.ease) }), loop ? -1 : 1));
|
|
609
|
+
op2.value = withDelay(d.stagger, withRepeat(withTiming(0, { duration: d.long }), loop ? -1 : 1));
|
|
610
|
+
} else {
|
|
611
|
+
[scaleY, r1, op1, r2, op2].forEach((sv) => cancelAnimation(sv));
|
|
612
|
+
}
|
|
613
|
+
}, [autoPlay, loop, speed]);
|
|
614
|
+
const dropProps = useAnimatedProps(() => ({ transform: [{ scaleY: scaleY.value }], originY: 28 }));
|
|
615
|
+
const rip1Props = useAnimatedProps(() => ({ r: r1.value, opacity: op1.value }));
|
|
616
|
+
const rip2Props = useAnimatedProps(() => ({ r: r2.value, opacity: op2.value }));
|
|
617
|
+
return /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: BloodDropPaths.viewBox, style }, /* @__PURE__ */ React6.createElement(AnimatedPath14, { animatedProps: dropProps, d: BloodDropPaths.drop, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: s.fill, opacity: s.opacity }), /* @__PURE__ */ React6.createElement(AnimatedCircle4, { animatedProps: rip1Props, cx: "24", cy: "42", stroke: s.stroke, strokeWidth: 1.5, fill: "none" }), /* @__PURE__ */ React6.createElement(AnimatedCircle4, { animatedProps: rip2Props, cx: "24", cy: "42", stroke: s.stroke, strokeWidth: 1.5, fill: "none" }));
|
|
618
|
+
};
|
|
619
|
+
var AnimatedPath15 = Animated4.createAnimatedComponent(Path);
|
|
620
|
+
var Steps = ({
|
|
621
|
+
size = 48,
|
|
622
|
+
autoPlay = true,
|
|
623
|
+
loop = true,
|
|
624
|
+
speed = "normal",
|
|
625
|
+
style,
|
|
626
|
+
...colorProps
|
|
627
|
+
}) => {
|
|
628
|
+
const op1 = useSharedValue(0.3);
|
|
629
|
+
const op2 = useSharedValue(1);
|
|
630
|
+
const d = getAnimDuration(speed);
|
|
631
|
+
const s = resolveStyle(colorProps, StepsPaths);
|
|
632
|
+
useEffect(() => {
|
|
633
|
+
if (autoPlay) {
|
|
634
|
+
op1.value = withRepeat(withTiming(1, { duration: d.medium, easing: Easing.ease }), loop ? -1 : 1, true);
|
|
635
|
+
op2.value = withRepeat(withTiming(0.3, { duration: d.medium, easing: Easing.ease }), loop ? -1 : 1, true);
|
|
636
|
+
} else {
|
|
637
|
+
cancelAnimation(op1);
|
|
638
|
+
cancelAnimation(op2);
|
|
639
|
+
}
|
|
640
|
+
}, [autoPlay, loop, speed]);
|
|
641
|
+
const f1Props = useAnimatedProps(() => ({ opacity: op1.value }));
|
|
642
|
+
const f2Props = useAnimatedProps(() => ({ opacity: op2.value }));
|
|
643
|
+
return /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: StepsPaths.viewBox, style }, /* @__PURE__ */ React6.createElement(AnimatedPath15, { animatedProps: f1Props, d: `${StepsPaths.foot1} ${StepsPaths.toe1a} ${StepsPaths.toe1b}`, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: s.fill, strokeLinecap: "round" }), /* @__PURE__ */ React6.createElement(AnimatedPath15, { animatedProps: f2Props, d: `${StepsPaths.foot2} ${StepsPaths.toe2a} ${StepsPaths.toe2b}`, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: s.fill, strokeLinecap: "round" }));
|
|
644
|
+
};
|
|
645
|
+
var AnimatedPath16 = Animated4.createAnimatedComponent(Path);
|
|
646
|
+
var Sleep = ({
|
|
647
|
+
size = 48,
|
|
648
|
+
autoPlay = true,
|
|
649
|
+
loop = true,
|
|
650
|
+
speed = "normal",
|
|
651
|
+
style,
|
|
652
|
+
...colorProps
|
|
653
|
+
}) => {
|
|
654
|
+
const moonScale = useSharedValue(1);
|
|
655
|
+
const star1Op = useSharedValue(0.3);
|
|
656
|
+
const star2Op = useSharedValue(0.3);
|
|
657
|
+
const z1Y = useSharedValue(0);
|
|
658
|
+
const z1Op = useSharedValue(0);
|
|
659
|
+
const z2Y = useSharedValue(0);
|
|
660
|
+
const z2Op = useSharedValue(0);
|
|
661
|
+
const d = getAnimDuration(speed);
|
|
662
|
+
const s = resolveStyle(colorProps, SleepPaths);
|
|
663
|
+
useEffect(() => {
|
|
664
|
+
if (autoPlay) {
|
|
665
|
+
moonScale.value = withRepeat(withTiming(1.05, { duration: d.long, easing: Easing.inOut(Easing.ease) }), loop ? -1 : 1, true);
|
|
666
|
+
star1Op.value = withDelay(d.stagger, withRepeat(withTiming(1, { duration: d.long }), loop ? -1 : 1, true));
|
|
667
|
+
star2Op.value = withDelay(d.stagger * 2, withRepeat(withTiming(1, { duration: d.long }), loop ? -1 : 1, true));
|
|
668
|
+
z1Op.value = withRepeat(withTiming(1, { duration: d.long * 0.5 }), loop ? -1 : 1, true);
|
|
669
|
+
z1Y.value = withRepeat(withTiming(-12, { duration: d.long }), loop ? -1 : 1);
|
|
670
|
+
z2Op.value = withDelay(d.stagger, withRepeat(withTiming(1, { duration: d.long * 0.5 }), loop ? -1 : 1, true));
|
|
671
|
+
z2Y.value = withDelay(d.stagger, withRepeat(withTiming(-12, { duration: d.long }), loop ? -1 : 1));
|
|
672
|
+
} else {
|
|
673
|
+
[moonScale, star1Op, star2Op, z1Y, z1Op, z2Y, z2Op].forEach((sv) => cancelAnimation(sv));
|
|
674
|
+
}
|
|
675
|
+
}, [autoPlay, loop, speed]);
|
|
676
|
+
const moonStyle = useAnimatedStyle(() => ({ transform: [{ scale: moonScale.value }] }));
|
|
677
|
+
const star1Props = useAnimatedProps(() => ({ opacity: star1Op.value }));
|
|
678
|
+
const star2Props = useAnimatedProps(() => ({ opacity: star2Op.value }));
|
|
679
|
+
const z1Props = useAnimatedProps(() => ({ opacity: z1Op.value, transform: [{ translateY: z1Y.value }] }));
|
|
680
|
+
const z2Props = useAnimatedProps(() => ({ opacity: z2Op.value, transform: [{ translateY: z2Y.value }] }));
|
|
681
|
+
return /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: SleepPaths.viewBox, style }, /* @__PURE__ */ React6.createElement(Animated4.View, { style: [{ position: "absolute" }, moonStyle] }, /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: SleepPaths.viewBox, style: { position: "absolute" } }, /* @__PURE__ */ React6.createElement(Path, { d: SleepPaths.moon, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: s.secondaryColor, opacity: s.opacity }))), /* @__PURE__ */ React6.createElement(AnimatedPath16, { animatedProps: star1Props, d: SleepPaths.star1, fill: s.fill, opacity: s.opacity }), /* @__PURE__ */ React6.createElement(AnimatedPath16, { animatedProps: star2Props, d: SleepPaths.star2, fill: s.fill, opacity: s.opacity }), /* @__PURE__ */ React6.createElement(AnimatedPath16, { animatedProps: z1Props, d: SleepPaths.z1, stroke: s.stroke, strokeWidth: 2, fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ React6.createElement(AnimatedPath16, { animatedProps: z2Props, d: SleepPaths.z2, stroke: s.stroke, strokeWidth: 1.5, fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }));
|
|
682
|
+
};
|
|
683
|
+
var AnimatedCircle5 = Animated4.createAnimatedComponent(Circle);
|
|
684
|
+
var Oxygen = ({
|
|
685
|
+
size = 48,
|
|
686
|
+
autoPlay = true,
|
|
687
|
+
loop = true,
|
|
688
|
+
speed = "normal",
|
|
689
|
+
style,
|
|
690
|
+
...colorProps
|
|
691
|
+
}) => {
|
|
692
|
+
const rotation = useSharedValue(0);
|
|
693
|
+
const d = getAnimDuration(speed);
|
|
694
|
+
const s = resolveStyle(colorProps, OxygenPaths);
|
|
695
|
+
useEffect(() => {
|
|
696
|
+
if (autoPlay) {
|
|
697
|
+
rotation.value = withRepeat(withTiming(360, { duration: d.long, easing: Easing.linear }), loop ? -1 : 1);
|
|
698
|
+
} else {
|
|
699
|
+
cancelAnimation(rotation);
|
|
700
|
+
}
|
|
701
|
+
return () => {
|
|
702
|
+
cancelAnimation(rotation);
|
|
703
|
+
};
|
|
704
|
+
}, [autoPlay, loop, speed]);
|
|
705
|
+
const electronProps = useAnimatedProps(() => ({
|
|
706
|
+
transform: [{ rotate: `${rotation.value}deg` }],
|
|
707
|
+
originX: 24,
|
|
708
|
+
originY: 24
|
|
709
|
+
}));
|
|
710
|
+
return /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: OxygenPaths.viewBox, style }, /* @__PURE__ */ React6.createElement(Path, { d: OxygenPaths.orbit, stroke: s.secondaryColor, strokeWidth: 1, fill: "none", strokeDasharray: "3 3", opacity: s.opacity }), /* @__PURE__ */ React6.createElement(Circle, { cx: "18", cy: "20", r: 4, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: s.secondaryColor, opacity: s.opacity }), /* @__PURE__ */ React6.createElement(Circle, { cx: "26", cy: "20", r: 4, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: s.secondaryColor, opacity: s.opacity }), /* @__PURE__ */ React6.createElement(Path, { d: OxygenPaths.bond, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: "none", opacity: s.opacity }), /* @__PURE__ */ React6.createElement(AnimatedCircle5, { animatedProps: electronProps, cx: "40", cy: "24", r: 2.5, fill: s.fill, opacity: s.opacity }));
|
|
711
|
+
};
|
|
712
|
+
var AnimatedPath17 = Animated4.createAnimatedComponent(Path);
|
|
713
|
+
var Medkit = ({
|
|
714
|
+
size = 48,
|
|
715
|
+
autoPlay = true,
|
|
716
|
+
loop = true,
|
|
717
|
+
speed = "normal",
|
|
718
|
+
style,
|
|
719
|
+
...colorProps
|
|
720
|
+
}) => {
|
|
721
|
+
const bodyY = useSharedValue(0);
|
|
722
|
+
const crossScale = useSharedValue(1);
|
|
723
|
+
const d = getAnimDuration(speed);
|
|
724
|
+
const s = resolveStyle(colorProps, MedkitPaths);
|
|
725
|
+
useEffect(() => {
|
|
726
|
+
if (autoPlay) {
|
|
727
|
+
bodyY.value = withRepeat(withTiming(-5, { duration: d.long, easing: Easing.inOut(Easing.ease) }), loop ? -1 : 1, true);
|
|
728
|
+
crossScale.value = withRepeat(withTiming(1.2, { duration: d.long, easing: Easing.inOut(Easing.ease) }), loop ? -1 : 1, true);
|
|
729
|
+
} else {
|
|
730
|
+
cancelAnimation(bodyY);
|
|
731
|
+
cancelAnimation(crossScale);
|
|
732
|
+
}
|
|
733
|
+
}, [autoPlay, loop, speed]);
|
|
734
|
+
const bodyStyle = useAnimatedStyle(() => ({ transform: [{ translateY: bodyY.value }] }));
|
|
735
|
+
const crossProps = useAnimatedProps(() => ({ transform: [{ scale: crossScale.value }], originX: 24, originY: 27 }));
|
|
736
|
+
return /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: MedkitPaths.viewBox, style }, /* @__PURE__ */ React6.createElement(Animated4.View, { style: [{ position: "absolute" }, bodyStyle] }, /* @__PURE__ */ React6.createElement(Svg, { width: size, height: size, viewBox: MedkitPaths.viewBox, style: { position: "absolute" } }, /* @__PURE__ */ React6.createElement(Path, { d: MedkitPaths.box, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: s.secondaryColor, opacity: s.opacity }), /* @__PURE__ */ React6.createElement(Path, { d: MedkitPaths.handle, stroke: s.stroke, strokeWidth: s.strokeWidth, fill: "none", strokeLinecap: "round", opacity: s.opacity }))), /* @__PURE__ */ React6.createElement(AnimatedPath17, { animatedProps: crossProps, d: `${MedkitPaths.crossV} ${MedkitPaths.crossH}`, stroke: s.fill, strokeWidth: 3, strokeLinecap: "round", fill: "none", opacity: s.opacity }));
|
|
737
|
+
};
|
|
738
|
+
|
|
739
|
+
export { Bell, BloodDrop, Brain, Check, DNA, ECG, Heart, HeartRate, Loader, Lungs, Medkit, Oxygen, Pill, Pulse, Sleep, Star, Steps, Syringe, Thermometer, Upload, Wifi, getAnimDuration, resolveStyle };
|