social.colibri.beta.richtext.facet

colibri.social

Documentation

An annotation over a range of a message's text.

main object

An annotation over a range of a message's text.

Properties

index ref #byteSlice Required

The range of the text this facet covers.

View raw schema
{
  "type": "object",
  "required": [
    "index",
    "features"
  ],
  "properties": {
    "index": {
      "ref": "#byteSlice",
      "type": "ref",
      "description": "The range of the text this facet covers."
    },
    "features": {
      "type": "array",
      "items": {
        "refs": [
          "#bold",
          "#italic",
          "#underline",
          "#strikethrough",
          "#code",
          "#codeblock",
          "#quote",
          "#heading",
          "#list",
          "#subtext",
          "#spoiler",
          "#mention",
          "#role",
          "#channel",
          "#link",
          "#time"
        ],
        "type": "union"
      },
      "description": "What the range means. A range may carry more than one feature."
    }
  },
  "description": "An annotation over a range of a message's text."
}
bold object

Bold text.

This object has no properties defined.

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

The range a feature applies to, as zero-based byte offsets into the UTF-8 encoded text. Start is inclusive, end is exclusive.

Properties

byteEnd integer Required

Byte after the range, exclusive.

minimum: 0
byteStart integer Required

First byte of the range, inclusive.

minimum: 0
View raw schema
{
  "type": "object",
  "required": [
    "byteStart",
    "byteEnd"
  ],
  "properties": {
    "byteEnd": {
      "type": "integer",
      "minimum": 0,
      "description": "Byte after the range, exclusive."
    },
    "byteStart": {
      "type": "integer",
      "minimum": 0,
      "description": "First byte of the range, inclusive."
    }
  },
  "description": "The range a feature applies to, as zero-based byte offsets into the UTF-8 encoded text. Start is inclusive, end is exclusive."
}
channel object

A channel reference, by the channel's space key within the same community.

Properties

channel string record-key Required

The referenced channel.

View raw schema
{
  "type": "object",
  "required": [
    "channel"
  ],
  "properties": {
    "channel": {
      "type": "string",
      "format": "record-key",
      "description": "The referenced channel."
    }
  },
  "description": "A channel reference, by the channel's space key within the same community."
}
code object

Inline code.

This object has no properties defined.

View raw schema
{
  "type": "object",
  "properties": {},
  "description": "Inline code."
}
codeblock object

A multi-line code block.

Properties

lang string Optional

Language hint.

maxLength: 32 bytes
View raw schema
{
  "type": "object",
  "properties": {
    "lang": {
      "type": "string",
      "maxLength": 32,
      "description": "Language hint."
    }
  },
  "description": "A multi-line code block."
}
heading object

A heading line.

Properties

level integer Required

Heading level, from 1 to 3.

minimum: 1maximum: 3
View raw schema
{
  "type": "object",
  "required": [
    "level"
  ],
  "properties": {
    "level": {
      "type": "integer",
      "maximum": 3,
      "minimum": 1,
      "description": "Heading level, from 1 to 3."
    }
  },
  "description": "A heading line."
}
italic object

Italic text.

This object has no properties defined.

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

A hyperlink.

Properties

uri string uri Required

Where the link points.

View raw schema
{
  "type": "object",
  "required": [
    "uri"
  ],
  "properties": {
    "uri": {
      "type": "string",
      "format": "uri",
      "description": "Where the link points."
    }
  },
  "description": "A hyperlink."
}
list object

A list item line.

Properties

ordered boolean Required

Whether the list is numbered.

View raw schema
{
  "type": "object",
  "required": [
    "ordered"
  ],
  "properties": {
    "ordered": {
      "type": "boolean",
      "description": "Whether the list is numbered."
    }
  },
  "description": "A list item line."
}
mention object

A user mention.

Properties

did string did Required

The mentioned user.

View raw schema
{
  "type": "object",
  "required": [
    "did"
  ],
  "properties": {
    "did": {
      "type": "string",
      "format": "did",
      "description": "The mentioned user."
    }
  },
  "description": "A user mention."
}
quote object

A block quote.

This object has no properties defined.

View raw schema
{
  "type": "object",
  "properties": {},
  "description": "A block quote."
}
role object

A role mention. Roles are only ever written by the community, and a channel space's authority is its community, so the role key alone is unambiguous.

Properties

role string record-key Required

The mentioned role.

View raw schema
{
  "type": "object",
  "required": [
    "role"
  ],
  "properties": {
    "role": {
      "type": "string",
      "format": "record-key",
      "description": "The mentioned role."
    }
  },
  "description": "A role mention. Roles are only ever written by the community, and a channel space's authority is its community, so the role key alone is unambiguous."
}
spoiler object

Text hidden until revealed.

This object has no properties defined.

View raw schema
{
  "type": "object",
  "properties": {},
  "description": "Text hidden until revealed."
}
strikethrough object

Struck-through text.

This object has no properties defined.

View raw schema
{
  "type": "object",
  "properties": {},
  "description": "Struck-through text."
}
subtext object

Small, muted text.

This object has no properties defined.

View raw schema
{
  "type": "object",
  "properties": {},
  "description": "Small, muted text."
}
time object

A timestamp rendered in the reader's locale.

Properties

datetime string datetime Required

The instant being referred to.

style string Optional

How to render it.

Known values: time-short, time-long, date-short, date-long, datetime-short, datetime-long, relative
View raw schema
{
  "type": "object",
  "required": [
    "datetime"
  ],
  "properties": {
    "style": {
      "type": "string",
      "description": "How to render it.",
      "knownValues": [
        "time-short",
        "time-long",
        "date-short",
        "date-long",
        "datetime-short",
        "datetime-long",
        "relative"
      ]
    },
    "datetime": {
      "type": "string",
      "format": "datetime",
      "description": "The instant being referred to."
    }
  },
  "description": "A timestamp rendered in the reader's locale."
}
underline object

Underlined text.

This object has no properties defined.

View raw schema
{
  "type": "object",
  "properties": {},
  "description": "Underlined text."
}

Lexicon Garden

@