Text and links
open({ title?, message?, url? }) resolves true when the user shared.
In the desktop shell on macOS, this opens the system share menu (Messages, Mail, AirDrop, Notes and so on) where the user pressed your button. On Windows and Linux the shell copies the text and link to the clipboard and says so in a notification.
For links to a profile, build the URL with userPageUrl, not window.location.
Drag files out (desktop)
In the desktop shell, an element can be dragged out of your app as a file: onto Finder, the desktop, a Mail message or another app. SpreadfileDragProps onto it:
url must be a public https URL, because no app token is sent, and the file can be up to 200 MB. Outside the desktop shell the attributes do nothing.
Files on the device
uri must be a file the shell can read, such as a nativeUri returned by the camera.
Generated documents
shareContent shares a file your page built itself, such as an export or a PDF. Inside a shell, <a download> and window.print() do nothing, so this is how a user gets the file out.
{ shared?, error? }, with error being not_available or failed. It answers not_available outside a shell and in shell versions that predate it, so always keep a browser download path.
Outside a shell,
open resolves false and shareFile resolves error: 'not_available'. In a browser, use navigator.share or a download link.