Resolves #4315.
If a user is serving Dagit from http (non-localhost), the navigator.clipboard value is undefined, so any writeText calls we're making to copy values to the clipboard will error out. (There may be other circumstances where this is the case, so I asked in the GH issue.)
Create a very simple hook to provide callsites with Clipboard | null instead of referencing navigator.clipboard directly. Callers can then decide how to handle the case where the clipboard API is unavailable.
EDIT: The diff now implements a fallback for cases that do not support the Clipboard API.