rememberBlueskyAnnotatedString

fun rememberBlueskyAnnotatedString(text: String, facets: List<Facet>?, linkStyle: SpanStyle = SpanStyle(color = MaterialTheme.colorScheme.primary)): AnnotatedString

Remember a Material 3-styled AnnotatedString for Bluesky post text + facets. The 80% case for Material 3 consumers — one line to render a post.

Memoizes on (text, facets, linkStyle) so recompositions don't rebuild the boundary table or the annotation graph when nothing relevant changed.

linkStyle defaults to a SpanStyle colored with the current MaterialTheme.colorScheme.primary. Consumers that want a different color (brand color, secondary palette, etc.) pass their own SpanStyle — the default is read fresh on every recomposition so theme switches are picked up automatically.

For consumers without Material 3 — those using a custom theme stack with their own brand color for links — pull :compose directly and call buildBlueskyAnnotatedString with a custom styleMapper.

Parameters

text

the post's plain text.

facets

the post record's facets (may be null).

linkStyle

the SpanStyle applied to mention/link/tag spans. Defaults to MaterialTheme.colorScheme.primary.