inlay/bluesky
Values
pub fn detect(url: uri.Uri) -> option.Option(embed.Embed)
pub fn did_decoder() -> decode.Decoder(String)
Decode the did field from a Bluesky resolveHandle response.
pub fn fallback_view(
handle: String,
rkey: String,
) -> element.Element(msg)
Render a plain link to a Bluesky post, used when the handle cannot be resolved to a DID.
pub fn needs_resolution(handle: String) -> Bool
Whether a Bluesky handle needs a network round-trip to resolve to a DID. A
handle already in did: form renders synchronously and needs no resolution.
pub fn render(
embed: embed.Embed,
config: embed.Config,
) -> Result(element.Element(msg), Nil)
pub fn resolve_effect(
handle: String,
to_msg: fn(Result(String, rsvp.Error(String))) -> msg,
) -> effect.Effect(msg)
Resolve a Bluesky handle to a DID over the network, turning the result into a
message with to_msg. Cross-target: uses fetch on JavaScript and httpc
on Erlang.
pub fn resolved_view(
handle: String,
did: String,
rkey: String,
) -> element.Element(msg)
Render the rich Bluesky embed for a post whose handle has been resolved to a
DID. Includes the embed.js script that hydrates the blockquote.