Preheat the oven to 225℃ (437℉) fan.
Roll out the puff pastry on top of the sheet it comes with, or on parchment paper.
Sprinkle about half the sugar evenly over the entire pastry sheet.
Use the rolling pin to roll the sugar into the dough.
Fold the top and bottom of the puff pastry towards the middle.
Top both sides with half of the remaining sugar.
Roll the sugar into the dough.
Fold from the top and bottom towards the middle again, top with the last of the sugar, and roll it into the dough.
Slice the log into 1 cm thick cookies (about ¼ inch).
Arrange the cookies so they look like pointy hearts on a lined baking sheet. Pinch the bottom to make them pointy. This will help them bake into hearts.
You'll want to space them out (I had 12 on each tray).
Bake for 6 minutes, then turn the cookies over and bake for 4-5 minutes more until golden.
Repeat with the second tray and allow the cookie to cool.
Melt the dark chocolate, then pour it into a piping bag or a piping utensil.
Pipe a 1-2 cm-wide chocolate outline of a heart on parchment paper, the same size as the cookies (but wide enough to see the chocolate).
Place a cookie on top, then repeat the process with the remaining cookies.
Sprinkle the chocolate heart outline with flaky sea salt and allow to set.
Serve.