hypothesis/annotator — pull request #55 by csillag (2014-04-11 19:57:13+00:00)
Title: Introducing selector descriptors

First batch of stuff I wrote during the hackathon:

Introducing selector descriptors.

Now you can register your custom functions to create selectors
out of (any kind of) raw selectors.

Annotator's `onSuccessfulSelection()` function now expects to
find `segments` inside the passed event, instead of `targets`.
(This data is passed by the selection UI code.)

The creation of targets is no longer the responsibility of the
UI code which detected the selection; targets will automatically
be created my calling the registered selector descriptors on
the passed segments.

Also separated TextRange, TextPosition and TextQuote plugins
(which contains the corresponging selector descriptors)
from the TextAnchors plugin.