social.coves.richtext.facet

coves.social

Documentation

Annotation of a sub-string within rich text

main object

Annotation of a sub-string within rich text

Properties

features array of union Required

Features applied to this text range. This union is open: readers MUST render the annotated text as plain text when they do not recognize a feature's $type. Ranges of different block types may nest by containment (e.g. a codeBlock inside a blockquote); only blockquote-in-blockquote containment is disallowed (nested quotes use disjoint ranges with increasing level).

maxLength: 20 items
index ref #byteSlice Required

No description available.

View raw schema
{
  "type": "object",
  "required": [
    "index",
    "features"
  ],
  "properties": {
    "index": {
      "ref": "#byteSlice",
      "type": "ref"
    },
    "features": {
      "type": "array",
      "items": {
        "refs": [
          "#mention",
          "#link",
          "#bold",
          "#italic",
          "#strikethrough",
          "#spoiler",
          "#blockquote",
          "#heading",
          "#code",
          "#codeBlock"
        ],
        "type": "union"
      },
      "maxLength": 20,
      "description": "Features applied to this text range. This union is open: readers MUST render the annotated text as plain text when they do not recognize a feature's $type. Ranges of different block types may nest by containment (e.g. a codeBlock inside a blockquote); only blockquote-in-blockquote containment is disallowed (nested quotes use disjoint ranges with increasing level)."
    }
  },
  "description": "Annotation of a sub-string within rich text"
}
blockquote object

Block-level quotation. The range must span whole lines: from the first byte of the first quoted line through the last content byte of the last quoted line, excluding the trailing newline. Readers encountering a range that does not span whole lines should extend the block to the enclosing line boundaries. Consecutive quoted lines at the same depth should be covered by a single facet; readers should render adjacent same-level quote facets as separate blocks. Nested quotes are expressed as disjoint ranges with increasing level values, not by nesting ranges. Writers must clamp source nesting deeper than 6 to level 6, and strip the source markup markers (e.g. Markdown '>'); the text is canonical and must remain readable without this facet.

Properties

level integer Optional

Quote nesting depth. Absent means 1.

minimum: 1maximum: 6
View raw schema
{
  "type": "object",
  "properties": {
    "level": {
      "type": "integer",
      "maximum": 6,
      "minimum": 1,
      "description": "Quote nesting depth. Absent means 1."
    }
  },
  "description": "Block-level quotation. The range must span whole lines: from the first byte of the first quoted line through the last content byte of the last quoted line, excluding the trailing newline. Readers encountering a range that does not span whole lines should extend the block to the enclosing line boundaries. Consecutive quoted lines at the same depth should be covered by a single facet; readers should render adjacent same-level quote facets as separate blocks. Nested quotes are expressed as disjoint ranges with increasing level values, not by nesting ranges. Writers must clamp source nesting deeper than 6 to level 6, and strip the source markup markers (e.g. Markdown '>'); the text is canonical and must remain readable without this facet."
}
bold object

Bold text formatting

This object has no properties defined.

View raw schema
{
  "type": "object",
  "description": "Bold text formatting"
}
byteSlice object

Specifies the sub-string range via byte indices

Properties

byteEnd integer Required

Exclusive end position in UTF-8 bytes

minimum: 0
byteStart integer Required

Inclusive start position in UTF-8 bytes

minimum: 0
View raw schema
{
  "type": "object",
  "required": [
    "byteStart",
    "byteEnd"
  ],
  "properties": {
    "byteEnd": {
      "type": "integer",
      "minimum": 0,
      "description": "Exclusive end position in UTF-8 bytes"
    },
    "byteStart": {
      "type": "integer",
      "minimum": 0,
      "description": "Inclusive start position in UTF-8 bytes"
    }
  },
  "description": "Specifies the sub-string range via byte indices"
}
code object

Inline code span rendered in monospace. Writers strip the source markup markers (e.g. backticks); the annotated text is the literal code.

This object has no properties defined.

View raw schema
{
  "type": "object",
  "description": "Inline code span rendered in monospace. Writers strip the source markup markers (e.g. backticks); the annotated text is the literal code."
}
codeBlock object

Block of preformatted code rendered in monospace with whitespace preserved. The range must span whole lines (excluding the trailing newline); readers encountering a range that does not should extend it to the enclosing line boundaries. Writers strip the source fence markers (e.g. Markdown ```); the annotated text is the literal code.

Properties

language string Optional

Optional language hint for syntax highlighting (e.g. 'go', 'python')

maxLength: 40 bytes
View raw schema
{
  "type": "object",
  "properties": {
    "language": {
      "type": "string",
      "maxLength": 40,
      "description": "Optional language hint for syntax highlighting (e.g. 'go', 'python')"
    }
  },
  "description": "Block of preformatted code rendered in monospace with whitespace preserved. The range must span whole lines (excluding the trailing newline); readers encountering a range that does not should extend it to the enclosing line boundaries. Writers strip the source fence markers (e.g. Markdown ```); the annotated text is the literal code."
}
heading object

Section heading. The range must span a single whole line (excluding the trailing newline); readers encountering a range that does not should extend it to the enclosing line boundaries. Writers strip the source markup markers (e.g. Markdown '#'); the text is canonical and must remain readable without this facet.

Properties

level integer Required

Heading level, 1 (largest) through 6

minimum: 1maximum: 6
View raw schema
{
  "type": "object",
  "required": [
    "level"
  ],
  "properties": {
    "level": {
      "type": "integer",
      "maximum": 6,
      "minimum": 1,
      "description": "Heading level, 1 (largest) through 6"
    }
  },
  "description": "Section heading. The range must span a single whole line (excluding the trailing newline); readers encountering a range that does not should extend it to the enclosing line boundaries. Writers strip the source markup markers (e.g. Markdown '#'); the text is canonical and must remain readable without this facet."
}
italic object

Italic text formatting

This object has no properties defined.

View raw schema
{
  "type": "object",
  "description": "Italic text formatting"
}
link object

Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.

Properties

uri string uri Required

Target URI of the link

View raw schema
{
  "type": "object",
  "required": [
    "uri"
  ],
  "properties": {
    "uri": {
      "type": "string",
      "format": "uri",
      "description": "Target URI of the link"
    }
  },
  "description": "Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL."
}
mention object

Facet feature for mention of a user or community. The text is usually a handle with '@' (user) or '!' (community) prefix, but the facet reference is a DID.

Properties

did string did Required

DID of the mentioned user or community

View raw schema
{
  "type": "object",
  "required": [
    "did"
  ],
  "properties": {
    "did": {
      "type": "string",
      "format": "did",
      "description": "DID of the mentioned user or community"
    }
  },
  "description": "Facet feature for mention of a user or community. The text is usually a handle with '@' (user) or '!' (community) prefix, but the facet reference is a DID."
}
spoiler object

Hidden/spoiler text that requires user interaction to reveal

Properties

reason string Optional

Optional explanation of what's hidden

maxLength: 128 bytesmaxGraphemes: 32 graphemes
View raw schema
{
  "type": "object",
  "properties": {
    "reason": {
      "type": "string",
      "maxLength": 128,
      "description": "Optional explanation of what's hidden",
      "maxGraphemes": 32
    }
  },
  "description": "Hidden/spoiler text that requires user interaction to reveal"
}
strikethrough object

Strikethrough text formatting

This object has no properties defined.

View raw schema
{
  "type": "object",
  "description": "Strikethrough text formatting"
}

Lexicon Garden

@