Melt butter in a medium sized saucepan over medium-high heat. Add onions and cook for 2-3 minutes, until they start to soften. Add sugar, thyme, salt, and pepper. Continue to cook for about 10 minutes, until onions start to brown. Lower heat and stir in balsamic vinegar, cooking for about 1 more minute.
Transfer onion mixture to food processor and pulse until mixture is almost smooth. Let cool.
Meanwhile, divide puff pastry in half and roll out each half into about an 8 inch round. Use a plate or other circular object to trace out a perfect 8 inch circle. Discard scraps.
Place one piece of puff pastry onto baking sheet. Spread a thin layer or ricotta cheese on top, stopping about ½-1 inch from the edges. Spread onion mixture on top, and then sprinkle Parmesan cheese on top of that.
With your finger, dab a little water around the edges and place remaining dough on top. Gently work your way around the edge, pinching the two pieces of dough together.
Using a 1½ inch cookie cutter or champagne class, make a small indentation in the center of the tart, taking care to not push all the way through. Using a sharp knife, cut four lines from the outside of your circle to the edge of the dough, dividing the circle into quarters (imagine you’re making North, East, South, and West marks). Make another set of cuts to divide each of the quarters in two. Then repeat again, so you end up with 16 sections in your tart, all stemming from the center circle.
If dough is too soft, pop it in the freezer for 10-15 minutes to firm up. Then, starting at the center, gently twist the dough to form tendrils.
Dilute egg yolk with a drop of water and whisk. Brush top of tarte with egg wash, then sprinkle some more Parmesan and thyme if desired. Bake for 32-38 minutes, until pastry has puffed and top is golden brown. Remove from oven and cool slightly before serving.