Add support for MacOS "Share" contextual menu extensions

The Problem

Apple allows extensions to add tasks to the contextual menu (e.g. “tweet the currently-selected text”, or more appropriately to email “add the link I clicked on to my package delivery tracking app”). You can see a list of these in under Share Menu in the Extensions system preferences.

Mailspring implements its own contextual menus, without integrating with the system APIs to access these Share items or any of the other contextual enhancements provided by the OS.

Proposed Solution

Implement the proper API for rending “share” menu contents.

Alternative Solutions

The “workaround” is to select the text, copy it, and then paste it into whichever app I would normally open via the menu (in other words, there isn’t an alternative).


Current behavior in Mailspring:

Current behavior in Airmail (used to show the identical email, but this behavior is the same in pretty much every other app):

(Airmail has special support for Fantastical, but everything from Add to Deliveries downward comes from the system menu)

I would love to see this happen.