The second sentence is fine and I was able to read it smoothly as one complete thought. The first sentence, while very complex and technically not flawed, is very difficult to read. Because of the extra punctuation in the middle of the sentence, I expected the sentence to end there, and when it didn't, it became difficult to continue to read it as a complete thought. If you want to stick with a single sentence, it would be wise to give the reader a hint at the beginning that the sentence will continue. Note this change:
As Alice was just beginning to think to herself, ‘Now, what
am I to do with this creature when I get it home?’
it grunted again so violently that she looked down into
its face in some alarm.
By making the first part a subordinate clause, the reader is expecting the second half to be there, and it can be read easily.