Fix editor image upload hanging on an endless spinner
Inserting an image left the Image block spinning forever. The mediaUpload
handler previewed via URL.createObjectURL(file), a blob: URL. The Image
block (@wordpress/block-library@9.24.0) treats any blob: URL as a
still-uploading image (is-transient + Spinner) and runs
useUploadMediaFromBlobURL, which re-invokes mediaUpload and only clears
the transient state when handed back a non-blob: URL. Stock WordPress
satisfies that by calling onFileChange twice (temporary blob:, then the
final URL+id); our handler calls it once, so returning another blob: URL
meant the spinner never cleared (and uploadBlob could fire twice).
Preview from a data: URL (FileReader.readAsDataURL) instead. isBlobURL()
is false for data: URLs, so the block renders it as an ordinary inline
image immediately -- no transient state, no re-upload loop. The blob is
still committed to the PDS at publish; attachBlobRefs rewrites the data:
URL to the canonical getBlob URL, keyed the same as before.
revokeBlobRegistry now just clears the map (data: URLs are plain strings,
nothing to revoke). Trade-off: data: URLs are base64, so they bloat the
block tree and the localStorage draft -- documented in Decision 0006.