compersion

1. The feeling of joy one has experiencing another's joy, such as in witnessing a toddler's joy and feeling joy in response.

2. The feeling of vicarious joy associated with seeing one's sexual or romantic partner having another sexual or romantic relation that brings them joy, coined as antonym of (sexual or romantic) jealousy.

3. The joy produced by knowing of something, unrelated to oneself, that brings a loved one joy.

https://en.wiktionary.org/wiki/compersion