@tamagui/animations-reanimated 3.0.13 → 3.0.15

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.
@@ -1 +1 @@
1
- {"version":3,"file":"createAnimations.js","names":[],"sources":["esm/createAnimations.js"],"sourcesContent":["import {\n easingToBezier,\n forAnimationState,\n getTransitionForKey,\n hasTransition,\n resolveTransition\n} from \"@tamagui/animation-helpers\";\nimport {\n getSplitStyles,\n hooks,\n isWeb,\n Text,\n useComposedRefs,\n useEvent,\n useIsomorphicLayoutEffect,\n View,\n createRefComponent\n} from \"@tamagui/core\";\nimport { useThemeWithState } from \"@tamagui/web/internal-runtime\";\nimport { TextInputHost } from \"./textInputHost\";\nimport { ResetPresence, usePresence } from \"@tamagui/use-presence\";\nimport normalizeColor from \"@react-native/normalize-colors\";\nimport React, { useMemo, useRef } from \"react\";\nimport Animated_, {\n cancelAnimation,\n Easing,\n runOnJS,\n runOnUI,\n useAnimatedReaction,\n useAnimatedStyle,\n useDerivedValue,\n useSharedValue,\n withDelay,\n withSpring,\n withTiming\n} from \"react-native-reanimated\";\nimport { jsx } from \"react/jsx-runtime\";\nconst NON_ANIMATABLE_VALUE = /^(auto|min-content|max-content|fit-content|stretch|inherit|initial|unset)\\b|^calc\\(/;\nconst getDefaultExport = (module) => {\n const mod = module;\n if (mod.__esModule || mod[Symbol.toStringTag] === \"Module\") {\n return mod.default || mod;\n }\n return mod;\n};\nconst Animated = getDefaultExport(Animated_);\nconst silenceAnimatedComponentDevCheck = (style) => {\n if (process.env.NODE_ENV !== \"development\" || isWeb || !style || typeof style !== \"object\") {\n return;\n }\n Object.defineProperty(style, \"_requiresAnimatedComponent\", {\n configurable: true,\n enumerable: false,\n value: true\n });\n};\nconst resolveDynamicValue = (value, isDark) => {\n if (value !== null && typeof value === \"object\" && \"dynamic\" in value && typeof value.dynamic === \"object\") {\n const dynamic = value.dynamic;\n return isDark ? dynamic.dark : dynamic.light;\n }\n return value;\n};\nconst updateMapperState = isWeb ? (state, emitted, ownedStatics) => {\n state.value.emitted = emitted;\n state.value.ownedStatics = ownedStatics;\n} : (state, emitted, ownedStatics) => {\n \"worklet\";\n if (!globalThis._WORKLET) return;\n state.modify((current) => {\n current.emitted = emitted;\n current.ownedStatics = ownedStatics;\n return current;\n }, false);\n};\nconst cloneAnimationValue = (value) => {\n if (Array.isArray(value)) {\n return value.map(cloneAnimationValue);\n }\n if (value && typeof value === \"object\") {\n const next = {};\n for (const key in value) {\n next[key] = cloneAnimationValue(value[key]);\n }\n return next;\n }\n return value;\n};\nconst cloneStyleRecord = (style) => {\n const next = {};\n for (const key in style) {\n next[key] = cloneAnimationValue(style[key]);\n }\n return next;\n};\nconst cloneTransitionConfig = (config) => {\n return cloneAnimationValue(config);\n};\nconst getAnimatedTransforms = (value) => {\n if (!Array.isArray(value)) return [];\n return value.filter(\n (item) => item !== null && typeof item === \"object\" && !Array.isArray(item)\n );\n};\nconst getRemovedAnimatedKeys = (current, previous) => {\n const removedKeys = {};\n for (const key of previous) {\n if (!current.has(key)) removedKeys[key] = true;\n }\n return removedKeys;\n};\nconst getImplicitDefault = (key, targetValue) => {\n \"worklet\";\n const value = key === \"opacity\" || key === \"scale\" || key === \"scaleX\" || key === \"scaleY\" ? 1 : 0;\n if (typeof targetValue !== \"string\") return value;\n let suffixIndex = 0;\n while (suffixIndex < targetValue.length) {\n const character = targetValue[suffixIndex];\n const code = character.charCodeAt(0);\n if (code >= 48 && code <= 57 || character === \".\" || character === \"-\" || character === \"+\") {\n suffixIndex++;\n } else {\n break;\n }\n }\n return suffixIndex > 0 ? `${value}${targetValue.slice(suffixIndex)}` : value;\n};\nconst getLeadingRatio = (metrics) => {\n const ratio = metrics?.lineHeight;\n return typeof ratio === \"number\" && Number.isFinite(ratio) && ratio >= 0 ? ratio : void 0;\n};\nconst derivesLeadingProduct = (style, ratio, inheritsFontSize, resolved) => ratio !== void 0 && (inheritsFontSize || typeof style.lineHeight === \"number\" && typeof style.fontSize === \"number\" && (!!getTransitionForKey(resolved, \"fontSize\") || !!getTransitionForKey(resolved, \"lineHeight\")));\nconst COLOR_STYLE_KEYS = {\n backgroundColor: true,\n borderColor: true,\n borderLeftColor: true,\n borderRightColor: true,\n borderTopColor: true,\n borderBottomColor: true,\n color: true\n};\nconst toReanimatedColor = (value) => {\n \"worklet\";\n if (typeof value === \"number\") {\n const color = value >>> 0;\n const alpha = (color >>> 24 & 255) / 255;\n const red = color >>> 16 & 255;\n const green = color >>> 8 & 255;\n const blue = color & 255;\n return `rgba(${red}, ${green}, ${blue}, ${alpha})`;\n }\n if (typeof value !== \"string\") return value;\n const trimmed = value.trim();\n if (trimmed === \"transparent\") return \"rgba(0, 0, 0, 0)\";\n return trimmed;\n};\nconst isReanimatedColorHistory = (value) => {\n \"worklet\";\n const normalized = toReanimatedColor(value);\n return typeof normalized === \"string\" && normalized.startsWith(\"rgba(\");\n};\nconst normalizeAnimationColor = (value) => {\n if (typeof value === \"number\") {\n return toReanimatedColor(value);\n }\n if (typeof value !== \"string\") return;\n const color = normalizeColor(value);\n if (color == null) return;\n const red = Math.round((color & 4278190080) >>> 24);\n const green = Math.round((color & 16711680) >>> 16);\n const blue = Math.round((color & 65280) >>> 8);\n const alpha = (color & 255) / 255;\n return `rgba(${red}, ${green}, ${blue}, ${alpha})`;\n};\nconst buildSnapshot = (animated, statics, transforms, previousKeys, lastPainted, derivesLeading = false) => {\n const snapshotAnimated = {};\n const snapshotStatics = cloneStyleRecord(statics);\n for (const key in snapshotStatics) {\n if (!COLOR_STYLE_KEYS[key]) continue;\n const normalized = normalizeAnimationColor(snapshotStatics[key]);\n if (normalized !== void 0) snapshotStatics[key] = normalized;\n }\n for (const key in animated) {\n if (key === \"transform\") continue;\n const value = animated[key];\n if (COLOR_STYLE_KEYS[key]) {\n const normalized = normalizeAnimationColor(value);\n if (normalized === void 0) {\n snapshotStatics[key] = cloneAnimationValue(value);\n continue;\n }\n snapshotAnimated[key] = normalized;\n } else {\n snapshotAnimated[key] = cloneAnimationValue(value);\n }\n }\n const snapshotTransforms = transforms.map(cloneStyleRecord);\n const keys = new Set(Object.keys(snapshotAnimated));\n if (derivesLeading) keys.add(\"lineHeight\");\n for (const transform of snapshotTransforms) {\n const key = Object.keys(transform)[0];\n const value = key ? transform[key] : void 0;\n if (key && (typeof value === \"number\" || typeof value === \"string\")) {\n keys.add(`transform:${key}`);\n }\n }\n const seeds = {};\n const staticTransforms = getAnimatedTransforms(snapshotStatics.transform);\n for (const transform of staticTransforms) {\n const key = Object.keys(transform)[0];\n if (keys.has(`transform:${key}`) && previousKeys.has(`transform:${key}`))\n seeds[`transform:${key}`] = transform[key];\n }\n for (const key of keys) {\n let value = previousKeys.has(key) ? seeds[key] ?? snapshotStatics[key] ?? lastPainted[key] : lastPainted[key];\n if (typeof value !== \"number\" && typeof value !== \"string\") {\n delete seeds[key];\n continue;\n }\n if (typeof value === \"string\" && NON_ANIMATABLE_VALUE.test(value)) {\n delete seeds[key];\n continue;\n }\n if (COLOR_STYLE_KEYS[key]) value = normalizeAnimationColor(value);\n if (value !== void 0) seeds[key] = value;\n }\n const gatedKeys = {};\n for (const key of keys) gatedKeys[key] = true;\n if (derivesLeading) delete gatedKeys.lineHeight;\n const removedKeys = getRemovedAnimatedKeys(keys, previousKeys);\n const painted = {\n ...snapshotStatics,\n ...snapshotAnimated\n };\n painted.transform = snapshotTransforms.length ? snapshotTransforms : staticTransforms;\n for (const transform of staticTransforms) {\n const key = Object.keys(transform)[0];\n if (key) painted[`transform:${key}`] = transform[key];\n }\n for (const transform of snapshotTransforms) {\n const key = Object.keys(transform)[0];\n if (key) painted[`transform:${key}`] = transform[key];\n }\n return {\n value: {\n animated: snapshotAnimated,\n statics: snapshotStatics,\n transforms: snapshotTransforms,\n gatedKeys,\n derivesLeading,\n seeds,\n removedKeys,\n removeTransform: Object.keys(removedKeys).some(\n (key) => key.startsWith(\"transform:\")\n ),\n clearValue: isWeb ? \"\" : null\n },\n painted,\n keys\n };\n};\nconst getGatedKeys = (snapshot) => Object.keys(snapshot.gatedKeys);\nconst createReanimatedConfig = (config) => {\n \"worklet\";\n const next = {};\n const source = config;\n for (const key in source) {\n if (key === \"type\" || key === \"delay\") continue;\n const value = source[key];\n if (value !== void 0) {\n next[key] = value;\n }\n }\n return next;\n};\nconst applyAnimation = (targetValue, config, callback, seedValue, validateStartAsColor = false, publishTo) => {\n \"worklet\";\n const delay = config.delay;\n const reanimatedConfig = createReanimatedConfig(config);\n let animatedValue;\n if (config.type === \"timing\") {\n animatedValue = withTiming(\n targetValue,\n reanimatedConfig,\n callback\n );\n } else {\n animatedValue = withSpring(\n targetValue,\n reanimatedConfig,\n callback\n );\n const innerOnFrame = animatedValue.onFrame;\n animatedValue.onFrame = (animation, now) => {\n \"worklet\";\n return innerOnFrame(\n animation,\n now < animation.lastTimestamp ? animation.lastTimestamp : now\n );\n };\n }\n const isAnimationDescriptor = animatedValue !== null && typeof animatedValue !== \"number\" && typeof animatedValue !== \"string\" && typeof animatedValue !== \"boolean\" && typeof animatedValue !== \"undefined\";\n if (isAnimationDescriptor && delay && delay > 0) {\n animatedValue = withDelay(delay, animatedValue);\n }\n if (isAnimationDescriptor && (seedValue !== void 0 || validateStartAsColor)) {\n const innerOnStart = animatedValue.onStart;\n animatedValue.onStart = (animation, value, timestamp, previousAnimation) => {\n \"worklet\";\n const startValue = validateStartAsColor ? isReanimatedColorHistory(value) ? toReanimatedColor(value) : seedValue ?? targetValue : seedValue;\n innerOnStart(animation, startValue, timestamp, previousAnimation);\n };\n }\n if (isAnimationDescriptor && publishTo) {\n const startedOn = animatedValue.onStart;\n animatedValue.onStart = (animation, value, timestamp, previousAnimation) => {\n \"worklet\";\n startedOn(animation, value, timestamp, previousAnimation);\n publishTo.value = animation.current;\n };\n const framedOn = animatedValue.onFrame;\n animatedValue.onFrame = (animation, now) => {\n \"worklet\";\n const finished = framedOn(animation, now);\n publishTo.value = animation.current;\n return finished;\n };\n }\n return animatedValue;\n};\nconst animateSnapshotValue = (key, implicitKey, targetValue, config, previouslyEmitted, seedValue, gated, currentlyExiting, exitCycleId, currentlyCompletingEnter, enterCycleId, currentlyCompletingUpdate, updateCycleId, markExitKeyDone, markEnterKeyDone, markUpdateKeyDone, validateStartAsColor = false, publishTo) => {\n \"worklet\";\n const cycleGated = gated && (currentlyExiting || currentlyCompletingEnter || currentlyCompletingUpdate);\n if (!previouslyEmitted && seedValue === void 0 && !cycleGated) {\n if (publishTo && typeof targetValue === \"number\") publishTo.value = targetValue;\n return targetValue;\n }\n let callback;\n if (gated && currentlyExiting) {\n callback = (finished) => {\n \"worklet\";\n runOnJS(markExitKeyDone)(key, exitCycleId, finished ?? false);\n };\n } else if (gated && currentlyCompletingEnter) {\n callback = () => {\n \"worklet\";\n runOnJS(markEnterKeyDone)(key, enterCycleId);\n };\n } else if (gated && currentlyCompletingUpdate) {\n callback = (finished) => {\n \"worklet\";\n runOnJS(markUpdateKeyDone)(key, updateCycleId, finished ?? false);\n };\n }\n return applyAnimation(\n targetValue,\n config,\n callback,\n previouslyEmitted ? void 0 : seedValue ?? getImplicitDefault(implicitKey, targetValue),\n validateStartAsColor,\n publishTo\n );\n};\nconst ANIMATABLE_PROPERTIES = {\n // Transform\n transform: true,\n // Opacity\n opacity: true,\n // Dimensions\n height: true,\n width: true,\n minWidth: true,\n minHeight: true,\n maxWidth: true,\n maxHeight: true,\n // Background\n backgroundColor: true,\n // Border colors\n borderColor: true,\n borderLeftColor: true,\n borderRightColor: true,\n borderTopColor: true,\n borderBottomColor: true,\n // Border radius\n borderRadius: true,\n borderTopLeftRadius: true,\n borderTopRightRadius: true,\n borderBottomLeftRadius: true,\n borderBottomRightRadius: true,\n // Border width\n borderWidth: true,\n borderLeftWidth: true,\n borderRightWidth: true,\n borderTopWidth: true,\n borderBottomWidth: true,\n // Text\n color: true,\n fontSize: true,\n fontWeight: true,\n lineHeight: true,\n letterSpacing: true,\n // Position\n left: true,\n right: true,\n top: true,\n bottom: true,\n // Margin\n margin: true,\n marginTop: true,\n marginBottom: true,\n marginLeft: true,\n marginRight: true,\n marginHorizontal: true,\n marginVertical: true,\n // Padding\n padding: true,\n paddingTop: true,\n paddingBottom: true,\n paddingLeft: true,\n paddingRight: true,\n paddingHorizontal: true,\n paddingVertical: true,\n // Flex/Gap\n gap: true,\n rowGap: true,\n columnGap: true,\n flex: true,\n flexGrow: true,\n flexShrink: true\n};\nconst canAnimateProperty = (key, value) => {\n if (!ANIMATABLE_PROPERTIES[key]) return false;\n if (typeof value === \"string\" && NON_ANIMATABLE_VALUE.test(value)) return false;\n return true;\n};\nconst splitAnimationStyles = (style, isDark, disableAnimation) => {\n const animated = {};\n const statics = {};\n for (const key in style) {\n const value = resolveDynamicValue(style[key], isDark);\n if (value === void 0) continue;\n if (!disableAnimation && canAnimateProperty(key, value)) {\n animated[key] = cloneAnimationValue(value);\n } else {\n statics[key] = cloneAnimationValue(value);\n }\n }\n return { animated, statics };\n};\nfunction createWebAnimatedComponent(defaultTag) {\n const isText = defaultTag === \"span\";\n const Component = Animated.createAnimatedComponent(\n createRefComponent((propsIn, ref) => {\n const { forwardedRef, render = defaultTag, ...rest } = propsIn;\n const hostRef = useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, hostRef);\n const stateRef = useRef({\n get host() {\n return hostRef.current;\n }\n });\n const [, themeState] = useThemeWithState({});\n const result = getSplitStyles(\n rest,\n isText ? Text.staticConfig : View.staticConfig,\n themeState?.theme ?? {},\n themeState?.name ?? \"\",\n { unmounted: false },\n { isAnimated: false, noClass: true }\n );\n const viewProps = result?.viewProps ?? {};\n const Element = render;\n const transformedProps = hooks.usePropsTransform?.(\n render,\n viewProps,\n stateRef,\n false\n );\n const { nativeID, ...webProps } = transformedProps ?? viewProps;\n return /* @__PURE__ */ jsx(Element, { ...webProps, ref: composedRefs });\n })\n );\n Component.acceptRenderProp = true;\n return Component;\n}\nconst AnimatedView = createWebAnimatedComponent(\"div\");\nconst AnimatedText = createWebAnimatedComponent(\"span\");\nlet animatedTextInput;\nconst defaultConfig = { type: \"spring\" };\nconst bezierEasings = /* @__PURE__ */ new Map();\nfunction bezierEasing(easing) {\n if (!bezierEasings.has(easing)) {\n const bezier = easingToBezier(easing);\n bezierEasings.set(\n easing,\n bezier ? Easing.bezier(bezier[0], bezier[1], bezier[2], bezier[3]) : void 0\n );\n }\n return bezierEasings.get(easing);\n}\nfunction entryToReanimated(entry) {\n if (entry.timing.kind === \"spring\") {\n return {\n type: \"spring\",\n stiffness: entry.timing.stiffness,\n damping: entry.timing.damping,\n mass: entry.timing.mass,\n delay: entry.delayMs || void 0\n };\n }\n return {\n type: \"timing\",\n duration: entry.timing.durationMs,\n // Easing.bezier returns a worklet, which is what withTiming wants\n easing: bezierEasing(entry.timing.easing),\n delay: entry.delayMs || void 0\n };\n}\nfunction buildTransitionConfig(transition, animations, animationState, styleKeys) {\n const resolved = forAnimationState(\n resolveTransition(transition, { animations }),\n animationState\n );\n const base = resolved.all ? entryToReanimated(resolved.all) : { ...defaultConfig };\n const propertyConfigs = {};\n for (const key of styleKeys) {\n const entry = getTransitionForKey(resolved, key);\n propertyConfigs[key] = entry ? entryToReanimated(entry) : instantConfig();\n }\n return { baseConfig: base, propertyConfigs, resolved };\n}\nconst instantConfig = () => ({ type: \"timing\", duration: 0 });\nfunction sameTransitionConfig(a, b) {\n const aKeys = Object.keys(a);\n if (aKeys.length !== Object.keys(b).length) return false;\n for (const key of aKeys) {\n if (a[key] !== b[key])\n return false;\n }\n return true;\n}\nfunction sameDriverConfig(a, b) {\n if (a.disableAnimation !== b.disableAnimation || a.isHydrating !== b.isHydrating) {\n return false;\n }\n if (!sameTransitionConfig(a.baseConfig, b.baseConfig)) return false;\n const aKeys = Object.keys(a.propertyConfigs);\n if (aKeys.length !== Object.keys(b.propertyConfigs).length) return false;\n for (const key of aKeys) {\n const other = b.propertyConfigs[key];\n if (!other || !sameTransitionConfig(a.propertyConfigs[key], other)) return false;\n }\n return true;\n}\nfunction getStyleKeys(style) {\n const keys = new Set(Object.keys(style));\n if (style.transform && Array.isArray(style.transform)) {\n for (const t of style.transform) {\n if (t && typeof t === \"object\") {\n keys.add(Object.keys(t)[0]);\n }\n }\n }\n return keys;\n}\nfunction createAnimations(animations) {\n return {\n needsCustomComponent: true,\n View: isWeb ? AnimatedView : Animated.View,\n Text: isWeb ? AnimatedText : Animated.Text,\n inputStyle: \"value\",\n outputStyle: \"inline\",\n avoidReRenders: true,\n animations,\n usePresence,\n ResetPresence,\n // binds a descendant that has no font size of its own to the ancestor's\n // animated one. no clock here: the worklet reads the ancestor's shared\n // value, so the font size and a ratio leading land on the same frame.\n useTextMetrics: ({ inheritedText, lineHeight }) => {\n const node = inheritedText?.driver === \"reanimated\" ? inheritedText.fontSize : null;\n const ratio = typeof lineHeight === \"number\" ? lineHeight : null;\n const animatedStyle = useAnimatedStyle(() => {\n \"worklet\";\n if (!node) return {};\n const fontSize = node.value;\n return ratio === null ? { fontSize } : { fontSize, lineHeight: fontSize * ratio };\n }, [node, ratio]);\n const textChannel = inheritedText ?? null;\n if (!node || !TextInputHost) return { style: null, textChannel };\n animatedTextInput ||= Animated.createAnimatedComponent(TextInputHost);\n return {\n // reanimated's animated style is an opaque handle its own hosts read,\n // not a plain object, so it does not fit the contract's Record shape.\n style: animatedStyle,\n textChannel,\n Text: isWeb ? AnimatedText : Animated.Text,\n TextInput: animatedTextInput\n };\n },\n // =========================================================================\n // useAnimatedNumber - For imperative animated values\n // =========================================================================\n useAnimatedNumber(initial) {\n const sharedValue = useSharedValue(initial);\n return useMemo(\n () => ({\n getInstance() {\n \"worklet\";\n return sharedValue;\n },\n getValue() {\n \"worklet\";\n return sharedValue.value;\n },\n setValue(next, config = { type: \"spring\" }, onFinish) {\n if (config.type === \"direct\") {\n sharedValue.value = next;\n onFinish?.();\n } else {\n const cb = onFinish ? (finished) => {\n \"worklet\";\n if (finished !== false) {\n runOnJS(onFinish)();\n }\n } : void 0;\n const animationConfig = cloneTransitionConfig(config);\n if (isWeb) {\n sharedValue.value = applyAnimation(next, animationConfig, cb);\n } else {\n runOnUI((targetValue, animationConfig2) => {\n \"worklet\";\n sharedValue.value = applyAnimation(targetValue, animationConfig2, cb);\n })(next, animationConfig);\n }\n }\n },\n stop() {\n cancelAnimation(sharedValue);\n }\n }),\n [sharedValue]\n );\n },\n // =========================================================================\n // useAnimatedNumberReaction - React to animated value changes\n // =========================================================================\n useAnimatedNumberReaction({ value }, onValue) {\n const instance = value.getInstance();\n return useAnimatedReaction(\n () => instance.value,\n (next, prev) => {\n if (prev !== next) {\n runOnJS(onValue)(next);\n }\n },\n [onValue, instance]\n );\n },\n // =========================================================================\n // useAnimatedNumberStyle - Create animated styles from values\n // =========================================================================\n useAnimatedNumberStyle(val, getStyle) {\n const instance = val.getInstance();\n if (isWeb) {\n return useAnimatedStyle(() => {\n \"worklet\";\n return getStyle(instance.value);\n }, [instance, getStyle]);\n }\n const styleVal = useDerivedValue(() => {\n \"worklet\";\n return getStyle(instance.value);\n });\n const animatedStyle = useAnimatedStyle(() => {\n \"worklet\";\n return styleVal.value;\n });\n silenceAnimatedComponentDevCheck(animatedStyle);\n return animatedStyle;\n },\n useAnimatedNumbersStyle(vals, getStyle) {\n const instances = vals.map((v) => v.getInstance());\n const animatedStyle = useAnimatedStyle(\n () => {\n \"worklet\";\n const currentValues = instances.map((inst) => inst.value);\n return getStyle(...currentValues);\n },\n isWeb ? [getStyle, ...instances] : void 0\n );\n silenceAnimatedComponentDevCheck(animatedStyle);\n return animatedStyle;\n },\n // =========================================================================\n // useAnimations - Main animation hook for components\n // =========================================================================\n useAnimations(animationProps) {\n const {\n props,\n presence,\n style,\n componentState,\n useStyleEmitter,\n themeName,\n stateRef,\n styleState,\n onTransition,\n inheritedText\n } = animationProps;\n const isHydrating = componentState.unmounted === true;\n const isMounting = componentState.unmounted === \"should-enter\";\n const isEntering = !!componentState.unmounted;\n const isExiting = presence?.[0] === false;\n const wasEnteringRef = useRef(isEntering);\n const justFinishedEntering = wasEnteringRef.current && !isEntering;\n React.useEffect(() => {\n wasEnteringRef.current = isEntering;\n });\n const effectiveTransition = styleState?.effectiveTransition ?? props.transition;\n const leadingRatio = getLeadingRatio(styleState?.nativeTextMetrics);\n const animationState = isExiting ? \"exit\" : isMounting || justFinishedEntering ? \"enter\" : \"default\";\n const resolvedTransition = forAnimationState(\n resolveTransition(effectiveTransition, {\n animations\n }),\n animationState\n );\n const disableAnimation = isHydrating || !hasTransition(resolvedTransition);\n const fontSizeShared = useSharedValue(\n typeof style.fontSize === \"number\" ? style.fontSize : 0\n );\n const publishesFontSize = !disableAnimation && typeof style.fontSize === \"number\";\n const ownTextChannel = useMemo(\n () => ({ fontSize: fontSizeShared, driver: \"reanimated\" }),\n [fontSizeShared]\n );\n const inheritedFontSize = leadingRatio !== void 0 && typeof style.fontSize !== \"number\" && inheritedText?.driver === \"reanimated\" ? inheritedText.fontSize : null;\n const leadingFontSize = inheritedFontSize ?? fontSizeShared;\n const leadingRatioShared = useSharedValue(leadingRatio ?? 0);\n const paintedRatioRef = useRef(leadingRatio);\n const applyLeadingRatio = (ratio, config) => {\n const previous = paintedRatioRef.current;\n if (previous === ratio) return;\n paintedRatioRef.current = ratio;\n if (ratio === void 0) return;\n leadingRatioShared.value = previous === void 0 || disableAnimation ? ratio : applyAnimation(ratio, config);\n };\n const isDark = themeName?.startsWith(\"dark\") || false;\n const sendExitComplete = presence?.[1];\n const onTransitionRef = useRef(onTransition);\n onTransitionRef.current = onTransition;\n const emit = (phase, cause, finished) => {\n onTransitionRef.current?.(\n phase === \"end\" ? { phase, cause, finished } : { phase, cause }\n );\n };\n const enterStartedRef = useRef(false);\n const exitStartedRef = useRef(false);\n const updateStartedRef = useRef(false);\n const isExitingJSRef = useRef(false);\n isExitingJSRef.current = isExiting;\n const updateCycleIdRef = useRef(0);\n const pendingUpdateKeysRef = useRef(/* @__PURE__ */ new Set());\n const updateCompletedRef = useRef(false);\n const isCompletingUpdateRef = useSharedValue(false);\n const updateCycleIdShared = useSharedValue(0);\n const updateInterruptedRef = useRef(false);\n const markUpdateKeyDone = useEvent(\n (key, cycleId, finished) => {\n if (cycleId !== updateCycleIdRef.current) return;\n if (updateCompletedRef.current) return;\n if (!finished) updateInterruptedRef.current = true;\n pendingUpdateKeysRef.current.delete(key);\n if (pendingUpdateKeysRef.current.size === 0) {\n updateCompletedRef.current = true;\n isCompletingUpdateRef.value = false;\n if (updateStartedRef.current) {\n updateStartedRef.current = false;\n emit(\"end\", \"update\", !updateInterruptedRef.current);\n }\n }\n }\n );\n const exitCycleIdRef = useRef(0);\n const pendingExitKeysRef = useRef(/* @__PURE__ */ new Set());\n const exitCompletedRef = useRef(false);\n const wasExitingRef = useRef(false);\n const justStartedExiting = isExiting && !wasExitingRef.current;\n const justStoppedExiting = !isExiting && wasExitingRef.current;\n const markExitKeyDone = useEvent(\n (key, cycleId, finished) => {\n if (cycleId !== exitCycleIdRef.current) return;\n if (exitCompletedRef.current) return;\n pendingExitKeysRef.current.delete(key);\n if (pendingExitKeysRef.current.size === 0) {\n exitCompletedRef.current = true;\n if (exitStartedRef.current) {\n exitStartedRef.current = false;\n emit(\"end\", \"exit\", true);\n }\n sendExitComplete?.();\n }\n }\n );\n const enterCycleIdRef = useRef(0);\n const pendingEnterKeysRef = useRef(/* @__PURE__ */ new Set());\n const enterCompletedRef = useRef(false);\n const markEnterKeyDone = useEvent((key, cycleId) => {\n if (cycleId !== enterCycleIdRef.current) return;\n if (enterCompletedRef.current) return;\n if (isExitingJSRef.current) return;\n pendingEnterKeysRef.current.delete(key);\n if (pendingEnterKeysRef.current.size === 0) {\n enterCompletedRef.current = true;\n if (enterStartedRef.current) {\n enterStartedRef.current = false;\n emit(\"end\", \"enter\", true);\n }\n }\n });\n const isExitingRef = useSharedValue(isExiting);\n const exitCycleIdShared = useSharedValue(exitCycleIdRef.current);\n const isCompletingEnterRef = useSharedValue(false);\n const enterCycleIdShared = useSharedValue(enterCycleIdRef.current);\n if (justStartedExiting) {\n exitCycleIdRef.current++;\n exitCompletedRef.current = false;\n pendingExitKeysRef.current.clear();\n enterCycleIdRef.current++;\n pendingEnterKeysRef.current.clear();\n updateCycleIdRef.current++;\n pendingUpdateKeysRef.current.clear();\n updateCompletedRef.current = true;\n }\n if (justStoppedExiting) {\n exitCycleIdRef.current++;\n pendingExitKeysRef.current.clear();\n }\n useIsomorphicLayoutEffect(() => {\n isExitingRef.value = isExiting;\n exitCycleIdShared.value = exitCycleIdRef.current;\n isCompletingEnterRef.value = !isExiting && justFinishedEntering && Boolean(onTransitionRef.current);\n enterCycleIdShared.value = enterCycleIdRef.current;\n if (justStartedExiting) {\n isCompletingUpdateRef.value = false;\n updateCycleIdShared.value = updateCycleIdRef.current;\n }\n }, [\n isExiting,\n justFinishedEntering,\n exitCycleIdRef.current,\n enterCycleIdRef.current,\n justStartedExiting\n ]);\n useIsomorphicLayoutEffect(() => {\n if (justStoppedExiting && exitStartedRef.current && !exitCompletedRef.current) {\n exitStartedRef.current = false;\n emit(\"end\", \"exit\", false);\n }\n }, [justStoppedExiting]);\n React.useEffect(() => {\n wasExitingRef.current = isExiting;\n });\n const committedRenderKeysRef = useRef(/* @__PURE__ */ new Set());\n const lastPaintedRef = useRef({});\n const carryRef = useRef({});\n const exitSeedRef = useRef(null);\n const paintedPredecessor = isExiting ? exitSeedRef.current ?? lastPaintedRef.current : lastPaintedRef.current;\n useIsomorphicLayoutEffect(() => {\n exitSeedRef.current = isExiting ? paintedPredecessor : null;\n }, [isExiting, paintedPredecessor]);\n const { animatedStyles, staticStyles, nextCarry } = useMemo(() => {\n const { animated, statics } = splitAnimationStyles(\n style,\n isDark,\n disableAnimation\n );\n if (isExiting && animated.transform) {\n const remaining = getAnimatedTransforms(animated.transform).map(\n cloneStyleRecord\n );\n const previous = getAnimatedTransforms(paintedPredecessor.transform);\n if (previous.length) {\n animated.transform = previous.map((entry) => {\n const key = Object.keys(entry)[0];\n const index = remaining.findIndex((target) => key in target);\n return index < 0 ? cloneStyleRecord(entry) : remaining.splice(index, 1)[0];\n }).concat(remaining);\n }\n }\n const nextCarry2 = cloneStyleRecord(carryRef.current);\n for (const key in nextCarry2) {\n if (!(key in animated)) delete nextCarry2[key];\n }\n for (const key in animated) {\n if (!(key in nextCarry2)) {\n const target = animated[key];\n if (isExiting && key === \"transform\") {\n nextCarry2[key] = getAnimatedTransforms(target).map((transform) => {\n const initial = cloneStyleRecord(transform);\n for (const part in initial) {\n const value = initial[part];\n if (typeof value === \"number\" || typeof value === \"string\") {\n initial[part] = paintedPredecessor[`transform:${part}`] ?? getImplicitDefault(part, value);\n }\n }\n return initial;\n });\n } else {\n nextCarry2[key] = cloneAnimationValue(\n isExiting && (typeof target === \"number\" || typeof target === \"string\") ? paintedPredecessor[key] ?? getImplicitDefault(key, target) : target\n );\n }\n }\n statics[key] = nextCarry2[key];\n }\n return { animatedStyles: animated, staticStyles: statics, nextCarry: nextCarry2 };\n }, [\n disableAnimation,\n style,\n isDark,\n isExiting,\n isExiting ? paintedPredecessor : null\n ]);\n const derivesLeading = derivesLeadingProduct(\n animatedStyles,\n leadingRatio,\n !!inheritedFontSize,\n resolvedTransition\n );\n const renderSnapshot = useMemo(\n () => buildSnapshot(\n animatedStyles,\n staticStyles,\n getAnimatedTransforms(animatedStyles.transform),\n committedRenderKeysRef.current,\n paintedPredecessor,\n derivesLeading\n ),\n [\n animatedStyles,\n staticStyles,\n isExiting ? paintedPredecessor : null,\n derivesLeading\n ]\n );\n const renderSnapshotRef = useSharedValue({\n animated: {},\n statics: {},\n transforms: [],\n gatedKeys: {},\n derivesLeading: false,\n seeds: {},\n removedKeys: {},\n removeTransform: false,\n clearValue: isWeb ? \"\" : null\n });\n const emitterSnapshotRef = useSharedValue(null);\n const emitterKeysRef = useRef(null);\n useIsomorphicLayoutEffect(() => {\n carryRef.current = nextCarry;\n committedRenderKeysRef.current = renderSnapshot.keys;\n lastPaintedRef.current = renderSnapshot.painted;\n }, [nextCarry, renderSnapshot]);\n const pseudoActiveRef = useRef(false);\n const publishedSnapshotRef = useRef(null);\n useIsomorphicLayoutEffect(() => {\n const renderChanged = publishedSnapshotRef.current !== renderSnapshot.value;\n const droppingLatch = (isExiting || !pseudoActiveRef.current && publishedSnapshotRef.current !== null && renderChanged) && emitterSnapshotRef.value !== null;\n const emitterKeys = droppingLatch ? emitterKeysRef.current : null;\n if (droppingLatch || renderChanged) {\n const removedKeys = emitterKeys ? {\n ...renderSnapshot.value.removedKeys,\n ...getRemovedAnimatedKeys(renderSnapshot.keys, emitterKeys)\n } : renderSnapshot.value.removedKeys;\n renderSnapshotRef.value = {\n ...renderSnapshot.value,\n removedKeys,\n removeTransform: Object.keys(removedKeys).some(\n (key) => key.startsWith(\"transform:\")\n )\n };\n publishedSnapshotRef.current = renderSnapshot.value;\n }\n if (droppingLatch) {\n emitterSnapshotRef.value = null;\n emitterKeysRef.current = null;\n }\n });\n const { baseConfig, propertyConfigs } = useMemo(() => {\n if (isHydrating) {\n return {\n baseConfig: { type: \"timing\", duration: 0 },\n propertyConfigs: {}\n };\n }\n return buildTransitionConfig(\n effectiveTransition,\n animations,\n animationState,\n getStyleKeys(animatedStyles)\n );\n }, [isHydrating, effectiveTransition, animatedStyles, animationState]);\n const renderConfig = {\n baseConfig,\n propertyConfigs,\n disableAnimation,\n isHydrating\n };\n const configRef = useSharedValue(renderConfig);\n const writtenConfigRef = useRef(renderConfig);\n const writeConfig = (next) => {\n if (sameDriverConfig(writtenConfigRef.current, next)) return;\n writtenConfigRef.current = next;\n configRef.value = next;\n };\n useIsomorphicLayoutEffect(() => {\n writeConfig(renderConfig);\n }, [baseConfig, propertyConfigs, disableAnimation, isHydrating]);\n useIsomorphicLayoutEffect(() => {\n if (emitterSnapshotRef.value !== null) return;\n applyLeadingRatio(leadingRatio, propertyConfigs.lineHeight ?? baseConfig);\n });\n const onEmittedStyle = (nextStyle, effectiveTransition2, pseudoActive, nextMetrics) => {\n if (isExitingJSRef.current) return;\n pseudoActiveRef.current = pseudoActive === true;\n const transitionToUse = effectiveTransition2 ?? props.transition;\n const emittedLeadingRatio = getLeadingRatio(nextMetrics);\n const {\n baseConfig: newBase,\n propertyConfigs: newPropertyConfigs,\n resolved: emittedResolved\n } = buildTransitionConfig(\n transitionToUse,\n animations,\n animationState,\n getStyleKeys(nextStyle)\n );\n const written = writtenConfigRef.current;\n writeConfig({\n baseConfig: newBase,\n propertyConfigs: newPropertyConfigs,\n disableAnimation: written.disableAnimation,\n isHydrating: written.isHydrating\n });\n const previousKeys = emitterKeysRef.current ?? committedRenderKeysRef.current;\n const { animated, statics } = splitAnimationStyles(\n nextStyle,\n isDark,\n written.disableAnimation\n );\n const emittedDerivesLeading = derivesLeadingProduct(\n animated,\n emittedLeadingRatio,\n !!inheritedFontSize,\n emittedResolved\n );\n applyLeadingRatio(emittedLeadingRatio, newPropertyConfigs.lineHeight ?? newBase);\n const snapshot = buildSnapshot(\n animated,\n statics,\n getAnimatedTransforms(animated.transform),\n previousKeys,\n lastPaintedRef.current,\n emittedDerivesLeading\n );\n emitterSnapshotRef.value = snapshot.value;\n emitterKeysRef.current = snapshot.keys;\n lastPaintedRef.current = snapshot.painted;\n if (process.env.NODE_ENV === \"development\" && props.debug && props.debug !== \"profile\") {\n console.info(\"[animations-reanimated] useStyleEmitter update\", {\n animated,\n statics,\n transforms: snapshot.value.transforms\n });\n }\n };\n useStyleEmitter?.(onEmittedStyle);\n const exitKeysRegistered = useRef(false);\n const enterKeysRegistered = useRef(false);\n if (!isExiting && justFinishedEntering && onTransition) {\n const enterKeys = getGatedKeys(renderSnapshot.value);\n enterCycleIdRef.current++;\n enterCompletedRef.current = false;\n pendingEnterKeysRef.current = new Set(enterKeys);\n enterKeysRegistered.current = enterKeys.length > 0;\n }\n if (justStartedExiting && sendExitComplete) {\n const exitKeys = getGatedKeys(renderSnapshot.value);\n pendingExitKeysRef.current = new Set(exitKeys);\n exitKeysRegistered.current = exitKeys.length > 0;\n }\n const previousUpdateStyleRef = useRef(null);\n const updateStyle = onTransition ? JSON.stringify(style) : null;\n const previousUpdateStyle = previousUpdateStyleRef.current;\n const shouldRegisterUpdate = updateStyle !== null && previousUpdateStyle !== null && previousUpdateStyle !== updateStyle && !isExiting && !isEntering && !justFinishedEntering;\n const updateKeys = shouldRegisterUpdate ? getGatedKeys(renderSnapshot.value) : [];\n useIsomorphicLayoutEffect(() => {\n if (updateStyle === null) {\n previousUpdateStyleRef.current = null;\n isCompletingUpdateRef.value = false;\n return;\n }\n const previousStyleStillCurrent = previousUpdateStyleRef.current === previousUpdateStyle;\n previousUpdateStyleRef.current = updateStyle;\n if (!shouldRegisterUpdate || !previousStyleStillCurrent) return;\n const cycleId = ++updateCycleIdRef.current;\n pendingUpdateKeysRef.current = new Set(updateKeys);\n updateInterruptedRef.current = false;\n updateCompletedRef.current = updateKeys.length === 0;\n isCompletingUpdateRef.value = updateKeys.length > 0;\n updateCycleIdShared.value = cycleId;\n if (updateStartedRef.current) {\n emit(\"end\", \"update\", false);\n }\n updateStartedRef.current = true;\n emit(\"start\", \"update\");\n if (updateKeys.length === 0) {\n updateStartedRef.current = false;\n emit(\"end\", \"update\", true);\n }\n }, [updateStyle, shouldRegisterUpdate]);\n React.useEffect(() => {\n if (!justStartedExiting || !sendExitComplete) return;\n if (enterStartedRef.current) {\n enterStartedRef.current = false;\n emit(\"end\", \"enter\", false);\n }\n if (updateStartedRef.current) {\n updateStartedRef.current = false;\n emit(\"end\", \"update\", false);\n }\n if (onTransitionRef.current && !exitStartedRef.current) {\n exitStartedRef.current = true;\n emit(\"start\", \"exit\");\n }\n if (!exitKeysRegistered.current && pendingExitKeysRef.current.size === 0) {\n if (!exitCompletedRef.current) {\n exitCompletedRef.current = true;\n if (exitStartedRef.current) {\n exitStartedRef.current = false;\n emit(\"end\", \"exit\", true);\n }\n sendExitComplete();\n }\n }\n }, [justStartedExiting, sendExitComplete]);\n React.useEffect(() => {\n if (isExiting || !justFinishedEntering || !onTransition) return;\n if (!enterStartedRef.current) {\n enterStartedRef.current = true;\n emit(\"start\", \"enter\");\n }\n if (!enterKeysRegistered.current && pendingEnterKeysRef.current.size === 0) {\n if (!enterCompletedRef.current) {\n enterCompletedRef.current = true;\n if (enterStartedRef.current) {\n enterStartedRef.current = false;\n emit(\"end\", \"enter\", true);\n }\n }\n }\n }, [isExiting, justFinishedEntering, onTransition]);\n const mapperStateRef = useSharedValue({\n emitted: {},\n ownedStatics: {}\n });\n const animatedStyle = useAnimatedStyle(\n () => {\n \"worklet\";\n const mapperState = mapperStateRef.value;\n const config = configRef.value;\n if (config.disableAnimation || config.isHydrating) {\n updateMapperState(mapperStateRef, {}, {});\n return {};\n }\n const previouslyEmitted = mapperState.emitted;\n const emitted = {};\n const previouslyOwned = mapperState.ownedStatics;\n const ownedStatics = {};\n const result = {};\n const emitterSnapshot = emitterSnapshotRef.value;\n const snapshot = emitterSnapshot ?? renderSnapshotRef.value;\n const animatedValues = snapshot.animated;\n const staticValues = snapshot.statics;\n const currentlyExiting = isExitingRef.value;\n const currentCycleId = exitCycleIdShared.value;\n const currentlyCompletingEnter = isCompletingEnterRef.value;\n const currentEnterCycleId = enterCycleIdShared.value;\n const currentlyCompletingUpdate = isCompletingUpdateRef.value;\n const currentUpdateCycleId = updateCycleIdShared.value;\n for (const key in staticValues) {\n if (!emitterSnapshot && !previouslyOwned[key]) continue;\n ownedStatics[key] = true;\n result[key] = staticValues[key];\n }\n for (const key in snapshot.removedKeys) {\n if (!key.startsWith(\"transform:\") && !(key in staticValues)) {\n result[key] = snapshot.clearValue;\n }\n }\n for (const key in animatedValues) {\n if (key === \"transform\") continue;\n const targetValue = animatedValues[key];\n emitted[key] = true;\n if (key === \"lineHeight\" && snapshot.derivesLeading) continue;\n if (typeof targetValue !== \"number\" && typeof targetValue !== \"string\") {\n result[key] = targetValue;\n continue;\n }\n result[key] = animateSnapshotValue(\n key,\n key,\n targetValue,\n config.propertyConfigs[key] ?? config.baseConfig,\n !!previouslyEmitted[key],\n snapshot.seeds[key],\n !!snapshot.gatedKeys[key],\n currentlyExiting,\n currentCycleId,\n currentlyCompletingEnter,\n currentEnterCycleId,\n currentlyCompletingUpdate,\n currentUpdateCycleId,\n markExitKeyDone,\n markEnterKeyDone,\n markUpdateKeyDone,\n !!COLOR_STYLE_KEYS[key],\n key === \"fontSize\" ? fontSizeShared : void 0\n );\n }\n if (snapshot.derivesLeading) {\n emitted.lineHeight = true;\n result.lineHeight = leadingFontSize.value * leadingRatioShared.value;\n }\n const transforms = snapshot.transforms;\n if (transforms.length > 0 || snapshot.removeTransform) {\n const validTransforms = [];\n for (const t of transforms) {\n if (!t) continue;\n const keys = Object.keys(t);\n if (keys.length === 0) continue;\n const transformKey = keys[0];\n const value = t[transformKey];\n if (typeof value === \"number\" || typeof value === \"string\") {\n const propConfig = config.propertyConfigs[transformKey] ?? config.baseConfig;\n const subKey = `transform:${transformKey}`;\n emitted[subKey] = true;\n validTransforms.push({\n [transformKey]: animateSnapshotValue(\n subKey,\n transformKey,\n value,\n propConfig,\n !!previouslyEmitted[subKey],\n snapshot.seeds[subKey],\n !!snapshot.gatedKeys[subKey],\n currentlyExiting,\n currentCycleId,\n currentlyCompletingEnter,\n currentEnterCycleId,\n currentlyCompletingUpdate,\n currentUpdateCycleId,\n markExitKeyDone,\n markEnterKeyDone,\n markUpdateKeyDone\n )\n });\n } else {\n validTransforms.push(t);\n }\n }\n if (validTransforms.length > 0 || !(\"transform\" in staticValues)) {\n result.transform = validTransforms;\n }\n }\n updateMapperState(mapperStateRef, emitted, ownedStatics);\n return result;\n },\n isWeb ? [\n // pass SharedValues so the stable mapper watches them on web (no babel plugin)\n renderSnapshotRef,\n emitterSnapshotRef,\n configRef,\n isExitingRef,\n exitCycleIdShared,\n markExitKeyDone,\n isCompletingEnterRef,\n enterCycleIdShared,\n markEnterKeyDone,\n isCompletingUpdateRef,\n updateCycleIdShared,\n markUpdateKeyDone,\n fontSizeShared,\n leadingRatioShared,\n inheritedFontSize\n ] : void 0\n );\n silenceAnimatedComponentDevCheck(animatedStyle);\n if (process.env.NODE_ENV === \"development\" && props.debug && props.debug !== \"profile\") {\n console.info(\"[animations-reanimated] useAnimations\", {\n resolvedTransition,\n componentState,\n isExiting,\n animatedStyles,\n staticStyles,\n baseConfig,\n propertyConfigs\n });\n }\n return {\n style: [staticStyles, animatedStyle],\n // what descendants inherit: this node's mirror when it owns a font size\n // that moves, nothing when it owns one that does not (react-native\n // inherits that statically), otherwise what it inherited itself\n textChannel: publishesFontSize ? ownTextChannel : typeof style.fontSize === \"number\" ? null : inheritedText ?? null\n };\n }\n };\n}\nexport {\n createAnimations\n};\n//# sourceMappingURL=createAnimations.js.map\n"],"mappings":";;;;;;;;;;;AAqCA,MAAM,uBAAuB;AAC7B,MAAM,oBAAoB,WAAW;CACnC,MAAM,MAAM;CACZ,IAAI,IAAI,cAAc,IAAI,OAAO,iBAAiB,UAAU;EAC1D,OAAO,IAAI,WAAW;CACxB;CACA,OAAO;AACT;AACA,MAAM,WAAW,iBAAiB,SAAS;AAC3C,MAAM,oCAAoC,UAAU;CAClD,IAAI,QAAQ,IAAI,aAAa,iBAAiB,SAAS,CAAC,SAAS,OAAO,UAAU,UAAU;EAC1F;CACF;CACA,OAAO,eAAe,OAAO,8BAA8B;EACzD,cAAc;EACd,YAAY;EACZ,OAAO;CACT,CAAC;AACH;AACA,MAAM,uBAAuB,OAAO,WAAW;CAC7C,IAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,aAAa,SAAS,OAAO,MAAM,YAAY,UAAU;EAC1G,MAAM,UAAU,MAAM;EACtB,OAAO,SAAS,QAAQ,OAAO,QAAQ;CACzC;CACA,OAAO;AACT;AACA,MAAM,oBAAoB,SAAS,OAAO,SAAS,iBAAiB;CAClE,MAAM,MAAM,UAAU;CACtB,MAAM,MAAM,eAAe;AAC7B,KAAK,OAAO,SAAS,iBAAiB;CACpC;CACA,IAAI,CAAC,WAAW,UAAU;CAC1B,MAAM,QAAQ,YAAY;EACxB,QAAQ,UAAU;EAClB,QAAQ,eAAe;EACvB,OAAO;CACT,GAAG,KAAK;AACV;AACA,MAAM,uBAAuB,UAA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;MAC1B,IAAI,CAAC,GAAG;MACR,MAAM,OAAO,OAAO,KAAK,CAAC;MAC1B,IAAI,KAAK,WAAW,GAAG;MACvB,MAAM,eAAe,KAAK;MAC1B,MAAM,QAAQ,EAAE;MAChB,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU;OAC1D,MAAM,aAAa,OAAO,gBAAgB,iBAAiB,OAAO;OAClE,MAAM,SAAS,aAAa;OAC5B,QAAQ,UAAU;OAClB,gBAAgB,KAAK,GAClB,eAAe,qBACd,QACA,cACA,OACA,YACA,CAAC,CAAC,kBAAkB,SACpB,SAAS,MAAM,SACf,CAAC,CAAC,SAAS,UAAU,SACrB,kBACA,gBACA,0BACA,qBACA,2BACA,sBACA,iBACA,kBACA,iBACF,EACF,CAAC;MACH,OAAO;OACL,gBAAgB,KAAK,CAAC;MACxB;KACF;KACA,IAAI,gBAAgB,SAAS,KAAK,EAAE,eAAe,eAAe;MAChE,OAAO,YAAY;KACrB;IACF;IACA,kBAAkB,gBAAgB,SAAS,YAAY;IACvD,OAAO;GACT,GACA,QAAQ;IAEN;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF,IAAI,KAAK,CACX;GACA,iCAAiC,aAAa;GAC9C,IAAI,QAAQ,IAAI,aAAa,iBAAiB,MAAM,SAAS,MAAM,UAAU,WAAW;IACtF,QAAQ,KAAK,yCAAyC;KACpD;KACA;KACA;KACA;KACA;KACA;KACA;IACF,CAAC;GACH;GACA,OAAO;IACL,OAAO,CAAC,cAAc,aAAa;IAInC,aAAa,oBAAoB,iBAAiB,OAAO,MAAM,aAAa,WAAW,OAAO,iBAAiB;GACjH;EACF;CACF;AACF"}
1
+ {"version":3,"file":"createAnimations.js","names":[],"sources":["esm/createAnimations.js"],"sourcesContent":["import {\n easingToBezier,\n forAnimationState,\n getTransitionForKey,\n hasTransition,\n resolveTransition\n} from \"@tamagui/animation-helpers\";\nimport {\n getSplitStyles,\n hooks,\n isWeb,\n Text,\n useComposedRefs,\n useEvent,\n useIsomorphicLayoutEffect,\n View,\n createRefComponent\n} from \"@tamagui/core\";\nimport { useThemeWithState } from \"@tamagui/web/internal-runtime\";\nimport { TextInputHost } from \"./textInputHost\";\nimport { ResetPresence, usePresence } from \"@tamagui/use-presence\";\nimport normalizeColor from \"@react-native/normalize-colors\";\nimport React, { useMemo, useRef } from \"react\";\nimport Animated_, {\n cancelAnimation,\n Easing,\n runOnJS,\n runOnUI,\n useAnimatedReaction,\n useAnimatedStyle,\n useDerivedValue,\n useSharedValue,\n withDelay,\n withSpring,\n withTiming\n} from \"react-native-reanimated\";\nimport { jsx } from \"react/jsx-runtime\";\nconst NON_ANIMATABLE_VALUE = /^(auto|min-content|max-content|fit-content|stretch|inherit|initial|unset)\\b|^calc\\(/;\nconst getDefaultExport = (module) => {\n const mod = module;\n if (mod.__esModule || mod[Symbol.toStringTag] === \"Module\") {\n return mod.default || mod;\n }\n return mod;\n};\nconst Animated = getDefaultExport(Animated_);\nconst silenceAnimatedComponentDevCheck = (style) => {\n if (process.env.NODE_ENV !== \"development\" || isWeb || !style || typeof style !== \"object\") {\n return;\n }\n Object.defineProperty(style, \"_requiresAnimatedComponent\", {\n configurable: true,\n enumerable: false,\n value: true\n });\n};\nconst resolveDynamicValue = (value, isDark) => {\n if (value !== null && typeof value === \"object\" && \"dynamic\" in value && typeof value.dynamic === \"object\") {\n const dynamic = value.dynamic;\n return isDark ? dynamic.dark : dynamic.light;\n }\n return value;\n};\nconst updateMapperState = isWeb ? (state, emitted, ownedStatics) => {\n state.value.emitted = emitted;\n state.value.ownedStatics = ownedStatics;\n} : (state, emitted, ownedStatics) => {\n \"worklet\";\n if (!globalThis._WORKLET) return;\n state.modify((current) => {\n current.emitted = emitted;\n current.ownedStatics = ownedStatics;\n return current;\n }, false);\n};\nconst cloneAnimationValue = (value) => {\n if (Array.isArray(value)) {\n return value.map(cloneAnimationValue);\n }\n if (value && typeof value === \"object\") {\n const next = {};\n for (const key in value) {\n next[key] = cloneAnimationValue(value[key]);\n }\n return next;\n }\n return value;\n};\nconst cloneStyleRecord = (style) => {\n const next = {};\n for (const key in style) {\n next[key] = cloneAnimationValue(style[key]);\n }\n return next;\n};\nconst cloneTransitionConfig = (config) => {\n return cloneAnimationValue(config);\n};\nconst getAnimatedTransforms = (value) => {\n if (!Array.isArray(value)) return [];\n return value.filter(\n (item) => item !== null && typeof item === \"object\" && !Array.isArray(item)\n );\n};\nconst getRemovedAnimatedKeys = (current, previous) => {\n const removedKeys = {};\n for (const key of previous) {\n if (!current.has(key)) removedKeys[key] = true;\n }\n return removedKeys;\n};\nconst getImplicitDefault = (key, targetValue) => {\n \"worklet\";\n const value = key === \"opacity\" || key === \"scale\" || key === \"scaleX\" || key === \"scaleY\" ? 1 : 0;\n if (typeof targetValue !== \"string\") return value;\n let suffixIndex = 0;\n while (suffixIndex < targetValue.length) {\n const character = targetValue[suffixIndex];\n const code = character.charCodeAt(0);\n if (code >= 48 && code <= 57 || character === \".\" || character === \"-\" || character === \"+\") {\n suffixIndex++;\n } else {\n break;\n }\n }\n return suffixIndex > 0 ? `${value}${targetValue.slice(suffixIndex)}` : value;\n};\nconst getLeadingRatio = (metrics) => {\n const ratio = metrics?.lineHeight;\n return typeof ratio === \"number\" && Number.isFinite(ratio) && ratio >= 0 ? ratio : void 0;\n};\nconst derivesLeadingProduct = (style, ratio, inheritsFontSize, resolved) => ratio !== void 0 && (inheritsFontSize || typeof style.lineHeight === \"number\" && typeof style.fontSize === \"number\" && (!!getTransitionForKey(resolved, \"fontSize\") || !!getTransitionForKey(resolved, \"lineHeight\")));\nconst COLOR_STYLE_KEYS = {\n backgroundColor: true,\n borderColor: true,\n borderLeftColor: true,\n borderRightColor: true,\n borderTopColor: true,\n borderBottomColor: true,\n color: true\n};\nconst toReanimatedColor = (value) => {\n \"worklet\";\n if (typeof value === \"number\") {\n const color = value >>> 0;\n const alpha = (color >>> 24 & 255) / 255;\n const red = color >>> 16 & 255;\n const green = color >>> 8 & 255;\n const blue = color & 255;\n return `rgba(${red}, ${green}, ${blue}, ${alpha})`;\n }\n if (typeof value !== \"string\") return value;\n const trimmed = value.trim();\n if (trimmed === \"transparent\") return \"rgba(0, 0, 0, 0)\";\n return trimmed;\n};\nconst isReanimatedColorHistory = (value) => {\n \"worklet\";\n const normalized = toReanimatedColor(value);\n return typeof normalized === \"string\" && normalized.startsWith(\"rgba(\");\n};\nconst normalizeAnimationColor = (value) => {\n if (typeof value === \"number\") {\n return toReanimatedColor(value);\n }\n if (typeof value !== \"string\") return;\n const color = normalizeColor(value);\n if (color == null) return;\n const red = Math.round((color & 4278190080) >>> 24);\n const green = Math.round((color & 16711680) >>> 16);\n const blue = Math.round((color & 65280) >>> 8);\n const alpha = (color & 255) / 255;\n return `rgba(${red}, ${green}, ${blue}, ${alpha})`;\n};\nconst buildSnapshot = (animated, statics, transforms, previousKeys, lastPainted, derivesLeading = false) => {\n const snapshotAnimated = {};\n const snapshotStatics = cloneStyleRecord(statics);\n for (const key in snapshotStatics) {\n if (!COLOR_STYLE_KEYS[key]) continue;\n const normalized = normalizeAnimationColor(snapshotStatics[key]);\n if (normalized !== void 0) snapshotStatics[key] = normalized;\n }\n for (const key in animated) {\n if (key === \"transform\") continue;\n const value = animated[key];\n if (COLOR_STYLE_KEYS[key]) {\n const normalized = normalizeAnimationColor(value);\n if (normalized === void 0) {\n snapshotStatics[key] = cloneAnimationValue(value);\n continue;\n }\n snapshotAnimated[key] = normalized;\n } else {\n snapshotAnimated[key] = cloneAnimationValue(value);\n }\n }\n const snapshotTransforms = transforms.map(cloneStyleRecord);\n const keys = new Set(Object.keys(snapshotAnimated));\n if (derivesLeading) keys.add(\"lineHeight\");\n for (const transform of snapshotTransforms) {\n const key = Object.keys(transform)[0];\n const value = key ? transform[key] : void 0;\n if (key && (typeof value === \"number\" || typeof value === \"string\")) {\n keys.add(`transform:${key}`);\n }\n }\n const seeds = {};\n const staticTransforms = getAnimatedTransforms(snapshotStatics.transform);\n for (const transform of staticTransforms) {\n const key = Object.keys(transform)[0];\n if (keys.has(`transform:${key}`) && previousKeys.has(`transform:${key}`))\n seeds[`transform:${key}`] = transform[key];\n }\n for (const key of keys) {\n let value = previousKeys.has(key) ? seeds[key] ?? snapshotStatics[key] ?? lastPainted[key] : lastPainted[key];\n if (typeof value !== \"number\" && typeof value !== \"string\") {\n delete seeds[key];\n continue;\n }\n if (typeof value === \"string\" && NON_ANIMATABLE_VALUE.test(value)) {\n delete seeds[key];\n continue;\n }\n if (COLOR_STYLE_KEYS[key]) value = normalizeAnimationColor(value);\n if (value !== void 0) seeds[key] = value;\n }\n const gatedKeys = {};\n for (const key of keys) gatedKeys[key] = true;\n if (derivesLeading) delete gatedKeys.lineHeight;\n const removedKeys = getRemovedAnimatedKeys(keys, previousKeys);\n const painted = {\n ...snapshotStatics,\n ...snapshotAnimated\n };\n painted.transform = snapshotTransforms.length ? snapshotTransforms : staticTransforms;\n for (const transform of staticTransforms) {\n const key = Object.keys(transform)[0];\n if (key) painted[`transform:${key}`] = transform[key];\n }\n for (const transform of snapshotTransforms) {\n const key = Object.keys(transform)[0];\n if (key) painted[`transform:${key}`] = transform[key];\n }\n return {\n value: {\n animated: snapshotAnimated,\n statics: snapshotStatics,\n transforms: snapshotTransforms,\n gatedKeys,\n derivesLeading,\n seeds,\n removedKeys,\n removeTransform: Object.keys(removedKeys).some(\n (key) => key.startsWith(\"transform:\")\n ),\n clearValue: isWeb ? \"\" : null\n },\n painted,\n keys\n };\n};\nconst getGatedKeys = (snapshot) => Object.keys(snapshot.gatedKeys);\nconst createReanimatedConfig = (config) => {\n \"worklet\";\n const next = {};\n const source = config;\n for (const key in source) {\n if (key === \"type\" || key === \"delay\") continue;\n const value = source[key];\n if (value !== void 0) {\n next[key] = value;\n }\n }\n return next;\n};\nconst applyAnimation = (targetValue, config, callback, seedValue, validateStartAsColor = false, publishTo) => {\n \"worklet\";\n const delay = config.delay;\n const reanimatedConfig = createReanimatedConfig(config);\n let animatedValue;\n if (config.type === \"timing\") {\n animatedValue = withTiming(\n targetValue,\n reanimatedConfig,\n callback\n );\n } else {\n animatedValue = withSpring(\n targetValue,\n reanimatedConfig,\n callback\n );\n const innerOnFrame = animatedValue.onFrame;\n animatedValue.onFrame = (animation, now) => {\n \"worklet\";\n return innerOnFrame(\n animation,\n now < animation.lastTimestamp ? animation.lastTimestamp : now\n );\n };\n }\n const isAnimationDescriptor = animatedValue !== null && typeof animatedValue !== \"number\" && typeof animatedValue !== \"string\" && typeof animatedValue !== \"boolean\" && typeof animatedValue !== \"undefined\";\n if (isAnimationDescriptor && delay && delay > 0) {\n animatedValue = withDelay(delay, animatedValue);\n }\n if (isAnimationDescriptor && (seedValue !== void 0 || validateStartAsColor)) {\n const innerOnStart = animatedValue.onStart;\n animatedValue.onStart = (animation, value, timestamp, previousAnimation) => {\n \"worklet\";\n const startValue = validateStartAsColor ? isReanimatedColorHistory(value) ? toReanimatedColor(value) : seedValue ?? targetValue : seedValue;\n innerOnStart(animation, startValue, timestamp, previousAnimation);\n };\n }\n if (isAnimationDescriptor && publishTo) {\n const startedOn = animatedValue.onStart;\n animatedValue.onStart = (animation, value, timestamp, previousAnimation) => {\n \"worklet\";\n startedOn(animation, value, timestamp, previousAnimation);\n publishTo.value = animation.current;\n };\n const framedOn = animatedValue.onFrame;\n animatedValue.onFrame = (animation, now) => {\n \"worklet\";\n const finished = framedOn(animation, now);\n publishTo.value = animation.current;\n return finished;\n };\n }\n return animatedValue;\n};\nconst animateSnapshotValue = (key, implicitKey, targetValue, config, previouslyEmitted, seedValue, gated, currentlyExiting, exitCycleId, currentlyCompletingEnter, enterCycleId, currentlyCompletingUpdate, updateCycleId, markExitKeyDone, markEnterKeyDone, markUpdateKeyDone, validateStartAsColor = false, publishTo) => {\n \"worklet\";\n const cycleGated = gated && (currentlyExiting || currentlyCompletingEnter || currentlyCompletingUpdate);\n if (!previouslyEmitted && seedValue === void 0 && !cycleGated) {\n if (publishTo && typeof targetValue === \"number\") publishTo.value = targetValue;\n return targetValue;\n }\n let callback;\n if (gated && currentlyExiting) {\n callback = (finished) => {\n \"worklet\";\n runOnJS(markExitKeyDone)(key, exitCycleId, finished ?? false);\n };\n } else if (gated && currentlyCompletingEnter) {\n callback = () => {\n \"worklet\";\n runOnJS(markEnterKeyDone)(key, enterCycleId);\n };\n } else if (gated && currentlyCompletingUpdate) {\n callback = (finished) => {\n \"worklet\";\n runOnJS(markUpdateKeyDone)(key, updateCycleId, finished ?? false);\n };\n }\n return applyAnimation(\n targetValue,\n config,\n callback,\n previouslyEmitted ? void 0 : seedValue ?? getImplicitDefault(implicitKey, targetValue),\n validateStartAsColor,\n publishTo\n );\n};\nconst ANIMATABLE_PROPERTIES = {\n // Transform\n transform: true,\n // Opacity\n opacity: true,\n // Dimensions\n height: true,\n width: true,\n minWidth: true,\n minHeight: true,\n maxWidth: true,\n maxHeight: true,\n // Background\n backgroundColor: true,\n // Border colors\n borderColor: true,\n borderLeftColor: true,\n borderRightColor: true,\n borderTopColor: true,\n borderBottomColor: true,\n // Border radius\n borderRadius: true,\n borderTopLeftRadius: true,\n borderTopRightRadius: true,\n borderBottomLeftRadius: true,\n borderBottomRightRadius: true,\n // Border width\n borderWidth: true,\n borderLeftWidth: true,\n borderRightWidth: true,\n borderTopWidth: true,\n borderBottomWidth: true,\n // Text\n color: true,\n fontSize: true,\n fontWeight: true,\n lineHeight: true,\n letterSpacing: true,\n // Position\n left: true,\n right: true,\n top: true,\n bottom: true,\n // Margin\n margin: true,\n marginTop: true,\n marginBottom: true,\n marginLeft: true,\n marginRight: true,\n marginHorizontal: true,\n marginVertical: true,\n // Padding\n padding: true,\n paddingTop: true,\n paddingBottom: true,\n paddingLeft: true,\n paddingRight: true,\n paddingHorizontal: true,\n paddingVertical: true,\n // Flex/Gap\n gap: true,\n rowGap: true,\n columnGap: true,\n flex: true,\n flexGrow: true,\n flexShrink: true\n};\nconst canAnimateProperty = (key, value) => {\n if (!ANIMATABLE_PROPERTIES[key]) return false;\n if (typeof value === \"string\" && NON_ANIMATABLE_VALUE.test(value)) return false;\n return true;\n};\nconst splitAnimationStyles = (style, isDark, disableAnimation) => {\n const animated = {};\n const statics = {};\n for (const key in style) {\n const value = resolveDynamicValue(style[key], isDark);\n if (value === void 0) continue;\n if (!disableAnimation && canAnimateProperty(key, value)) {\n animated[key] = cloneAnimationValue(value);\n } else {\n statics[key] = cloneAnimationValue(value);\n }\n }\n return { animated, statics };\n};\nfunction createWebAnimatedComponent(defaultTag) {\n const isText = defaultTag === \"span\";\n const Component = Animated.createAnimatedComponent(\n createRefComponent((propsIn, ref) => {\n const { forwardedRef, render = defaultTag, ...rest } = propsIn;\n const hostRef = useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, hostRef);\n const stateRef = useRef({\n get host() {\n return hostRef.current;\n }\n });\n const [, themeState] = useThemeWithState({});\n const result = getSplitStyles(\n rest,\n isText ? Text.staticConfig : View.staticConfig,\n themeState?.theme ?? {},\n themeState?.name ?? \"\",\n { unmounted: false },\n { isAnimated: false, noClass: true }\n );\n const viewProps = result?.viewProps ?? {};\n const Element = render;\n const transformedProps = hooks.usePropsTransform?.(\n render,\n viewProps,\n stateRef,\n false\n );\n const { nativeID, ...webProps } = transformedProps ?? viewProps;\n return /* @__PURE__ */ jsx(Element, { ...webProps, ref: composedRefs });\n })\n );\n Component.acceptRenderProp = true;\n return Component;\n}\nconst AnimatedView = createWebAnimatedComponent(\"div\");\nconst AnimatedText = createWebAnimatedComponent(\"span\");\nlet animatedTextInput;\nconst defaultConfig = { type: \"spring\" };\nconst bezierEasings = /* @__PURE__ */ new Map();\nfunction bezierEasing(easing) {\n if (!bezierEasings.has(easing)) {\n const bezier = easingToBezier(easing);\n bezierEasings.set(\n easing,\n bezier ? Easing.bezier(bezier[0], bezier[1], bezier[2], bezier[3]) : void 0\n );\n }\n return bezierEasings.get(easing);\n}\nfunction entryToReanimated(entry) {\n if (entry.timing.kind === \"spring\") {\n return {\n type: \"spring\",\n stiffness: entry.timing.stiffness,\n damping: entry.timing.damping,\n mass: entry.timing.mass,\n delay: entry.delayMs || void 0\n };\n }\n return {\n type: \"timing\",\n duration: entry.timing.durationMs,\n // Easing.bezier returns a worklet, which is what withTiming wants\n easing: bezierEasing(entry.timing.easing),\n delay: entry.delayMs || void 0\n };\n}\nfunction buildTransitionConfig(transition, animations, animationState, styleKeys) {\n const resolved = forAnimationState(\n resolveTransition(transition, { animations }),\n animationState\n );\n const base = resolved.all ? entryToReanimated(resolved.all) : { ...defaultConfig };\n const propertyConfigs = {};\n for (const key of styleKeys) {\n const entry = getTransitionForKey(resolved, key);\n propertyConfigs[key] = entry ? entryToReanimated(entry) : instantConfig();\n }\n return { baseConfig: base, propertyConfigs, resolved };\n}\nconst instantConfig = () => ({ type: \"timing\", duration: 0 });\nfunction sameTransitionConfig(a, b) {\n const aKeys = Object.keys(a);\n if (aKeys.length !== Object.keys(b).length) return false;\n for (const key of aKeys) {\n if (a[key] !== b[key])\n return false;\n }\n return true;\n}\nfunction sameDriverConfig(a, b) {\n if (a.disableAnimation !== b.disableAnimation || a.isHydrating !== b.isHydrating) {\n return false;\n }\n if (!sameTransitionConfig(a.baseConfig, b.baseConfig)) return false;\n const aKeys = Object.keys(a.propertyConfigs);\n if (aKeys.length !== Object.keys(b.propertyConfigs).length) return false;\n for (const key of aKeys) {\n const other = b.propertyConfigs[key];\n if (!other || !sameTransitionConfig(a.propertyConfigs[key], other)) return false;\n }\n return true;\n}\nfunction getStyleKeys(style) {\n const keys = new Set(Object.keys(style));\n if (style.transform && Array.isArray(style.transform)) {\n for (const t of style.transform) {\n if (t && typeof t === \"object\") {\n keys.add(Object.keys(t)[0]);\n }\n }\n }\n return keys;\n}\nfunction createAnimations(animations) {\n return {\n needsCustomComponent: true,\n View: isWeb ? AnimatedView : Animated.View,\n Text: isWeb ? AnimatedText : Animated.Text,\n inputStyle: \"value\",\n outputStyle: \"inline\",\n avoidReRenders: true,\n animations,\n usePresence,\n ResetPresence,\n // binds a descendant that has no font size of its own to the ancestor's\n // animated one. no clock here: the worklet reads the ancestor's shared\n // value, so the font size and a ratio leading land on the same frame.\n useTextMetrics: ({ inheritedText, lineHeight }) => {\n const node = inheritedText?.driver === \"reanimated\" ? inheritedText.fontSize : null;\n const ratio = typeof lineHeight === \"number\" ? lineHeight : null;\n const animatedStyle = useAnimatedStyle(() => {\n \"worklet\";\n if (!node) return {};\n const fontSize = node.value;\n return ratio === null ? { fontSize } : { fontSize, lineHeight: fontSize * ratio };\n }, [node, ratio]);\n const textChannel = inheritedText ?? null;\n if (!node || !TextInputHost) return { style: null, textChannel };\n animatedTextInput ||= Animated.createAnimatedComponent(TextInputHost);\n return {\n // reanimated's animated style is an opaque handle its own hosts read,\n // not a plain object, so it does not fit the contract's Record shape.\n style: animatedStyle,\n textChannel,\n Text: isWeb ? AnimatedText : Animated.Text,\n TextInput: animatedTextInput\n };\n },\n // =========================================================================\n // useAnimatedNumber - For imperative animated values\n // =========================================================================\n useAnimatedNumber(initial) {\n const sharedValue = useSharedValue(initial);\n return useMemo(\n () => ({\n getInstance() {\n \"worklet\";\n return sharedValue;\n },\n getValue() {\n \"worklet\";\n return sharedValue.value;\n },\n setValue(next, config = { type: \"spring\" }, onFinish) {\n if (config.type === \"direct\") {\n sharedValue.value = next;\n onFinish?.();\n } else {\n const cb = onFinish ? (finished) => {\n \"worklet\";\n if (finished !== false) {\n runOnJS(onFinish)();\n }\n } : void 0;\n const animationConfig = cloneTransitionConfig(config);\n if (isWeb) {\n sharedValue.value = applyAnimation(next, animationConfig, cb);\n } else {\n runOnUI((targetValue, animationConfig2) => {\n \"worklet\";\n sharedValue.value = applyAnimation(targetValue, animationConfig2, cb);\n })(next, animationConfig);\n }\n }\n },\n stop() {\n cancelAnimation(sharedValue);\n }\n }),\n [sharedValue]\n );\n },\n // =========================================================================\n // useAnimatedNumberReaction - React to animated value changes\n // =========================================================================\n useAnimatedNumberReaction({ value }, onValue) {\n const instance = value.getInstance();\n return useAnimatedReaction(\n () => instance.value,\n (next, prev) => {\n if (prev !== next) {\n runOnJS(onValue)(next);\n }\n },\n [onValue, instance]\n );\n },\n // =========================================================================\n // useAnimatedNumberStyle - Create animated styles from values\n // =========================================================================\n useAnimatedNumberStyle(val, getStyle) {\n const instance = val.getInstance();\n if (isWeb) {\n return useAnimatedStyle(() => {\n \"worklet\";\n return getStyle(instance.value);\n }, [instance, getStyle]);\n }\n const styleVal = useDerivedValue(() => {\n \"worklet\";\n return getStyle(instance.value);\n });\n const animatedStyle = useAnimatedStyle(() => {\n \"worklet\";\n return styleVal.value;\n });\n silenceAnimatedComponentDevCheck(animatedStyle);\n return animatedStyle;\n },\n useAnimatedNumbersStyle(vals, getStyle) {\n const instances = vals.map((v) => v.getInstance());\n const animatedStyle = useAnimatedStyle(\n () => {\n \"worklet\";\n const currentValues = instances.map((inst) => inst.value);\n return getStyle(...currentValues);\n },\n isWeb ? [getStyle, ...instances] : void 0\n );\n silenceAnimatedComponentDevCheck(animatedStyle);\n return animatedStyle;\n },\n // =========================================================================\n // useAnimations - Main animation hook for components\n // =========================================================================\n useAnimations(animationProps) {\n const {\n props,\n presence,\n style,\n componentState,\n useStyleEmitter,\n themeName,\n stateRef,\n styleState,\n onTransition,\n inheritedText\n } = animationProps;\n const isHydrating = componentState.unmounted === true;\n const isMounting = componentState.unmounted === \"should-enter\";\n const isEntering = !!componentState.unmounted;\n const isExiting = presence?.[0] === false;\n const wasEnteringRef = useRef(isEntering);\n const justFinishedEntering = wasEnteringRef.current && !isEntering;\n React.useEffect(() => {\n wasEnteringRef.current = isEntering;\n });\n const effectiveTransition = styleState?.effectiveTransition ?? props.transition;\n const leadingRatio = getLeadingRatio(styleState?.nativeTextMetrics);\n const animationState = isExiting ? \"exit\" : isMounting || justFinishedEntering ? \"enter\" : \"default\";\n const resolvedTransition = forAnimationState(\n resolveTransition(effectiveTransition, {\n animations\n }),\n animationState\n );\n const disableAnimation = isHydrating || !hasTransition(resolvedTransition);\n const fontSizeShared = useSharedValue(\n typeof style.fontSize === \"number\" ? style.fontSize : 0\n );\n const publishesFontSize = !disableAnimation && typeof style.fontSize === \"number\";\n const ownTextChannel = useMemo(\n () => ({ fontSize: fontSizeShared, driver: \"reanimated\" }),\n [fontSizeShared]\n );\n const inheritedFontSize = leadingRatio !== void 0 && typeof style.fontSize !== \"number\" && inheritedText?.driver === \"reanimated\" ? inheritedText.fontSize : null;\n const leadingFontSize = inheritedFontSize ?? fontSizeShared;\n const leadingRatioShared = useSharedValue(leadingRatio ?? 0);\n const paintedRatioRef = useRef(leadingRatio);\n const applyLeadingRatio = (ratio, config) => {\n const previous = paintedRatioRef.current;\n if (previous === ratio) return;\n paintedRatioRef.current = ratio;\n if (ratio === void 0) return;\n leadingRatioShared.value = previous === void 0 || disableAnimation ? ratio : applyAnimation(ratio, config);\n };\n const isDark = themeName?.startsWith(\"dark\") || false;\n const sendExitComplete = presence?.[1];\n const onTransitionRef = useRef(onTransition);\n onTransitionRef.current = onTransition;\n const emit = (phase, cause, finished) => {\n onTransitionRef.current?.(\n phase === \"end\" ? { phase, cause, finished } : { phase, cause }\n );\n };\n const enterStartedRef = useRef(false);\n const exitStartedRef = useRef(false);\n const updateStartedRef = useRef(false);\n const isExitingJSRef = useRef(false);\n isExitingJSRef.current = isExiting;\n const updateCycleIdRef = useRef(0);\n const pendingUpdateKeysRef = useRef(/* @__PURE__ */ new Set());\n const updateCompletedRef = useRef(false);\n const isCompletingUpdateRef = useSharedValue(false);\n const updateCycleIdShared = useSharedValue(0);\n const updateInterruptedRef = useRef(false);\n const markUpdateKeyDone = useEvent(\n (key, cycleId, finished) => {\n if (cycleId !== updateCycleIdRef.current) return;\n if (updateCompletedRef.current) return;\n if (!finished) updateInterruptedRef.current = true;\n pendingUpdateKeysRef.current.delete(key);\n if (pendingUpdateKeysRef.current.size === 0) {\n updateCompletedRef.current = true;\n isCompletingUpdateRef.value = false;\n if (updateStartedRef.current) {\n updateStartedRef.current = false;\n emit(\"end\", \"update\", !updateInterruptedRef.current);\n }\n }\n }\n );\n const exitCycleIdRef = useRef(0);\n const pendingExitKeysRef = useRef(/* @__PURE__ */ new Set());\n const exitCompletedRef = useRef(false);\n const wasExitingRef = useRef(false);\n const justStartedExiting = isExiting && !wasExitingRef.current;\n const justStoppedExiting = !isExiting && wasExitingRef.current;\n const markExitKeyDone = useEvent(\n (key, cycleId, finished) => {\n if (cycleId !== exitCycleIdRef.current) return;\n if (exitCompletedRef.current) return;\n pendingExitKeysRef.current.delete(key);\n if (pendingExitKeysRef.current.size === 0) {\n exitCompletedRef.current = true;\n if (exitStartedRef.current) {\n exitStartedRef.current = false;\n emit(\"end\", \"exit\", true);\n }\n sendExitComplete?.();\n }\n }\n );\n const enterCycleIdRef = useRef(0);\n const pendingEnterKeysRef = useRef(/* @__PURE__ */ new Set());\n const enterCompletedRef = useRef(false);\n const markEnterKeyDone = useEvent((key, cycleId) => {\n if (cycleId !== enterCycleIdRef.current) return;\n if (enterCompletedRef.current) return;\n if (isExitingJSRef.current) return;\n pendingEnterKeysRef.current.delete(key);\n if (pendingEnterKeysRef.current.size === 0) {\n enterCompletedRef.current = true;\n if (enterStartedRef.current) {\n enterStartedRef.current = false;\n emit(\"end\", \"enter\", true);\n }\n }\n });\n const isExitingRef = useSharedValue(isExiting);\n const exitCycleIdShared = useSharedValue(exitCycleIdRef.current);\n const isCompletingEnterRef = useSharedValue(false);\n const enterCycleIdShared = useSharedValue(enterCycleIdRef.current);\n if (justStartedExiting) {\n exitCycleIdRef.current++;\n exitCompletedRef.current = false;\n pendingExitKeysRef.current.clear();\n enterCycleIdRef.current++;\n pendingEnterKeysRef.current.clear();\n updateCycleIdRef.current++;\n pendingUpdateKeysRef.current.clear();\n updateCompletedRef.current = true;\n }\n if (justStoppedExiting) {\n exitCycleIdRef.current++;\n pendingExitKeysRef.current.clear();\n }\n useIsomorphicLayoutEffect(() => {\n isExitingRef.value = isExiting;\n exitCycleIdShared.value = exitCycleIdRef.current;\n isCompletingEnterRef.value = !isExiting && justFinishedEntering && Boolean(onTransitionRef.current);\n enterCycleIdShared.value = enterCycleIdRef.current;\n if (justStartedExiting) {\n isCompletingUpdateRef.value = false;\n updateCycleIdShared.value = updateCycleIdRef.current;\n }\n }, [\n isExiting,\n justFinishedEntering,\n exitCycleIdRef.current,\n enterCycleIdRef.current,\n justStartedExiting\n ]);\n useIsomorphicLayoutEffect(() => {\n if (justStoppedExiting && exitStartedRef.current && !exitCompletedRef.current) {\n exitStartedRef.current = false;\n emit(\"end\", \"exit\", false);\n }\n }, [justStoppedExiting]);\n React.useEffect(() => {\n wasExitingRef.current = isExiting;\n });\n const committedRenderKeysRef = useRef(/* @__PURE__ */ new Set());\n const lastPaintedRef = useRef({});\n const carryRef = useRef({});\n const exitSeedRef = useRef(null);\n const paintedPredecessor = isExiting ? exitSeedRef.current ?? lastPaintedRef.current : lastPaintedRef.current;\n useIsomorphicLayoutEffect(() => {\n exitSeedRef.current = isExiting ? paintedPredecessor : null;\n }, [isExiting, paintedPredecessor]);\n const { animatedStyles, staticStyles, nextCarry } = useMemo(() => {\n const { animated, statics } = splitAnimationStyles(\n style,\n isDark,\n disableAnimation\n );\n if (isExiting && animated.transform) {\n const remaining = getAnimatedTransforms(animated.transform).map(\n cloneStyleRecord\n );\n const previous = getAnimatedTransforms(paintedPredecessor.transform);\n if (previous.length) {\n animated.transform = previous.map((entry) => {\n const key = Object.keys(entry)[0];\n const index = remaining.findIndex((target) => key in target);\n return index < 0 ? cloneStyleRecord(entry) : remaining.splice(index, 1)[0];\n }).concat(remaining);\n }\n }\n const nextCarry2 = cloneStyleRecord(carryRef.current);\n for (const key in nextCarry2) {\n if (!(key in animated)) delete nextCarry2[key];\n }\n for (const key in animated) {\n if (!(key in nextCarry2)) {\n const target = animated[key];\n if (isExiting && key === \"transform\") {\n nextCarry2[key] = getAnimatedTransforms(target).map((transform) => {\n const initial = cloneStyleRecord(transform);\n for (const part in initial) {\n const value = initial[part];\n if (typeof value === \"number\" || typeof value === \"string\") {\n initial[part] = paintedPredecessor[`transform:${part}`] ?? getImplicitDefault(part, value);\n }\n }\n return initial;\n });\n } else {\n nextCarry2[key] = cloneAnimationValue(\n isExiting && (typeof target === \"number\" || typeof target === \"string\") ? paintedPredecessor[key] ?? getImplicitDefault(key, target) : target\n );\n }\n }\n statics[key] = nextCarry2[key];\n }\n return { animatedStyles: animated, staticStyles: statics, nextCarry: nextCarry2 };\n }, [\n disableAnimation,\n style,\n isDark,\n isExiting,\n isExiting ? paintedPredecessor : null\n ]);\n const derivesLeading = derivesLeadingProduct(\n animatedStyles,\n leadingRatio,\n !!inheritedFontSize,\n resolvedTransition\n );\n const renderSnapshot = useMemo(\n () => buildSnapshot(\n animatedStyles,\n staticStyles,\n getAnimatedTransforms(animatedStyles.transform),\n committedRenderKeysRef.current,\n paintedPredecessor,\n derivesLeading\n ),\n [\n animatedStyles,\n staticStyles,\n isExiting ? paintedPredecessor : null,\n derivesLeading\n ]\n );\n const renderSnapshotRef = useSharedValue({\n animated: {},\n statics: {},\n transforms: [],\n gatedKeys: {},\n derivesLeading: false,\n seeds: {},\n removedKeys: {},\n removeTransform: false,\n clearValue: isWeb ? \"\" : null\n });\n const emitterSnapshotRef = useSharedValue(null);\n const emitterKeysRef = useRef(null);\n useIsomorphicLayoutEffect(() => {\n carryRef.current = nextCarry;\n committedRenderKeysRef.current = renderSnapshot.keys;\n lastPaintedRef.current = renderSnapshot.painted;\n }, [nextCarry, renderSnapshot]);\n const pseudoActiveRef = useRef(false);\n const publishedSnapshotRef = useRef(null);\n useIsomorphicLayoutEffect(() => {\n const renderChanged = publishedSnapshotRef.current !== renderSnapshot.value;\n const droppingLatch = (isExiting || !pseudoActiveRef.current && publishedSnapshotRef.current !== null && renderChanged) && emitterSnapshotRef.value !== null;\n const emitterKeys = droppingLatch ? emitterKeysRef.current : null;\n if (droppingLatch || renderChanged) {\n const removedKeys = emitterKeys ? {\n ...renderSnapshot.value.removedKeys,\n ...getRemovedAnimatedKeys(renderSnapshot.keys, emitterKeys)\n } : renderSnapshot.value.removedKeys;\n renderSnapshotRef.value = {\n ...renderSnapshot.value,\n removedKeys,\n removeTransform: Object.keys(removedKeys).some(\n (key) => key.startsWith(\"transform:\")\n )\n };\n publishedSnapshotRef.current = renderSnapshot.value;\n }\n if (droppingLatch) {\n emitterSnapshotRef.value = null;\n emitterKeysRef.current = null;\n }\n });\n const { baseConfig, propertyConfigs } = useMemo(() => {\n if (isHydrating) {\n return {\n baseConfig: { type: \"timing\", duration: 0 },\n propertyConfigs: {}\n };\n }\n return buildTransitionConfig(\n effectiveTransition,\n animations,\n animationState,\n getStyleKeys(animatedStyles)\n );\n }, [isHydrating, effectiveTransition, animatedStyles, animationState]);\n const renderConfig = {\n baseConfig,\n propertyConfigs,\n disableAnimation,\n isHydrating\n };\n const configRef = useSharedValue(renderConfig);\n const writtenConfigRef = useRef(renderConfig);\n const writeConfig = (next) => {\n if (sameDriverConfig(writtenConfigRef.current, next)) return;\n writtenConfigRef.current = next;\n configRef.value = next;\n };\n useIsomorphicLayoutEffect(() => {\n writeConfig(renderConfig);\n }, [baseConfig, propertyConfigs, disableAnimation, isHydrating]);\n useIsomorphicLayoutEffect(() => {\n if (emitterSnapshotRef.value !== null) return;\n applyLeadingRatio(leadingRatio, propertyConfigs.lineHeight ?? baseConfig);\n });\n const onEmittedStyle = (nextStyle, effectiveTransition2, pseudoActive, nextMetrics) => {\n if (isExitingJSRef.current) return;\n pseudoActiveRef.current = pseudoActive === true;\n const transitionToUse = effectiveTransition2 ?? props.transition;\n const emittedLeadingRatio = getLeadingRatio(nextMetrics);\n const {\n baseConfig: newBase,\n propertyConfigs: newPropertyConfigs,\n resolved: emittedResolved\n } = buildTransitionConfig(\n transitionToUse,\n animations,\n animationState,\n getStyleKeys(nextStyle)\n );\n const written = writtenConfigRef.current;\n writeConfig({\n baseConfig: newBase,\n propertyConfigs: newPropertyConfigs,\n disableAnimation: written.disableAnimation,\n isHydrating: written.isHydrating\n });\n const previousKeys = emitterKeysRef.current ?? committedRenderKeysRef.current;\n const { animated, statics } = splitAnimationStyles(\n nextStyle,\n isDark,\n written.disableAnimation\n );\n const emittedDerivesLeading = derivesLeadingProduct(\n animated,\n emittedLeadingRatio,\n !!inheritedFontSize,\n emittedResolved\n );\n applyLeadingRatio(emittedLeadingRatio, newPropertyConfigs.lineHeight ?? newBase);\n const snapshot = buildSnapshot(\n animated,\n statics,\n getAnimatedTransforms(animated.transform),\n previousKeys,\n lastPaintedRef.current,\n emittedDerivesLeading\n );\n emitterSnapshotRef.value = snapshot.value;\n emitterKeysRef.current = snapshot.keys;\n lastPaintedRef.current = snapshot.painted;\n if (process.env.NODE_ENV === \"development\" && props.debug && props.debug !== \"profile\") {\n console.info(\"[animations-reanimated] useStyleEmitter update\", {\n animated,\n statics,\n transforms: snapshot.value.transforms\n });\n }\n };\n useStyleEmitter?.(onEmittedStyle);\n const exitKeysRegistered = useRef(false);\n const enterKeysRegistered = useRef(false);\n if (!isExiting && justFinishedEntering && onTransition) {\n const enterKeys = getGatedKeys(renderSnapshot.value);\n enterCycleIdRef.current++;\n enterCompletedRef.current = false;\n pendingEnterKeysRef.current = new Set(enterKeys);\n enterKeysRegistered.current = enterKeys.length > 0;\n }\n if (justStartedExiting && sendExitComplete) {\n const exitKeys = getGatedKeys(renderSnapshot.value);\n pendingExitKeysRef.current = new Set(exitKeys);\n exitKeysRegistered.current = exitKeys.length > 0;\n }\n const previousUpdateStyleRef = useRef(null);\n const updateStyle = onTransition ? JSON.stringify(style) : null;\n const previousUpdateStyle = previousUpdateStyleRef.current;\n const shouldRegisterUpdate = updateStyle !== null && previousUpdateStyle !== null && previousUpdateStyle !== updateStyle && !isExiting && !isEntering && !justFinishedEntering;\n const updateKeys = shouldRegisterUpdate ? getGatedKeys(renderSnapshot.value) : [];\n useIsomorphicLayoutEffect(() => {\n if (updateStyle === null) {\n previousUpdateStyleRef.current = null;\n isCompletingUpdateRef.value = false;\n return;\n }\n const previousStyleStillCurrent = previousUpdateStyleRef.current === previousUpdateStyle;\n previousUpdateStyleRef.current = updateStyle;\n if (!shouldRegisterUpdate || !previousStyleStillCurrent) return;\n const cycleId = ++updateCycleIdRef.current;\n pendingUpdateKeysRef.current = new Set(updateKeys);\n updateInterruptedRef.current = false;\n updateCompletedRef.current = updateKeys.length === 0;\n isCompletingUpdateRef.value = updateKeys.length > 0;\n updateCycleIdShared.value = cycleId;\n if (updateStartedRef.current) {\n emit(\"end\", \"update\", false);\n }\n updateStartedRef.current = true;\n emit(\"start\", \"update\");\n if (updateKeys.length === 0) {\n updateStartedRef.current = false;\n emit(\"end\", \"update\", true);\n }\n }, [updateStyle, shouldRegisterUpdate]);\n React.useEffect(() => {\n if (!justStartedExiting || !sendExitComplete) return;\n if (enterStartedRef.current) {\n enterStartedRef.current = false;\n emit(\"end\", \"enter\", false);\n }\n if (updateStartedRef.current) {\n updateStartedRef.current = false;\n emit(\"end\", \"update\", false);\n }\n if (onTransitionRef.current && !exitStartedRef.current) {\n exitStartedRef.current = true;\n emit(\"start\", \"exit\");\n }\n if (!exitKeysRegistered.current && pendingExitKeysRef.current.size === 0) {\n if (!exitCompletedRef.current) {\n exitCompletedRef.current = true;\n if (exitStartedRef.current) {\n exitStartedRef.current = false;\n emit(\"end\", \"exit\", true);\n }\n sendExitComplete();\n }\n }\n }, [justStartedExiting, sendExitComplete]);\n React.useEffect(() => {\n if (isExiting || !justFinishedEntering || !onTransition) return;\n if (!enterStartedRef.current) {\n enterStartedRef.current = true;\n emit(\"start\", \"enter\");\n }\n if (!enterKeysRegistered.current && pendingEnterKeysRef.current.size === 0) {\n if (!enterCompletedRef.current) {\n enterCompletedRef.current = true;\n if (enterStartedRef.current) {\n enterStartedRef.current = false;\n emit(\"end\", \"enter\", true);\n }\n }\n }\n }, [isExiting, justFinishedEntering, onTransition]);\n const mapperStateRef = useSharedValue({\n emitted: {},\n ownedStatics: {}\n });\n const animatedStyle = useAnimatedStyle(\n () => {\n \"worklet\";\n const mapperState = mapperStateRef.value;\n const config = configRef.value;\n if (config.disableAnimation || config.isHydrating) {\n updateMapperState(mapperStateRef, {}, {});\n return {};\n }\n const previouslyEmitted = mapperState.emitted;\n const emitted = {};\n const previouslyOwned = mapperState.ownedStatics;\n const ownedStatics = {};\n const result = {};\n const emitterSnapshot = emitterSnapshotRef.value;\n const snapshot = emitterSnapshot ?? renderSnapshotRef.value;\n const animatedValues = snapshot.animated;\n const staticValues = snapshot.statics;\n const currentlyExiting = isExitingRef.value;\n const currentCycleId = exitCycleIdShared.value;\n const currentlyCompletingEnter = isCompletingEnterRef.value;\n const currentEnterCycleId = enterCycleIdShared.value;\n const currentlyCompletingUpdate = isCompletingUpdateRef.value;\n const currentUpdateCycleId = updateCycleIdShared.value;\n for (const key in staticValues) {\n if (!emitterSnapshot && !previouslyOwned[key]) continue;\n ownedStatics[key] = true;\n result[key] = staticValues[key];\n }\n for (const key in snapshot.removedKeys) {\n if (!key.startsWith(\"transform:\") && !(key in staticValues)) {\n if (snapshot.clearValue === null && (key === \"color\" || key.endsWith(\"Color\"))) {\n if (key !== \"color\") result[key] = \"transparent\";\n } else {\n result[key] = snapshot.clearValue;\n }\n }\n }\n for (const key in animatedValues) {\n if (key === \"transform\") continue;\n const targetValue = animatedValues[key];\n emitted[key] = true;\n if (key === \"lineHeight\" && snapshot.derivesLeading) continue;\n if (typeof targetValue !== \"number\" && typeof targetValue !== \"string\") {\n result[key] = targetValue;\n continue;\n }\n result[key] = animateSnapshotValue(\n key,\n key,\n targetValue,\n config.propertyConfigs[key] ?? config.baseConfig,\n !!previouslyEmitted[key],\n snapshot.seeds[key],\n !!snapshot.gatedKeys[key],\n currentlyExiting,\n currentCycleId,\n currentlyCompletingEnter,\n currentEnterCycleId,\n currentlyCompletingUpdate,\n currentUpdateCycleId,\n markExitKeyDone,\n markEnterKeyDone,\n markUpdateKeyDone,\n !!COLOR_STYLE_KEYS[key],\n key === \"fontSize\" ? fontSizeShared : void 0\n );\n }\n if (snapshot.derivesLeading) {\n emitted.lineHeight = true;\n result.lineHeight = leadingFontSize.value * leadingRatioShared.value;\n }\n const transforms = snapshot.transforms;\n if (transforms.length > 0 || snapshot.removeTransform) {\n const validTransforms = [];\n for (const t of transforms) {\n if (!t) continue;\n const keys = Object.keys(t);\n if (keys.length === 0) continue;\n const transformKey = keys[0];\n const value = t[transformKey];\n if (typeof value === \"number\" || typeof value === \"string\") {\n const propConfig = config.propertyConfigs[transformKey] ?? config.baseConfig;\n const subKey = `transform:${transformKey}`;\n emitted[subKey] = true;\n validTransforms.push({\n [transformKey]: animateSnapshotValue(\n subKey,\n transformKey,\n value,\n propConfig,\n !!previouslyEmitted[subKey],\n snapshot.seeds[subKey],\n !!snapshot.gatedKeys[subKey],\n currentlyExiting,\n currentCycleId,\n currentlyCompletingEnter,\n currentEnterCycleId,\n currentlyCompletingUpdate,\n currentUpdateCycleId,\n markExitKeyDone,\n markEnterKeyDone,\n markUpdateKeyDone\n )\n });\n } else {\n validTransforms.push(t);\n }\n }\n if (validTransforms.length > 0 || !(\"transform\" in staticValues)) {\n result.transform = validTransforms;\n }\n }\n updateMapperState(mapperStateRef, emitted, ownedStatics);\n return result;\n },\n isWeb ? [\n // pass SharedValues so the stable mapper watches them on web (no babel plugin)\n renderSnapshotRef,\n emitterSnapshotRef,\n configRef,\n isExitingRef,\n exitCycleIdShared,\n markExitKeyDone,\n isCompletingEnterRef,\n enterCycleIdShared,\n markEnterKeyDone,\n isCompletingUpdateRef,\n updateCycleIdShared,\n markUpdateKeyDone,\n fontSizeShared,\n leadingRatioShared,\n inheritedFontSize\n ] : void 0\n );\n silenceAnimatedComponentDevCheck(animatedStyle);\n if (process.env.NODE_ENV === \"development\" && props.debug && props.debug !== \"profile\") {\n console.info(\"[animations-reanimated] useAnimations\", {\n resolvedTransition,\n componentState,\n isExiting,\n animatedStyles,\n staticStyles,\n baseConfig,\n propertyConfigs\n });\n }\n return {\n style: [staticStyles, animatedStyle],\n // what descendants inherit: this node's mirror when it owns a font size\n // that moves, nothing when it owns one that does not (react-native\n // inherits that statically), otherwise what it inherited itself\n textChannel: publishesFontSize ? ownTextChannel : typeof style.fontSize === \"number\" ? null : inheritedText ?? null\n };\n }\n };\n}\nexport {\n createAnimations\n};\n//# sourceMappingURL=createAnimations.js.map\n"],"mappings":";;;;;;;;;;;AAqCA,MAAM,uBAAuB;AAC7B,MAAM,oBAAoB,WAAW;CACnC,MAAM,MAAM;CACZ,IAAI,IAAI,cAAc,IAAI,OAAO,iBAAiB,UAAU;EAC1D,OAAO,IAAI,WAAW;CACxB;CACA,OAAO;AACT;AACA,MAAM,WAAW,iBAAiB,SAAS;AAC3C,MAAM,oCAAoC,UAAU;CAClD,IAAI,QAAQ,IAAI,aAAa,iBAAiB,SAAS,CAAC,SAAS,OAAO,UAAU,UAAU;EAC1F;CACF;CACA,OAAO,eAAe,OAAO,8BAA8B;EACzD,cAAc;EACd,YAAY;EACZ,OAAO;CACT,CAAC;AACH;AACA,MAAM,uBAAuB,OAAO,WAAW;CAC7C,IAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,aAAa,SAAS,OAAO,MAAM,YAAY,UAAU;EAC1G,MAAM,UAAU,MAAM;EACtB,OAAO,SAAS,QAAQ,OAAO,QAAQ;CACzC;CACA,OAAO;AACT;AACA,MAAM,oBAAoB,SAAS,OAAO,SAAS,iBAAiB;CAClE,MAAM,MAAM,UAAU;CACtB,MAAM,MAAM,eAAe;AAC7B,KAAK,OAAO,SAAS,iBAAiB;CACpC;CACA,IAAI,CAAC,WAAW,UAAU;CAC1B,MAAM,QAAQ,YAAY;EACxB,QAAQ,UAAU;EAClB,QAAQ,eAAe;EACvB,OAAO;CACT,GAAG,KAAK;AACV;AACA,MAAM,uBAAuB,UAAU;CACrC,IAAI,MAAM,QAAQ,KAAK,GAAG;EACxB,OAAO,MAAM,IAAI,mBAAmB;CACtC;CACA,IAAI,SAAS,OAAO,UAAU,UAAU;EACtC,MAAM,OAAO,CAAC;EACd,KAAK,MAAM,OAAO,OAAO;GACvB,KAAK,OAAO,oBAAoB,MAAM,IAAI;EAC5C;E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;MACvB,MAAM,eAAe,KAAK;MAC1B,MAAM,QAAQ,EAAE;MAChB,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU;OAC1D,MAAM,aAAa,OAAO,gBAAgB,iBAAiB,OAAO;OAClE,MAAM,SAAS,aAAa;OAC5B,QAAQ,UAAU;OAClB,gBAAgB,KAAK,GAClB,eAAe,qBACd,QACA,cACA,OACA,YACA,CAAC,CAAC,kBAAkB,SACpB,SAAS,MAAM,SACf,CAAC,CAAC,SAAS,UAAU,SACrB,kBACA,gBACA,0BACA,qBACA,2BACA,sBACA,iBACA,kBACA,iBACF,EACF,CAAC;MACH,OAAO;OACL,gBAAgB,KAAK,CAAC;MACxB;KACF;KACA,IAAI,gBAAgB,SAAS,KAAK,EAAE,eAAe,eAAe;MAChE,OAAO,YAAY;KACrB;IACF;IACA,kBAAkB,gBAAgB,SAAS,YAAY;IACvD,OAAO;GACT,GACA,QAAQ;IAEN;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF,IAAI,KAAK,CACX;GACA,iCAAiC,aAAa;GAC9C,IAAI,QAAQ,IAAI,aAAa,iBAAiB,MAAM,SAAS,MAAM,UAAU,WAAW;IACtF,QAAQ,KAAK,yCAAyC;KACpD;KACA;KACA;KACA;KACA;KACA;KACA;IACF,CAAC;GACH;GACA,OAAO;IACL,OAAO,CAAC,cAAc,aAAa;IAInC,aAAa,oBAAoB,iBAAiB,OAAO,MAAM,aAAa,WAAW,OAAO,iBAAiB;GACjH;EACF;CACF;AACF"}
@@ -1284,7 +1284,11 @@ function createAnimations(animations) {
1284
1284
  }
1285
1285
  for (var key1 in snapshot.removedKeys) {
1286
1286
  if (!key1.startsWith("transform:") && !(key1 in staticValues)) {
1287
- result[key1] = snapshot.clearValue;
1287
+ if (snapshot.clearValue === null && (key1 === "color" || key1.endsWith("Color"))) {
1288
+ if (key1 !== "color") result[key1] = "transparent";
1289
+ } else {
1290
+ result[key1] = snapshot.clearValue;
1291
+ }
1288
1292
  }
1289
1293
  }
1290
1294
  for (var key2 in animatedValues) {