A set of utilities for working with the AT Protocol in Elixir.
1defmodule Sh.Comet.V0.Richtext.Facet do 2 use Atex.Lexicon 3 4 deflexicon(%{ 5 "defs" => %{ 6 "byteSlice" => %{ 7 "description" => 8 "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.", 9 "properties" => %{ 10 "byteEnd" => %{"minimum" => 0, "type" => "integer"}, 11 "byteStart" => %{"minimum" => 0, "type" => "integer"} 12 }, 13 "required" => ["byteStart", "byteEnd"], 14 "type" => "object" 15 }, 16 "link" => %{ 17 "description" => 18 "Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.", 19 "properties" => %{"uri" => %{"format" => "uri", "type" => "string"}}, 20 "required" => ["uri"], 21 "type" => "object" 22 }, 23 "main" => %{ 24 "description" => "Annotation of a sub-string within rich text.", 25 "properties" => %{ 26 "features" => %{ 27 "items" => %{ 28 "refs" => ["#mention", "#link", "#tag"], 29 "type" => "union" 30 }, 31 "type" => "array" 32 }, 33 "index" => %{"ref" => "#byteSlice", "type" => "ref"} 34 }, 35 "required" => ["index", "features"], 36 "type" => "object" 37 }, 38 "mention" => %{ 39 "description" => 40 "Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID.", 41 "properties" => %{"did" => %{"format" => "did", "type" => "string"}}, 42 "required" => ["did"], 43 "type" => "object" 44 }, 45 "tag" => %{ 46 "description" => 47 "Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags').", 48 "properties" => %{ 49 "tag" => %{"maxGraphemes" => 64, "maxLength" => 640, "type" => "string"} 50 }, 51 "required" => ["tag"], 52 "type" => "object" 53 }, 54 "timestamp" => %{ 55 "description" => 56 "Facet feature for a timestamp in a track. The text usually is in the format of 'hh:mm:ss' with the hour section being omitted if unnecessary.", 57 "properties" => %{ 58 "timestamp" => %{ 59 "description" => "Reference time, in seconds.", 60 "minimum" => 0, 61 "type" => "integer" 62 } 63 }, 64 "type" => "object" 65 } 66 }, 67 "id" => "sh.comet.v0.richtext.facet", 68 "lexicon" => 1 69 }) 70end