net.atchan.richtext.facet

atchan.net

{
  "id": "net.atchan.richtext.facet",
  "defs": {
    "ref": {
      "type": "object",
      "required": [
        "rkey"
      ],
      "properties": {
        "rkey": {
          "type": "string",
          "format": "record-key"
        }
      },
      "description": "Facet feature marking the range as a quote-link to another post, given by its record key. The range covers the \">>rkey\" the author typed."
    },
    "bold": {
      "type": "object",
      "properties": {},
      "description": "Facet feature marking the range as bold."
    },
    "font": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string"
        }
      },
      "description": "Facet feature rendering the range in a named font"
    },
    "link": {
      "type": "object",
      "required": [
        "uri"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "uri"
        }
      },
      "description": "Facet feature marking the range as a link to a uri"
    },
    "main": {
      "type": "object",
      "required": [
        "index",
        "features"
      ],
      "properties": {
        "index": {
          "ref": "#byteSlice",
          "type": "ref"
        },
        "features": {
          "type": "array",
          "items": {
            "refs": [
              "#bold",
              "#italic",
              "#underline",
              "#strikethrough",
              "#spoiler",
              "#color",
              "#size",
              "#font",
              "#kaomoji",
              "#link",
              "#ref"
            ],
            "type": "union"
          },
          "minLength": 1
        }
      },
      "description": "A facet defines a range of rich text within a larger string."
    },
    "size": {
      "type": "object",
      "required": [
        "value"
      ],
      "properties": {
        "value": {
          "type": "integer",
          "maximum": 5,
          "minimum": 1
        }
      },
      "description": "Facet feature rendering the range at a relative text size from 1 (smallest) to 5 (largest), with 3 being the default."
    },
    "color": {
      "type": "object",
      "required": [
        "value"
      ],
      "properties": {
        "value": {
          "type": "string"
        }
      },
      "description": "Facet feature rendering the range in a color, given as a CSS hex color such as \"#ff0000\"."
    },
    "italic": {
      "type": "object",
      "properties": {},
      "description": "Facet feature marking the range as italic."
    },
    "kaomoji": {
      "type": "object",
      "properties": {},
      "description": "Facet feature marking the range as a kaomoji, ideally rendered in a Shift-JIS font."
    },
    "spoiler": {
      "type": "object",
      "properties": {},
      "description": "Facet feature marking the range as a spoiler, hidden until the reader interacts with it."
    },
    "byteSlice": {
      "type": "object",
      "required": [
        "byteStart",
        "byteEnd"
      ],
      "properties": {
        "byteEnd": {
          "type": "integer",
          "minimum": 0
        },
        "byteStart": {
          "type": "integer",
          "minimum": 0
        }
      },
      "description": "Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets."
    },
    "underline": {
      "type": "object",
      "properties": {},
      "description": "Facet feature marking the range as underlined."
    },
    "strikethrough": {
      "type": "object",
      "properties": {},
      "description": "Facet feature marking the range as struck through."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}

Validate Record

Validate a record against net.atchan.richtext.facet

Validation Options
Treat any remaining unresolved references as valid

Metadata

DID
did:plc:vshgahazzq7qwvp2xc6ai27o
CID
bafyreiadbno5ka4kq7axtvjm7npscma2xsgmuibgt4742khwkou5nikn3y
Indexed At
2026-07-27 07:13 UTC
AT-URI
at://did:plc:vshgahazzq7qwvp2xc6ai27o/com.atproto.lexicon.schema/net.atchan.richtext.facet

Version History (6 versions)

Lexicon Garden

@