A facet defines a range of rich text within a larger string.
Properties
No description available.
minLength: 1 items
No description available.
View raw schema
{
"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",
"#aa",
"#code",
"#pre",
"#link",
"#ref"
],
"type": "union"
},
"minLength": 1
}
},
"description": "A facet defines a range of rich text within a larger string."
}
Facet feature rendering the range in a Shift_JIS art font, as a block with whitespace preserved. This is a choice of typeface, not a claim about what the range says: it is the font ASCII art (AA) is drawn against, and only in it does the art keep its intended proportions. No other facet is valid inside it.
This object has no properties defined.
View raw schema
{
"type": "object",
"properties": {},
"description": "Facet feature rendering the range in a Shift_JIS art font, as a block with whitespace preserved. This is a choice of typeface, not a claim about what the range says: it is the font ASCII art (AA) is drawn against, and only in it does the art keep its intended proportions. No other facet is valid inside it."
}
Facet feature marking the range as bold.
This object has no properties defined.
View raw schema
{
"type": "object",
"properties": {},
"description": "Facet feature marking the range as bold."
}
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.
Properties
No description available.
minimum: 0
No description available.
minimum: 0
View raw schema
{
"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."
}
Facet feature marking the range as inline code, rendered in a monospace font. No other facet is valid inside it.
This object has no properties defined.
View raw schema
{
"type": "object",
"properties": {},
"description": "Facet feature marking the range as inline code, rendered in a monospace font. No other facet is valid inside it."
}
Facet feature rendering the range in a color, given as a CSS hex color such as "#ff0000".
Properties
No description available.
View raw schema
{
"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\"."
}
Facet feature rendering the range in a named font
Properties
No description available.
View raw schema
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
},
"description": "Facet feature rendering the range in a named font"
}
Facet feature marking the range as italic.
This object has no properties defined.
View raw schema
{
"type": "object",
"properties": {},
"description": "Facet feature marking the range as italic."
}
Facet feature marking the range as a kaomoji, ideally rendered in a Shift-JIS font.
This object has no properties defined.
View raw schema
{
"type": "object",
"properties": {},
"description": "Facet feature marking the range as a kaomoji, ideally rendered in a Shift-JIS font."
}
Facet feature marking the range as a link to a uri
View raw schema
{
"type": "object",
"required": [
"uri"
],
"properties": {
"uri": {
"type": "string",
"format": "uri"
}
},
"description": "Facet feature marking the range as a link to a uri"
}
Facet feature marking the range as preformatted text, rendered as a block in a monospace font with whitespace preserved. No other facet is valid inside it.
This object has no properties defined.
View raw schema
{
"type": "object",
"properties": {},
"description": "Facet feature marking the range as preformatted text, rendered as a block in a monospace font with whitespace preserved. No other facet is valid inside it."
}
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.
Properties
A valid record key for AT Protocol repositories.
View raw schema
{
"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."
}
Facet feature rendering the range at a relative text size from 1 (smallest) to 5 (largest), with 3 being the default.
Properties
No description available.
minimum: 1maximum: 5
View raw schema
{
"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."
}
Facet feature marking the range as a spoiler, hidden until the reader interacts with it.
This object has no properties defined.
View raw schema
{
"type": "object",
"properties": {},
"description": "Facet feature marking the range as a spoiler, hidden until the reader interacts with it."
}
Facet feature marking the range as struck through.
This object has no properties defined.
View raw schema
{
"type": "object",
"properties": {},
"description": "Facet feature marking the range as struck through."
}
Facet feature marking the range as underlined.
This object has no properties defined.
View raw schema
{
"type": "object",
"properties": {},
"description": "Facet feature marking the range as underlined."
}