{
"id": "net.atchan.richtext.facet",
"defs": {
"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"
},
"main": {
"type": "object",
"required": [
"index",
"features"
],
"properties": {
"index": {
"ref": "#byteSlice",
"type": "ref"
},
"features": {
"type": "array",
"items": {
"refs": [
"#bold",
"#italic",
"#underline",
"#strikethrough",
"#spoiler",
"#font"
],
"type": "union"
},
"minLength": 1
}
},
"description": "A facet defines a range of rich text within a larger string."
},
"italic": {
"type": "object",
"properties": {},
"description": "Facet feature marking the range as italic."
},
"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
}