Hello! Please remember that my response is for information only, we are not establishing a therapeutic relationship.
I agree that what your daughter said was disrespectful, however, it also sounds like your comments triggered an immediate and strong emotional reaction in her. The stronger our emotions are, the harder it is to think clearly, and the more likely someone is to act inappropriately. Part of maturing is to learn how to not blurt such things out when we get triggered, although I certainly work with plenty of adults who don't know how to handle their intense emotions yet.
The most important thing for you to do is not get emotional back, but to stay calm, matter-of-fact when things like this happens, no matter what you are feeling inside! If you get emotional and angry too, it will not help her to learn appropriate boundaries.
So, I would have said (if I didn't get triggered, ha) something like, "Stop what you are doing and sit down. It is not OK for you to tell me to get out of your room. I will be in the kitchen. As soon as you calm down come out we can talk about this."
After she calmed down I would say something like, "I see that what I said made you angry, but you cannot react like you did
(telling me to leave your room, "no negativity in your room). I would like to hear about what made you angry. If you can tell me now without telling me what I can and cannot do, I'm ready to listen."
That's how I would handle it, but different children bring unique challenges. If you'd like tell me what problems you might encounter doing something like this and maybe we can tweak it a bit.
But here are the main points:
1. Calmness, no emotion on your part
2. Stop the interaction immediately (sitting down for just a minute often works)
3. State the boundary clearly
4. Help her appropriately express herself