Hello, my name isXXXXX and I have over 20 years of experience as a veterinarian. I am sorry to hear that your kitty Midnight isn't feeling well and is vomiting foam.
She may have gotten into something that has irritated her stomach. The frothy liquid is likely stomach mucous that mixed with air when she vomited. This will often happen when a cat vomits on an empty stomach or after several vomiting episodes.
At home today to try and settle her stomach you can give either:
1) Pepcid ac (famotidine) at ¼ of a 10mg tablet per 5 to 10 pounds of body weight every 12 hours
2) Prilosec (omeprazole) at ¼ of a 10mg tablet per 5 to 10 pounds of body weight every 24 hours
These are acid reducers and should help her feel better by settling her stomach. They can be used for several days if need be as they are quite safe.
I would pick up all food for 24 hours and water for a couple hours to allow her stomach to settle. When you give her water make sure it is in small amounts only. If she drinks too much too quickly that can lead to vomiting.
Tomorrow offer a bland diet of 2/3 boiled minced white skinless chicken and 1/3 boiled white rice mixed with some low salt chicken broth to make it easy to lap up and swallow. If she refuses that you can offer a little meat baby food.
If things go well feed her the bland diet for 2 to 3 days then slowly start to mix back in her regular food, a little more at each meal. It should take about 5 to 7 days to slowly convert her back to her regular diet.
If she continues vomit or if she refuses to eat she should see her veterinarian for an examination, diagnostics, injectable anti-nausea drugs intravenous fluids and supportive care.
More serious causes of vomiting include chronic pancreatitis, esophageal reflux, a dietary allergy or sensitivity, inflammatory bowel disease, heartworm disease, internal organ failure, hyperthyroidism, a full or partial gastrointestinal obstruction oreven infiltrative cancers such as lymphoma.
Best of luck with your girl, please let me know if you have any further questions.