pub.chive.richtext.defs

chive.pub

Documentation

annotationRefItem object

Reference to an annotation or review

Properties

label string Optional

Text excerpt for preview

maxLength: 500 bytes
type string Required

No description available.

uri string at-uri Required

An AT Protocol URI (e.g., at://did:plc:xyz/app.bsky.feed.post/abc).

View raw schema
{
  "type": "object",
  "required": [
    "type",
    "uri"
  ],
  "properties": {
    "uri": {
      "type": "string",
      "format": "at-uri"
    },
    "type": {
      "type": "string",
      "const": "annotationRef"
    },
    "label": {
      "type": "string",
      "maxLength": 500,
      "description": "Text excerpt for preview"
    }
  },
  "description": "Reference to an annotation or review"
}
authorRefItem object

Reference to an author by DID

Properties

did string did Required

A decentralized identifier (DID).

label string Optional

Display name

maxLength: 200 bytes
type string Required

No description available.

View raw schema
{
  "type": "object",
  "required": [
    "type",
    "did"
  ],
  "properties": {
    "did": {
      "type": "string",
      "format": "did"
    },
    "type": {
      "type": "string",
      "const": "authorRef"
    },
    "label": {
      "type": "string",
      "maxLength": 200,
      "description": "Display name"
    }
  },
  "description": "Reference to an author by DID"
}
blockquoteItem object

Blockquote

Properties

content string Required

No description available.

maxLength: 5000 bytes
type string Required

No description available.

View raw schema
{
  "type": "object",
  "required": [
    "type",
    "content"
  ],
  "properties": {
    "type": {
      "type": "string",
      "const": "blockquote"
    },
    "content": {
      "type": "string",
      "maxLength": 5000
    }
  },
  "description": "Blockquote"
}
byteSlice object

Byte range for facet positioning

Properties

byteEnd integer Required

End byte position (exclusive)

minimum: 0
byteStart integer Required

Start byte position (inclusive)

minimum: 0
View raw schema
{
  "type": "object",
  "required": [
    "byteStart",
    "byteEnd"
  ],
  "properties": {
    "byteEnd": {
      "type": "integer",
      "minimum": 0,
      "description": "End byte position (exclusive)"
    },
    "byteStart": {
      "type": "integer",
      "minimum": 0,
      "description": "Start byte position (inclusive)"
    }
  },
  "description": "Byte range for facet positioning"
}
codeBlockItem object

Code block

Properties

content string Required

No description available.

maxLength: 50000 bytes
language string Optional

No description available.

maxLength: 50 bytes
type string Required

No description available.

View raw schema
{
  "type": "object",
  "required": [
    "type",
    "content"
  ],
  "properties": {
    "type": {
      "type": "string",
      "const": "codeBlock"
    },
    "content": {
      "type": "string",
      "maxLength": 50000
    },
    "language": {
      "type": "string",
      "maxLength": 50
    }
  },
  "description": "Code block"
}
eprintRefItem object

Reference to another eprint

Properties

label string Optional

Eprint title for display

maxLength: 500 bytes
type string Required

No description available.

uri string at-uri Required

An AT Protocol URI (e.g., at://did:plc:xyz/app.bsky.feed.post/abc).

View raw schema
{
  "type": "object",
  "required": [
    "type",
    "uri"
  ],
  "properties": {
    "uri": {
      "type": "string",
      "format": "at-uri"
    },
    "type": {
      "type": "string",
      "const": "eprintRef"
    },
    "label": {
      "type": "string",
      "maxLength": 500,
      "description": "Eprint title for display"
    }
  },
  "description": "Reference to another eprint"
}
facet object

ATProto-compatible facet for rich text formatting within a text item

Properties

View raw schema
{
  "type": "object",
  "required": [
    "index",
    "features"
  ],
  "properties": {
    "index": {
      "ref": "#byteSlice",
      "type": "ref"
    },
    "features": {
      "type": "array",
      "items": {
        "refs": [
          "pub.chive.richtext.facets#bold",
          "pub.chive.richtext.facets#italic",
          "pub.chive.richtext.facets#strikethrough",
          "pub.chive.richtext.facets#code",
          "pub.chive.richtext.facets#latex",
          "#linkFacet"
        ],
        "type": "union"
      }
    }
  },
  "description": "ATProto-compatible facet for rich text formatting within a text item"
}
facetRefItem object

Facet classification node reference

Properties

label string Optional

No description available.

maxLength: 500 bytes
type string Required

No description available.

uri string at-uri Required

An AT Protocol URI (e.g., at://did:plc:xyz/app.bsky.feed.post/abc).

View raw schema
{
  "type": "object",
  "required": [
    "type",
    "uri"
  ],
  "properties": {
    "uri": {
      "type": "string",
      "format": "at-uri"
    },
    "type": {
      "type": "string",
      "const": "facetRef"
    },
    "label": {
      "type": "string",
      "maxLength": 500
    }
  },
  "description": "Facet classification node reference"
}
fieldRefItem object

Academic field node reference

Properties

label string Optional

No description available.

maxLength: 500 bytes
type string Required

No description available.

uri string at-uri Required

An AT Protocol URI (e.g., at://did:plc:xyz/app.bsky.feed.post/abc).

View raw schema
{
  "type": "object",
  "required": [
    "type",
    "uri"
  ],
  "properties": {
    "uri": {
      "type": "string",
      "format": "at-uri"
    },
    "type": {
      "type": "string",
      "const": "fieldRef"
    },
    "label": {
      "type": "string",
      "maxLength": 500
    }
  },
  "description": "Academic field node reference"
}
headingItem object

Heading (for abstracts and reviews, not titles)

Properties

content string Required

No description available.

maxLength: 500 bytes
level integer Required

No description available.

minimum: 1maximum: 6
type string Required

No description available.

View raw schema
{
  "type": "object",
  "required": [
    "type",
    "content",
    "level"
  ],
  "properties": {
    "type": {
      "type": "string",
      "const": "heading"
    },
    "level": {
      "type": "integer",
      "maximum": 6,
      "minimum": 1
    },
    "content": {
      "type": "string",
      "maxLength": 500
    }
  },
  "description": "Heading (for abstracts and reviews, not titles)"
}
latexItem object

Standalone LaTeX math expression

Properties

content string Required

No description available.

maxLength: 5000 bytes
displayMode boolean Optional

True for block display ($$...$$), false for inline ($...$)

type string Required

No description available.

View raw schema
{
  "type": "object",
  "required": [
    "type",
    "content"
  ],
  "properties": {
    "type": {
      "type": "string",
      "const": "latex"
    },
    "content": {
      "type": "string",
      "maxLength": 5000
    },
    "displayMode": {
      "type": "boolean",
      "description": "True for block display ($$...$$), false for inline ($...$)"
    }
  },
  "description": "Standalone LaTeX math expression"
}
linkFacet object

Hyperlink facet

Properties

$type string Required

No description available.

uri string uri Required

Link target URL

View raw schema
{
  "type": "object",
  "required": [
    "$type",
    "uri"
  ],
  "properties": {
    "uri": {
      "type": "string",
      "format": "uri",
      "description": "Link target URL"
    },
    "$type": {
      "type": "string",
      "const": "app.bsky.richtext.facet#link"
    }
  },
  "description": "Hyperlink facet"
}
linkItem object

Inline hyperlink

Properties

label string Optional

No description available.

maxLength: 500 bytes
type string Required

No description available.

url string uri Required

A valid URI.

View raw schema
{
  "type": "object",
  "required": [
    "type",
    "url"
  ],
  "properties": {
    "url": {
      "type": "string",
      "format": "uri"
    },
    "type": {
      "type": "string",
      "const": "link"
    },
    "label": {
      "type": "string",
      "maxLength": 500
    }
  },
  "description": "Inline hyperlink"
}
listItem object

List item

Properties

content string Required

No description available.

maxLength: 2000 bytes
depth integer Optional

No description available.

minimum: 0maximum: 5
listType string Required

No description available.

Known values: bullet, ordered
ordinal integer Optional

No description available.

minimum: 1
type string Required

No description available.

View raw schema
{
  "type": "object",
  "required": [
    "type",
    "content",
    "listType"
  ],
  "properties": {
    "type": {
      "type": "string",
      "const": "listItem"
    },
    "depth": {
      "type": "integer",
      "maximum": 5,
      "minimum": 0
    },
    "content": {
      "type": "string",
      "maxLength": 2000
    },
    "ordinal": {
      "type": "integer",
      "minimum": 1
    },
    "listType": {
      "type": "string",
      "knownValues": [
        "bullet",
        "ordered"
      ]
    }
  },
  "description": "List item"
}
mentionItem object

ATProto-style mention (@handle)

Properties

did string did Required

A decentralized identifier (DID).

handle string Optional

Handle at time of mention

type string Required

No description available.

View raw schema
{
  "type": "object",
  "required": [
    "type",
    "did"
  ],
  "properties": {
    "did": {
      "type": "string",
      "format": "did"
    },
    "type": {
      "type": "string",
      "const": "mention"
    },
    "handle": {
      "type": "string",
      "description": "Handle at time of mention"
    }
  },
  "description": "ATProto-style mention (@handle)"
}
nodeRefItem object

Knowledge graph node reference

Properties

label string Optional

Display label (cached from node)

maxLength: 500 bytes
subkind string Optional

Node subkind slug for styling (field, institution, person, etc.)

maxLength: 50 bytes
type string Required

No description available.

uri string at-uri Required

AT-URI of the referenced node

View raw schema
{
  "type": "object",
  "required": [
    "type",
    "uri"
  ],
  "properties": {
    "uri": {
      "type": "string",
      "format": "at-uri",
      "description": "AT-URI of the referenced node"
    },
    "type": {
      "type": "string",
      "const": "nodeRef"
    },
    "label": {
      "type": "string",
      "maxLength": 500,
      "description": "Display label (cached from node)"
    },
    "subkind": {
      "type": "string",
      "maxLength": 50,
      "description": "Node subkind slug for styling (field, institution, person, etc.)"
    }
  },
  "description": "Knowledge graph node reference"
}
tagItem object

Hashtag reference

Properties

tag string Required

Tag without # prefix

maxLength: 100 bytes
type string Required

No description available.

View raw schema
{
  "type": "object",
  "required": [
    "type",
    "tag"
  ],
  "properties": {
    "tag": {
      "type": "string",
      "maxLength": 100,
      "description": "Tag without # prefix"
    },
    "type": {
      "type": "string",
      "const": "tag"
    }
  },
  "description": "Hashtag reference"
}
textItem object

Plain text content item with optional formatting facets

Properties

content string Required

Text content

maxLength: 100000 bytesmaxGraphemes: 50000 graphemes
facets array of ref#facet Optional

ATProto-style facets for rich text formatting

maxLength: 500 items
type string Required

No description available.

View raw schema
{
  "type": "object",
  "required": [
    "type",
    "content"
  ],
  "properties": {
    "type": {
      "type": "string",
      "const": "text"
    },
    "facets": {
      "type": "array",
      "items": {
        "ref": "#facet",
        "type": "ref"
      },
      "maxLength": 500,
      "description": "ATProto-style facets for rich text formatting"
    },
    "content": {
      "type": "string",
      "maxLength": 100000,
      "description": "Text content",
      "maxGraphemes": 50000
    }
  },
  "description": "Plain text content item with optional formatting facets"
}
wikidataRefItem object

Wikidata entity reference

Properties

label string Optional

Display label

maxLength: 500 bytes
qid string Required

Wikidata QID (e.g., Q12345)

maxLength: 20 bytes
type string Required

No description available.

View raw schema
{
  "type": "object",
  "required": [
    "type",
    "qid"
  ],
  "properties": {
    "qid": {
      "type": "string",
      "maxLength": 20,
      "description": "Wikidata QID (e.g., Q12345)"
    },
    "type": {
      "type": "string",
      "const": "wikidataRef"
    },
    "label": {
      "type": "string",
      "maxLength": 500,
      "description": "Display label"
    }
  },
  "description": "Wikidata entity reference"
}

Lexicon Garden

@