Caveat: I will speak only about the show since all of this relies on the circumstances which haven't happened in the books.
Option 1: The great line of Nymeria
In general, Dornish law dictates inheritance follow the Absolute Primogeniture, meaning that any eldest child inherits (regardless of gender), followed by the eldest child's descendants, etc. This has been a practice held up by the descendants of Nymeria (those called 'Nymeria' or 'Nymeros').
However, given that all of the 'trueborn' members of House Martell have been killed, it will come down to the 'baseborn' members of the family to pick up the mantle.
In fact, not all of the Sand Snakes are dead, there still survives a few of Oberyn Martell's 'bastards', who in Dorne have rights to inheritance without needing to be naturalised or legitimised. Of those, the surviving Sand Snakes are:
- Sarella Sand, the fourth Sand Snake, mothered by a Summer Islander ship captain.
- Elia Sand, the fifth Sand Snake, mothered by Ellaria Sand, named after Oberyn's late sister.
- Obella Sand, the sixth Sand Snake, mothered by Ellaria Sand.
- Dorea Sand, the seventh Sand Snake, mothered by Ellaria Sand.
- Loreza Sand, the eighth Sand Snake, mothered by Ellaria Sand.
Option two: Whomever Cersei decides to place in or allow to take command there
However, in this case given that Ellaria and the Sand Snakes took the rule of Dorne over by force, this muddies the waters a bit.
In essence, as Tobias points out in his answer:
[Ellaria] becomes the "de facto" ruler of Dorne... If Ellaria had any legal claim to the throne of Dorne, she would be the de jure ruler of Dorne.
They've broken the line and have caused a rift in this natural process. One which Cersei will have to correct in order to achieve the peace and rule she desires.
This is where it gets a bit interesting, Cersei has been known to name whomever she chooses to rule whatever part she wants, see:
So she'll probably find some random of her own choosing to fill this void.
Option 3: Master has given Dorne a sock, Dorne is freeeeeeeeee
Given that Dorne has always remained somewhat politically and culturally separated from the Crown and the rest of Westeros, they may likely see this as an opportunity to remain independent and may allow one of the great houses of Dorne take up the mantle.
I'd be voting for the Daynes, given their prominence and prestige within Dorne.
* Promised, but Randyll died before being delivered