(I work at Notion)
TipTap came out after Notion slash commands so I’m pretty sure they were inspired by Notion - there are a lot of open source packages implementing Notion UI patterns these days :)
Notion and Affine are actually both custom contenteditable codebases, neither use TipTap/Prosemirror or any other off the shelf framework for rich text editing. Affine implemented their editor using web components which I found interesting. However going your own way an be bumpy, last time I reviewed their code it didn’t work well on iOS; these days the website doesn’t let you view the editor unless you’re on desktop but maybe they fixed it.
My advice to anyone who wants to do rich text editors is: use ProseMirror (TipTap or anything on top seems fine too), DO NOT use Slate. Slate doesn’t work well on Android!!