The law recognises these categories of visitors:
- Contractural - people who pay to enter.
- Invitees - which are not people you invite despite the name; they are people whose visit will bring an economic benefit to the occupier, customers in a shop for example.
- Licensees - people who don't bring the occupier economic advantage, guests in your home for example. It also includes people who would be contractual visitors except they haven't been charged for their entrance.
- Entrants as of right - lawful users of facilities that are open to the public.
- Trespassers - Your hypothetical thief.
The occupier (generally not the owner) owes a duty of care to each category of visitors but their duty is lower the lower down the scale you go. However, that said, the practical distinctions between the categories are eroding as the duty ratchets up so that all are owed the same duty.
However, the duty to trespassers still remains less than the others. This is usually expressed as a duty to their "common humanity". Basically, if you don't go out of your way to create hazards, you should be ok.
However, occupiers liability is often not pursued and the case is brought in the tort of negligence instead (or as well). Indeed, in some jurisdictions (victoria, england, new-zealand) negligence has entirely supplanted occupiers liability.
There the duty is pretty much as originally laid down by Lord Atkin in Donoghue v. Stevenson  A.C. 562 at 580:
You must take reasonable care to avoid acts and omissions which you can
reasonably forsee would be likely to injure your neighbour. Who then, in law, is my
neighbour? The answer seems to be, persons who are so closely and directly
affected by my act that I ought reasonably to have them in contemplation as being
Is a trespasser your neighbour? You bet they are.