Current section
Files
Jump to
Current section
Files
lib/xberg/annotation_kind.ex
# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:926a121ce8858da89e1c2dae78836bd02775ed955b144da6ce043a83737b8c26
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule Xberg.AnnotationKind do
@moduledoc "Types of inline text annotations."
@typedoc "Types of inline text annotations."
@type t :: term()
@typedoc "Bold (strong) text formatting."
@type bold :: :bold
@typedoc "Italic (emphasis) text formatting."
@type italic :: :italic
@typedoc "Underlined text."
@type underline :: :underline
@typedoc "Strikethrough text."
@type strikethrough :: :strikethrough
@typedoc "Inline code span."
@type code :: :code
@typedoc "Subscript text."
@type subscript :: :subscript
@typedoc "Superscript text."
@type superscript :: :superscript
@typedoc "Hyperlink annotation."
@type link :: %{type: :link, url: String.t(), title: String.t()}
@typedoc "Highlighted text (PDF highlights, HTML `<mark>`)."
@type highlight :: :highlight
@typedoc "Text color (CSS-compatible value, e.g. \"#ff0000\", \"red\")."
@type color :: %{type: :color, value: String.t()}
@typedoc "Font size with units (e.g. \"12pt\", \"1.2em\", \"16px\")."
@type font_size :: %{type: :font_size, value: String.t()}
@typedoc "Extensible annotation for format-specific styling."
@type custom :: %{type: :custom, name: String.t(), value: String.t()}
def link(url, title), do: {:link, %{url: url, title: title}}
def color(value), do: {:color, %{value: value}}
def font_size(value), do: {:font_size, %{value: value}}
def custom(name, value), do: {:custom, %{name: name, value: value}}
end