atproto blogging
at main 89 lines 2.3 kB view raw
1{ 2 "lexicon": 1, 3 "id": "com.deckbelcher.richtext.facet", 4 "defs": { 5 "byteSlice": { 6 "type": "object", 7 "description": "Specifies the sub-string range a facet feature applies to.\nStart index is inclusive, end index is exclusive.\nIndices are zero-indexed, counting bytes of the UTF-8 encoded text.", 8 "required": [ 9 "byteStart", 10 "byteEnd" 11 ], 12 "properties": { 13 "byteEnd": { 14 "type": "integer", 15 "minimum": 0 16 }, 17 "byteStart": { 18 "type": "integer", 19 "minimum": 0 20 } 21 } 22 }, 23 "link": { 24 "type": "object", 25 "description": "Facet feature for a URL.\nThe text URL may have been simplified or truncated, but the facet reference should be a complete URL.", 26 "required": [ 27 "uri" 28 ], 29 "properties": { 30 "uri": { 31 "type": "string", 32 "format": "uri" 33 } 34 } 35 }, 36 "main": { 37 "type": "object", 38 "description": "Annotation of a sub-string within rich text.\nExtends Bluesky's facet system to support DeckBelcher-specific features.", 39 "required": [ 40 "index", 41 "features" 42 ], 43 "properties": { 44 "features": { 45 "type": "array", 46 "items": { 47 "type": "union", 48 "refs": [ 49 "#mention", 50 "#link", 51 "#tag" 52 ] 53 } 54 }, 55 "index": { 56 "type": "ref", 57 "ref": "#byteSlice" 58 } 59 } 60 }, 61 "mention": { 62 "type": "object", 63 "description": "Facet feature for mention of another account.\nThe text is usually a handle, including an `@` prefix, but the facet reference is a DID.", 64 "required": [ 65 "did" 66 ], 67 "properties": { 68 "did": { 69 "type": "string", 70 "format": "did" 71 } 72 } 73 }, 74 "tag": { 75 "type": "object", 76 "description": "Facet feature for a hashtag.\nThe text usually includes a '#' prefix, but the facet reference should not.", 77 "required": [ 78 "tag" 79 ], 80 "properties": { 81 "tag": { 82 "type": "string", 83 "maxLength": 640, 84 "maxGraphemes": 64 85 } 86 } 87 } 88 } 89}