Skip to content
Sequential.work

Shared definitions

work.sequential.richtext.facet

Mentions, links, hashtags and nestable styles on a range of text.

main

object

Annotation of a range of text: a mention, link or hashtag, or a style. Works like app.bsky.richtext.facet, but facets may overlap so styles can nest, e.g. an italic word inside a bold sentence. The text holds no markup, so apps that don't know these facets still show clean text. AppViews ignore features they don't know.

PropertyTypeDescription
indexrequiredapp.bsky.richtext.facet#byteSliceThe range of text the features apply to, in UTF-8 bytes. AppViews ignore facets whose range runs past the end of the text or splits a character.
featuresrequiredapp.bsky.richtext.facet#mention | app.bsky.richtext.facet#link | app.bsky.richtext.facet#tag | #bold | #italic | #underline | #strikethrough | #code | #spoiler | #grawlix[]What applies to the range. A range can carry several styles, e.g. bold and italic.

#bold

object

Strong emphasis.

No properties.

#italic

object

Emphasis.

No properties.

Underlined text.

No properties.

Struck-through text.

No properties.

#code

object

Inline code, shown in a monospace font. Text inside it is shown as-is: AppViews don't create mentions, links or hashtags inside it, ignore any that are there, and ignore other styles inside it.

No properties.

#spoiler

object

Text hidden until the reader chooses to reveal it. Mentions, links and hashtags inside it stay hidden and can't be followed until it is revealed.

No properties.

#grawlix

object

Text covered by a grawlix, a run of symbols like @#$%&!, until the reader chooses to reveal it, mostly for profanity. Mentions, links and hashtags inside it stay covered and can't be followed until it is revealed. Where it can't be covered, like a notification, apps show symbols in its place.

No properties.

Raw schema

work.sequential.richtext.facet.json
{
  "lexicon": 1,
  "id": "work.sequential.richtext.facet",
  "defs": {
    "main": {
      "type": "object",
      "properties": {
        "index": {
          "type": "ref",
          "ref": "app.bsky.richtext.facet#byteSlice",
          "description": "The range of text the features apply to, in UTF-8 bytes. AppViews ignore facets whose range runs past the end of the text or splits a character."
        },
        "features": {
          "type": "array",
          "items": {
            "type": "union",
            "refs": [
              "app.bsky.richtext.facet#mention",
              "app.bsky.richtext.facet#link",
              "app.bsky.richtext.facet#tag",
              "#bold",
              "#italic",
              "#underline",
              "#strikethrough",
              "#code",
              "#spoiler",
              "#grawlix"
            ]
          },
          "description": "What applies to the range. A range can carry several styles, e.g. bold and italic."
        }
      },
      "description": "Annotation of a range of text: a mention, link or hashtag, or a style. Works like app.bsky.richtext.facet, but facets may overlap so styles can nest, e.g. an italic word inside a bold sentence. The text holds no markup, so apps that don't know these facets still show clean text. AppViews ignore features they don't know.",
      "required": [
        "index",
        "features"
      ]
    },
    "bold": {
      "type": "object",
      "properties": {},
      "description": "Strong emphasis."
    },
    "italic": {
      "type": "object",
      "properties": {},
      "description": "Emphasis."
    },
    "underline": {
      "type": "object",
      "properties": {},
      "description": "Underlined text."
    },
    "strikethrough": {
      "type": "object",
      "properties": {},
      "description": "Struck-through text."
    },
    "code": {
      "type": "object",
      "properties": {},
      "description": "Inline code, shown in a monospace font. Text inside it is shown as-is: AppViews don't create mentions, links or hashtags inside it, ignore any that are there, and ignore other styles inside it."
    },
    "spoiler": {
      "type": "object",
      "properties": {},
      "description": "Text hidden until the reader chooses to reveal it. Mentions, links and hashtags inside it stay hidden and can't be followed until it is revealed."
    },
    "grawlix": {
      "type": "object",
      "properties": {},
      "description": "Text covered by a grawlix, a run of symbols like @#$%&!, until the reader chooses to reveal it, mostly for profanity. Mentions, links and hashtags inside it stay covered and can't be followed until it is revealed. Where it can't be covered, like a notification, apps show symbols in its place."
    }
  }
}