[{"name":"Mark","comment":"\n\n\n# Building Documents\n\n@docs Document, document, documentWith\n\n@docs Block, block\n\n\n# Primitives\n\n@docs string, int, float, bool\n\n\n# Text\n\n@docs Styles, text, textWith\n\n\n# Text Replacements\n\n@docs Replacement, commonReplacements, replacement, balanced\n\n\n# Text Annotations\n\nAlong with basic [`styling`](#text) and [`replacements`](#replacement), we also have a few ways to annotate text.\n\n@docs annotation, verbatim\n\n\n# Records\n\n@docs Record, record, field, toBlock\n\n\n# Higher Level\n\n@docs oneOf, manyOf\n\n\n# Trees\n\n@docs tree, Enumerated, Item, Icon\n\n\n# Rendering\n\n@docs Outcome, Partial\n\n@docs metadata, compile, parse, Parsed, toString, render\n\n\n# Constraining and Recovering Blocks\n\n@docs map, verify, onError\n\n@docs withId, withAttr, documentId, idToString, stringToId\n\n@docs lookup\n\n","unions":[{"name":"Enumerated","comment":" ","args":["item"],"cases":[["Enumerated",["{ icon : Mark.Icon, items : List.List (Mark.Item item) }"]]]},{"name":"Icon","comment":" ","args":[],"cases":[["Bullet",[]],["Number",[]]]},{"name":"Item","comment":" **Note** `index` is our position within the nested list.\n\nThe first `Int` in the tuple is our current position in the current sub list.\n\nThe `List Int` that follows are the indices for the parent list.\n\nFor example, given this list\n\n```markup\n|> List\n    1. First element\n    -- Second Element\n        1. Element #2.1\n            -- Element #2.1.1\n        -- Element #2.2\n    -- Third Element\n```\n\nhere are the indices:\n\n```markup\n1. (1, [])\n-- (2, [])\n    1. (1, [2])\n        -- (1, [1,2])\n    -- (2, [2])\n-- (3, [])\n```\n\n","args":["item"],"cases":[["Item",["{ index : ( Basics.Int, List.List Basics.Int ), content : List.List item, children : Mark.Enumerated item }"]]]},{"name":"Outcome","comment":" ","args":["failure","almost","success"],"cases":[["Success",["success"]],["Almost",["almost"]],["Failure",["failure"]]]}],"aliases":[{"name":"Block","comment":" ","args":["data"],"type":"Mark.Internal.Description.Block data"},{"name":"Document","comment":" ","args":["meta","data"],"type":"Mark.Internal.Description.Document meta data"},{"name":"Parsed","comment":" ","args":[],"type":"Mark.Internal.Description.Parsed"},{"name":"Partial","comment":" ","args":["data"],"type":"{ errors : List.List Mark.Error.Error, result : data }"},{"name":"Record","comment":" ","args":["a"],"type":"Mark.Internal.Description.Record a"},{"name":"Replacement","comment":" ","args":[],"type":"Mark.Internal.Parser.Replacement"},{"name":"Styles","comment":" ","args":[],"type":"{ bold : Basics.Bool, italic : Basics.Bool, strike : Basics.Bool }"}],"values":[{"name":"annotation","comment":" An annotation is some _styled text_, a _name_, and zero or more _attributes_.\n\nSo, we can make a `link` that looks like this in markup:\n\n```markup\nHere is my [*cool* sentence]{link| url = website.com }.\n```\n\nand rendered in elm-land via:\n\n    link =\n        Mark.annotation \"link\"\n            (\\id styles url ->\n                Html.a\n                    [ Html.Attributes.href url ]\n                    (List.map renderStyles styles)\n            )\n            |> Mark.field \"url\" Mark.string\n\n","type":"String.String -> (Mark.Internal.Id.Id -> List.List ( Mark.Styles, String.String ) -> result) -> Mark.Record result"},{"name":"balanced","comment":" A balanced replacement. This is used for replacing parentheses or to do auto-curly quotes.\n\n    Mark.balanced\n        { start = ( \"\\\"\", \"“\" )\n        , end = ( \"\\\"\", \"”\" )\n        }\n\n","type":"{ start : ( String.String, String.String ), end : ( String.String, String.String ) } -> Mark.Replacement"},{"name":"block","comment":" A named block.\n\n    Mark.block \"MyBlock\"\n        Html.text\n        Mark.string\n\nWill parse the following and render it using `Html.text`\n\n    |> MyBlock\n        Here is an unformatted string!\n\n**Note** block names should be capitalized. In the future this may be enforced.\n\n","type":"String.String -> (child -> result) -> Mark.Block child -> Mark.Block result"},{"name":"bool","comment":" Capture either `True` or `False`.\n\n`elm-markup` doesn't infer truthiness in other values, so it needs to be exactly `True` or `False`.\n\n","type":"Mark.Block Basics.Bool"},{"name":"commonReplacements","comment":" This is a set of common character replacements with some typographical niceties.\n\n  - `...` is converted to the ellipses unicode character(`…`).\n  - `\"` Straight double quotes are [replaced with curly quotes](https://practicaltypography.com/straight-and-curly-quotes.html) (`“`, `”`)\n  - `'` Single Quotes are replaced with apostrophes(`’`).\n  - `--` is replaced with an [en-dash(`–`)](https://practicaltypography.com/hyphens-and-dashes.html).\n  - `---` is replaced with an [em-dash(`—`)](https://practicaltypography.com/hyphens-and-dashes.html).\n  - `<>` also known as \"glue\", will create a non-breaking space (`&nbsp;`). This is not for manually increasing space (sequential `<>` tokens will only render as one `&nbsp;`), but to signify that the space between two words shouldn't break when wrapping. Like glueing two words together!\n\n**Note** this is included by default in `Mark.text`\n\n","type":"List.List Mark.Replacement"},{"name":"compile","comment":" ","type":"Mark.Document meta data -> String.String -> Mark.Outcome (List.List Mark.Error.Error) (Mark.Partial ( meta, List.List data )) ( meta, List.List data )"},{"name":"document","comment":" Create a markup `Document`. You're first goal is to describe a document in terms of the blocks you're expecting.\n\nHere's an overly simple document that captures one block, a Title, and wraps it in some `Html`\n\n    document : Mark.Document (Html msg)\n    document =\n        Mark.document\n            (\\title -> Html.main [] [ title ])\n            (Mark.block \"Title\"\n                (Html.h1 [])\n                Mark.string\n            )\n\nwill parse the following markup:\n\n```markup\n|> Title\n    Here is my title!\n```\n\nand ultimately render it as\n\n```html\n<main>\n    <h1>Here is my title!</h1>\n</main>\n```\n\n","type":"List.List (Mark.Block block) -> Mark.Document () block"},{"name":"documentId","comment":" ","type":"Mark.Edit.Id -> String.String"},{"name":"documentWith","comment":" Capture some metadata at the start of your document, followed by the body.\n\n    import Mark\n\n    Mark.documentWith\n        { id = \\metadata -> metadata.id\n        , metadata =\n            Mark.record\n                (\\id author publishedAt ->\n                    { author = author\n                    , publishedAt = publishedAt\n                    }\n                )\n                |> Mark.field \"id\" Mark.string\n                |> Mark.field \"author\" Mark.string\n                |> Mark.field \"publishedAt\" Mark.string\n        , blocks =\n            [\n\n            ]\n        }\n\n**Note** - You can also specify an `id`, which is a document identifier and is included in `Mark.Edit.Id`. This is really only necessary if you're building an editor that can edit multiple documents at once.\n\nOtherwise, feel free to simple put `id = \\_ -> \"doc\"`\n\n","type":"{ id : metadata -> String.String, metadata : Mark.Record metadata, blocks : List.List (Mark.Block block) } -> Mark.Document metadata block"},{"name":"field","comment":" ","type":"String.String -> Mark.Block value -> Mark.Record (value -> result) -> Mark.Record result"},{"name":"float","comment":" ","type":"Mark.Block Basics.Float"},{"name":"idToString","comment":" It may be necessary to convert an `Id` to a `String` and back in order attach it as an `Html.Attributes.id` and read it back.\n\nSee the editor example for more details.\n\n**Note** be aware that the actual string format of an `Id` is an implementation detail and may change even on patch releases of a library.\n\n","type":"Mark.Edit.Id -> String.String"},{"name":"int","comment":" ","type":"Mark.Block Basics.Int"},{"name":"lookup","comment":" Look up a specific block in your document by id.\n","type":"Mark.Edit.Id -> Mark.Document meta block -> Mark.Parsed -> Mark.Outcome (List.List Mark.Error.Error) (Mark.Partial block) block"},{"name":"manyOf","comment":" Many blocks that are all at the same indentation level.\n","type":"List.List (Mark.Block a) -> Mark.Block (List.List a)"},{"name":"map","comment":" Change the result of a block by applying a function to it.\n","type":"(a -> b) -> Mark.Block a -> Mark.Block b"},{"name":"metadata","comment":" ","type":"Mark.Document metadata document -> String.String -> Result.Result Mark.Error.Error metadata"},{"name":"onError","comment":" Parsing any given `Block` can fail.\n\nHowever sometimes we don't want the _whole document_ to be unable to render just because there was a small error somewhere.\n\nSo, we need some way to say \"Hey, if you run into an issue, here's a placeholder value to use.\"\n\nAnd that's what `Mark.onError` does.\n\n    Mark.int\n        |> Mark.onError 5\n\nThis means if we fail to parse an integer (let's say we added a decimal), that this block would still be renderable with a default value of `5`.\n\n**Note** If there _is_ an error that is fixed using `onError`, we'll get a [`Partial`](#Partial) when we render the document. This will let us see the _full rendered document_, but also see the _error_ that actually occurred.\n\n","type":"a -> Mark.Block a -> Mark.Block a"},{"name":"oneOf","comment":" ","type":"List.List (Mark.Block a) -> Mark.Block a"},{"name":"parse","comment":" ","type":"Mark.Document metadata data -> String.String -> Mark.Outcome (List.List Mark.Error.Error) (Mark.Partial Mark.Parsed) Mark.Parsed"},{"name":"record","comment":" Parse a record with any number of fields.\n\n    Mark.record \"Image\"\n        (\\src description ->\n            Html.img\n                [ Html.Attributes.src src\n                , Html.Attributes.alt description\n                ]\n                []\n        )\n        |> Mark.field \"src\" Mark.string\n        |> Mark.field \"description\" Mark.string\n        |> Mark.toBlock\n\nwould parse the following markup:\n\n```markup\n|> Image\n    src = http://placekitten/200/500\n    description = What a cutie.\n```\n\nFields can be in any order in the markup. Also, by convention field names should be `camelCase`. This might be enforced in the future.\n\n","type":"String.String -> data -> Mark.Record data"},{"name":"render","comment":" ","type":"Mark.Document meta data -> Mark.Parsed -> Mark.Outcome (List.List Mark.Error.Error) (Mark.Partial ( meta, List.List data )) ( meta, List.List data )"},{"name":"replacement","comment":" Replace a string with another string. This can be useful to have shortcuts to unicode characters.\n\nFor example, we could use this to replace `...` with the unicode ellipses character: `…`.\n\n","type":"String.String -> String.String -> Mark.Replacement"},{"name":"string","comment":" This will capture a multiline string.\n\nFor example:\n\n    Mark.block \"Poem\"\n        (\\str -> str)\n        Mark.string\n\nwill capture\n\n```markup\n|> Poem\n    Whose woods these are I think I know.\n    His house is in the village though;\n    He will not see me stopping here\n    To watch his woods fill up with snow.\n```\n\nWhere `str` in the above function will be\n\n    \"\"\"Whose woods these are I think I know.\n    His house is in the village though;\n    He will not see me stopping here\n    To watch his woods fill up with snow.\"\"\"\n\n**Note** If you're looking for styled text, you probably want [`Mark.text`](#text) or [`Mark.textWith`](#textWith).\n\n","type":"Mark.Block String.String"},{"name":"stringToId","comment":" ","type":"String.String -> Maybe.Maybe Mark.Edit.Id"},{"name":"text","comment":" One of the first things that's interesting about a markup language is how to handle _styled text_.\n\nIn `elm-markup` there are only a limited number of special characters for formatting text.\n\n  - `/italic/` results in _italics_\n  - `*bold*` results in **bold**\n  - and `~strike~` results in ~~strike~~\n\nHere's an example of how to convert markup text into `Html` using `Mark.text`:\n\n    Mark.text\n        (\\styles string ->\n            Html.span\n                [ Html.Attributes.classList\n                    [ ( \"bold\", styles.bold )\n                    , ( \"italic\", styles.italic )\n                    , ( \"strike\", styles.strike )\n                    ]\n                ]\n                [ Html.text string ]\n        )\n\nThough you might be thinking that `bold`, `italic`, and `strike` are not nearly enough!\n\nAnd you're right, this is just to get you started. Your next stop is [`Mark.textWith`](#textWith), which is more involved to use but can represent everything you're used to having in a markup language.\n\n**Note:** Text blocks stop when two consecutive newline characters are encountered.\n\n","type":"(Mark.Styles -> String.String -> text) -> Mark.Block (List.List text)"},{"name":"textWith","comment":" Handling formatted text is a little more involved than may be initially apparent, but have no fear!\n\n`textWith` is where a lot of things come together. Let's check out what these fields actually mean.\n\n  - `view` is the function to render an individual fragment of text.\n      - This is mostly what [`Mark.text`](#text) does, so it should seem familiar.\n  - `replacements` will replace characters before rendering.\n      - For example, we can replace `...` with the real ellipses unicode character, `…`.\n  - `inlines` are custom inline blocks. You can use these to render things like links or emojis :D.\n\n","type":"{ view : Mark.Styles -> String.String -> rendered, replacements : List.List Mark.Replacement, inlines : List.List (Mark.Record rendered) } -> Mark.Block (List.List rendered)"},{"name":"toBlock","comment":" Convert a `Record` to a `Block`.\n","type":"Mark.Record a -> Mark.Block a"},{"name":"toString","comment":" ","type":"Mark.Parsed -> String.String"},{"name":"tree","comment":" Would you believe that a markdown list is actually a tree?\n\nHere's an example of a nested list in `elm-markup`:\n\n```markup\n|> List\n    1.  This is definitely the first thing.\n\n        With some additional content.\n\n    --- Another thing.\n\n        And some more content\n\n        1.  A sublist\n\n            With it's content\n\n            And some other content\n\n        --- Second item\n```\n\n**Note** As before, the indentation is always a multiple of 4.\n\nIn `elm-markup` you can make a nested section either `Bulleted` or `Numbered` by having the first element of the section start with `-` or `1.`.\n\nThe rest of the icons at that level are ignored. So this:\n\n    |> List\n        1. First\n        -- Second\n        -- Third\n\nIs a numbered list. And this:\n\n    |> List\n        -- First\n            1. sublist one\n            -- sublist two\n            -- sublist three\n        -- Second\n        -- Third\n\nis a bulleted list with a numbered list inside of it.\n\n**Note** You can use as many dashes(`-`) as you want to start an item. This can be useful to make the indentation match up. Similarly, you can also use spaces after the dash or number.\n\nHere's how to render the above list:\n\n    import Mark\n\n    myTree =\n        Mark.tree \"List\" renderList text\n\n    -- Note: we have to define this as a separate function because\n    -- `Items` and `Node` are a pair of mutually recursive data structures.\n    -- It's easiest to render them using two separate functions:\n    -- renderList and renderItem\n    renderList (Mark.Enumerated list) =\n        let\n            group =\n                case list.icon of\n                    Mark.Bullet ->\n                        Html.ul\n\n                    Mark.Number ->\n                        Html.ol\n        in\n        group []\n            (List.map renderItem list.items)\n\n    renderItem (Mark.Item item) =\n        Html.li []\n            [ Html.div [] item.content\n            , renderList item.children\n            ]\n\n","type":"(Mark.Enumerated item -> result) -> Mark.Block item -> Mark.Block result"},{"name":"verbatim","comment":" A `verbatim` annotation is denoted by backticks(\\`) and allows you to capture a literal string.\n\nJust like `annotation`, a `verbatim` can have a name and attributes attached to it.\n\nLet's say we wanted to embed an inline piece of elm code. We could write\n\n    inlineElm =\n        Mark.verbatim \"elm\"\n            (\\id str ->\n                Html.span\n                    [ Html.Attributes.class \"elm-code\" ]\n                    [ Html.text str ]\n            )\n\nWhich would capture the following\n\n    Here's an inline function: `\\you -> Awesome`{elm}.\n\n**Note** A verbatim can be written without a name or attributes and will capture the contents as a literal string, ignoring any special characters.\n\n    Let's take a look at `http://elm-lang.com`.\n\n","type":"String.String -> (Mark.Internal.Id.Id -> String.String -> result) -> Mark.Record result"},{"name":"verify","comment":" `Mark.verify` lets you put constraints on a block.\n\nLet's say you don't just want a `Mark.string`, you actually want a date.\n\nSo, you install the [`ISO8601`](https://package.elm-lang.org/packages/rtfeldman/elm-iso8601-date-strings/latest/) and you write something that looks like:\n\n    import Iso8601\n    import Mark\n    import Mark.Error\n    import Time\n\n    date : Mark.Block Time.Posix\n    date =\n        Mark.verify\n            (\\str ->\n                str\n                    |> Iso8601.toTime\n                    |> Result.mapError\n                        (\\_ -> illformatedDateMessage)\n            )\n            Mark.string\n\n    illformatedDateMessage =\n        Mark.Error.custom\n            { title = \"Bad Date\"\n            , message =\n                [ \"I was trying to parse a date, but this format looks off.\\n\\n\"\n                , \"Dates should be in ISO 8601 format:\\n\\n\"\n                , \"YYYY-MM-DDTHH:mm:ss.SSSZ\"\n                ]\n            }\n\nNow you can use `date` whever you actually want dates and the error message will be shown if something goes wrong.\n\nMore importantly, you now know if a document parses successfully, that all your dates are correctly formatted.\n\n`Mark.verify` is a very nice way to extend your markup however you'd like.\n\nYou could use it to\n\n  - add units to numbers\n  - parse a custom format, like [Latex mathematical equations](https://en.wikibooks.org/wiki/LaTeX/Mathematics#Operators)\n  - ensure that numbers are between a range or are always positive.\n\nHow exciting! Seriously, I think this is pretty cool.\n\n","type":"(a -> Result.Result Mark.Error.Custom b) -> Mark.Block a -> Mark.Block b"},{"name":"withAttr","comment":" Get an `Id` associated with a `Block`, which can be used to make updates through `Mark.Edit`.\n\n        Mark.string\n            |> Mark.withAttr\n                (\\str -> (\"link\", str))\n\n","type":"(a -> ( String.String, String.String )) -> Mark.Block a -> Mark.Block a"},{"name":"withId","comment":" Get an `Id` associated with a `Block`, which can be used to make updates through `Mark.Edit`.\n\n    Mark.withId\n        (\\id str ->\n            Html.span\n                [ onClick (Mark.Edit.delete id) ]\n                [ Html.text str ]\n        )\n        Mark.string\n\n","type":"(Mark.Edit.Id -> a -> b) -> Mark.Block a -> Mark.Block b"}],"binops":[]},{"name":"Mark.Edit","comment":" This module allows you to make **edits** to `Parsed`, that intermediate data structure we talked about in [`Mark`](Mark).\n\nThis means you can build an editor for your document.\n\nIn order to make edits to your document you need an [`Id`](#Id) and an [`Edit`](#Edit).\n\nOnce you have those you can [`update`](#update) your document, which can succeed or fail depending on if the edit was valid.\n\n\n# Updating `Parsed`\n\n@docs update, Id, Edit\n\n\n# Text Edits\n\nHere are edits you can make against [`Mark.text`](Mark#text) and [`Mark.textWith`](Mark#textWith) blocks.\n\n**Note** These edits don't apply to [`Mark.string`](Mark#string). If you want to modify a `Mark.string`, use [`Mark.Edit.replace`](Mark-Edit#replace).\n\n@docs Offset\n\n@docs insertString, insertText, deleteText\n\n@docs Styles, restyle, addStyles, removeStyles\n\n@docs annotate, verbatim\n\n\n# General Edits\n\n@docs replace, delete, insertAfter, insertFirst\n\n\n# Reading\n\n@docs copy, copyText\n\n","unions":[{"name":"Edit","comment":" ","args":[],"cases":[]}],"aliases":[{"name":"Id","comment":" Every block has an `Id`. You can retrieve the `Id` for a block using [`Mark.withId`](Mark#withId)\n","args":[],"type":"Mark.Internal.Id.Id"},{"name":"Offset","comment":" The index of the rendered `String`. Let's say you have this string in your markup source.\n\n```markup\nHere is *my string*.\n```\n\nWhen you're rendering this, it's broken into three segments.\n\n  - `Here is`\n  - `my string` (which is bold)\n  - `.`\n\nThe `Offset` is character position where those three strings are considered as one big one.\n\nHere are some lookups:\n\n  - `0  -> H`\n  - `8  -> m`\n  - `17 -> .`\n\nWe're not counting control characters from our markup source.\n\n","args":[],"type":"Basics.Int"},{"name":"Styles","comment":" ","args":[],"type":"{ bold : Basics.Bool, italic : Basics.Bool, strike : Basics.Bool }"}],"values":[{"name":"addStyles","comment":" Add the given styles if they are not present in the text selection.\n\n**Note:** Other styling is unaffected.\n\n","type":"Mark.Edit.Id -> Mark.Edit.Offset -> Mark.Edit.Offset -> Mark.Edit.Styles -> Mark.Edit.Edit"},{"name":"annotate","comment":" Put the current text selection within an `annotation` with some attributes.\n\nHere's an example that would turn the selection into a `link`.\n\n    Mark.Edit.annotate id\n        start\n        end\n        \"link\"\n        [ ( \"url\", Mark.New.string \"https://guide.elm-lang.org/\" ) ]\n\n**Note** existing annotations within the selection are removed.\n\n","type":"Mark.Edit.Id -> Mark.Edit.Offset -> Mark.Edit.Offset -> String.String -> List.List ( String.String, Mark.New.Block ) -> Mark.Edit.Edit"},{"name":"copy","comment":" ","type":"List.List Mark.Edit.Id -> Mark.Internal.Description.Parsed -> List.List Mark.New.Block"},{"name":"copyText","comment":" ","type":"Mark.Edit.Id -> Mark.Edit.Offset -> Mark.Edit.Offset -> Mark.Internal.Description.Parsed -> List.List Mark.New.Text"},{"name":"delete","comment":" Delete blocks.\n\nThis may fail if the block cannot be deleted(such as a field in a record).\n\n","type":"List.List Mark.Edit.Id -> Mark.Edit.Edit"},{"name":"deleteText","comment":" ","type":"Mark.Edit.Id -> Mark.Edit.Offset -> Mark.Edit.Offset -> Mark.Edit.Edit"},{"name":"insertAfter","comment":" Insert a block at an index within a `Mark.manyOf`.\n","type":"Mark.Edit.Id -> List.List Mark.New.Block -> Mark.Edit.Edit"},{"name":"insertFirst","comment":" Insert a block at the first position.\n\nThe id needed here is of the _parent_.\n\n","type":"Mark.Edit.Id -> Mark.New.Block -> Mark.Edit.Edit"},{"name":"insertString","comment":" This will work on both styled text and string datatypes.\n","type":"Mark.Edit.Id -> Mark.Edit.Offset -> String.String -> Mark.Edit.Edit"},{"name":"insertText","comment":" ","type":"Mark.Edit.Id -> Mark.Edit.Offset -> List.List Mark.New.Text -> Mark.Edit.Edit"},{"name":"removeStyles","comment":" Remove the given styles if they are present in the text selection.\n\n**Note:** Other styling is unaffected.\n\n","type":"Mark.Edit.Id -> Mark.Edit.Offset -> Mark.Edit.Offset -> Mark.Edit.Styles -> Mark.Edit.Edit"},{"name":"replace","comment":" The `Block` mentioned here is actually a `Mark.New.Block`. Use [`Mark.New`](/Mark-New) to create the new block you'd like.\n","type":"Mark.Edit.Id -> Mark.New.Block -> Mark.Edit.Edit"},{"name":"restyle","comment":" Remove all styling on the text selection and replace with the given styling.\n","type":"Mark.Edit.Id -> Mark.Edit.Offset -> Mark.Edit.Offset -> Mark.Edit.Styles -> Mark.Edit.Edit"},{"name":"update","comment":" ","type":"Mark.Internal.Description.Document meta data -> Mark.Edit.Edit -> Mark.Internal.Description.Parsed -> Result.Result (List.List Mark.Error.Error) Mark.Internal.Description.Parsed"},{"name":"verbatim","comment":" Same as `annotate`, but creates a `verbatim` instead.\n\n**Note** existing annotations within the selection are removed.\n\n","type":"Mark.Edit.Id -> Mark.Edit.Offset -> Mark.Edit.Offset -> String.String -> List.List ( String.String, Mark.New.Block ) -> Mark.Edit.Edit"}],"binops":[]},{"name":"Mark.Error","comment":"\n\n@docs Error\n\n\n# Rendering Errors\n\n@docs toString, toHtml, Theme, toDetails, Details, Text, Range, Position\n\n\n# Creating Custom Errors\n\n@docs Custom\n\n","unions":[{"name":"Theme","comment":" ","args":[],"cases":[["Dark",[]],["Light",[]]]}],"aliases":[{"name":"Custom","comment":" Create a custom error message to use with [`Mark.verify`](Mark#verify)\n","args":[],"type":"{ title : String.String, message : List.List String.String }"},{"name":"Details","comment":" ","args":[],"type":"{ title : String.String, message : List.List Mark.Error.Text, region : Maybe.Maybe Mark.Error.Range }"},{"name":"Error","comment":" ","args":[],"type":"Mark.Internal.Error.Rendered"},{"name":"Position","comment":" ","args":[],"type":"{ offset : Basics.Int, line : Basics.Int, column : Basics.Int }"},{"name":"Range","comment":" ","args":[],"type":"{ start : Mark.Error.Position, end : Mark.Error.Position }"},{"name":"Text","comment":" ","args":[],"type":"{ text : String.String, bold : Basics.Bool, underline : Basics.Bool, color : Maybe.Maybe String.String }"}],"values":[{"name":"toDetails","comment":" ","type":"Mark.Error.Error -> Mark.Error.Details"},{"name":"toHtml","comment":" ","type":"Mark.Error.Theme -> Mark.Error.Error -> Html.Html msg"},{"name":"toString","comment":" ","type":"Mark.Error.Error -> String.String"}],"binops":[]},{"name":"Mark.Internal.Description","comment":"\n\n@docs render, compile\n\n@docs Icon\n\n@docs Description, TextDescription, Text, Style\n\n@docs Expectation, InlineExpectation\n\n@docs Parsed, descriptionToString, toString, mergeWith\n\n@docs create, createInline\n\n@docs Styling, emptyStyles\n\n@docs inlineExample, blockName, uncertain, humanReadableExpectations\n\n@docs Uncertain, mapSuccessAndRecovered, renderBlock, getBlockExpectation, getParser, getParserNoBar\n\n@docs Block, BlockKind, Document\n\n@docs boldStyle, italicStyle, strikeStyle\n\n@docs getId, sizeFromRange\n\n@docs Record, Range, recordName, ParseContext, blockKindToContext, blockKindToSelection, length, match, matchExpected\n\n@docs BlockOutcome, InlineSelection, New, NewInline, ParsedDetails, createMany, emptyRange\n@docs findMany, findMatch, lookup, matchBlock, mergeListWithAttrs, mergeWithAttrs, minusPosition, toNew, toNewText\n@docs valid\n","unions":[{"name":"Block","comment":"\n\n    A `Block data` is just a parser that results in `data`.\n\nYou'll be building up your `Document` in terms of the `Blocks`.\n\nA block starts with `|` and has a name(already built into the parser)\n\nA value is just a raw parser.\n\n--- Error Propagation\n\n    Failure\n        -> The document has had a mismatch\n        -> This can only be recovered by `oneOf` or `manyOf`\n    Almost\n        -> An `Error` has been \"raised\".  It's propogated until it's resolved by `onError`\n        ->\n\n    Success\n        -> Well, this is the easy one.\n\n    Ids are only available on the element they apply to.\n\n    Recovery is done at the level above the errored block.\n\n    So, if there is a record with a string that is constrained\n\n    If the constraint fails, the record can say \"Here's the reset\"\n\n","args":["data"],"cases":[["Block",["{ kind : Mark.Internal.Description.BlockKind, converter : Mark.Internal.Description.Description -> Mark.Internal.Description.BlockOutcome data, expect : Mark.Internal.Description.Expectation, parser : Mark.Internal.Description.ParseContext -> Mark.Internal.Id.Seed -> ( Mark.Internal.Id.Seed, Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem Mark.Internal.Description.Description ) }"]]]},{"name":"BlockKind","comment":" ","args":[],"cases":[["Value",[]],["Named",["String.String"]],["VerbatimNamed",["String.String"]],["AnnotationNamed",["String.String"]]]},{"name":"Description","comment":" ","args":[],"cases":[["DescribeBlock",["{ id : Mark.Internal.Id.Id, name : String.String, found : Mark.Internal.Description.Description }"]],["Record",["{ id : Mark.Internal.Id.Id, name : String.String, found : List.List ( String.String, Mark.Internal.Description.Description ) }"]],["Group",["{ id : Mark.Internal.Id.Id, children : List.List Mark.Internal.Description.Description }"]],["StartsWith",["{ id : Mark.Internal.Id.Id, first : Mark.Internal.Description.Description, second : Mark.Internal.Description.Description }"]],["DescribeItem",["{ id : Mark.Internal.Id.Id, icon : Mark.Internal.Description.Icon, content : List.List Mark.Internal.Description.Description, children : List.List Mark.Internal.Description.Description }"]],["DescribeBoolean",["{ id : Mark.Internal.Id.Id, found : Basics.Bool }"]],["DescribeInteger",["{ id : Mark.Internal.Id.Id, found : Basics.Int }"]],["DescribeFloat",["{ id : Mark.Internal.Id.Id, found : ( String.String, Basics.Float ) }"]],["DescribeText",["{ id : Mark.Internal.Id.Id, text : List.List Mark.Internal.Description.TextDescription }"]],["DescribeString",["Mark.Internal.Id.Id","String.String"]],["DescribeUnexpected",["Mark.Internal.Id.Id","Mark.Internal.Error.UnexpectedDetails"]]]},{"name":"Document","comment":" ","args":["meta","data"],"cases":[["Document",["{ expect : Mark.Internal.Description.Expectation, metadata : Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem (Result.Result Mark.Internal.Error.UnexpectedDetails meta), parser : Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem Mark.Internal.Description.Parsed, converter : Mark.Internal.Description.Parsed -> Mark.Internal.Description.BlockOutcome ( meta, List.List data ) }"]]]},{"name":"Expectation","comment":" ","args":[],"cases":[["ExpectBlock",["String.String","Mark.Internal.Description.Expectation"]],["ExpectRecord",["String.String","List.List ( String.String, Mark.Internal.Description.Expectation )"]],["ExpectOneOf",["List.List Mark.Internal.Description.Expectation"]],["ExpectManyOf",["List.List Mark.Internal.Description.Expectation"]],["ExpectStartsWith",["Mark.Internal.Description.Expectation","Mark.Internal.Description.Expectation"]],["ExpectBoolean",["Basics.Bool"]],["ExpectInteger",["Basics.Int"]],["ExpectFloat",["Basics.Float"]],["ExpectTextBlock",["List.List Mark.Internal.Description.InlineExpectation"]],["ExpectString",["String.String"]],["ExpectTree",["Mark.Internal.Description.Expectation"]]]},{"name":"Icon","comment":" ","args":[],"cases":[["Bullet",[]],["AutoNumber",["Basics.Int"]]]},{"name":"InlineExpectation","comment":" ","args":[],"cases":[["ExpectText",["Mark.Internal.Description.Text"]],["ExpectInlineBlock",["{ name : String.String, kind : Mark.Internal.Description.InlineSelection, fields : List.List ( String.String, Mark.Internal.Description.Expectation ) }"]]]},{"name":"InlineSelection","comment":" ","args":[],"cases":[["EmptyAnnotation",[]],["SelectText",["List.List Mark.Internal.Description.Text"]],["SelectString",["String.String"]]]},{"name":"New","comment":" ","args":[],"cases":[["NewBlock",["String.String","Mark.Internal.Description.New"]],["NewRecord",["String.String","List.List ( String.String, Mark.Internal.Description.New )"]],["NewGroup",["List.List Mark.Internal.Description.New"]],["NewStartsWith",["Mark.Internal.Description.New","Mark.Internal.Description.New"]],["NewBoolean",["Basics.Bool"]],["NewInteger",["Basics.Int"]],["NewFloat",["Basics.Float"]],["NewTextBlock",["List.List Mark.Internal.Description.NewInline"]],["NewString",["String.String"]],["NewItem",["Mark.Internal.Description.Icon","List.List Mark.Internal.Description.New"]]]},{"name":"NewInline","comment":" ","args":[],"cases":[["NewText",["Mark.Internal.Description.Text"]],["NewInlineBlock",["{ name : String.String, kind : Mark.Internal.Description.InlineSelection, fields : List.List ( String.String, Mark.Internal.Description.New ) }"]]]},{"name":"ParseContext","comment":" ","args":[],"cases":[["ParseBlock",[]],["ParseInline",[]],["ParseInTree",[]]]},{"name":"Parsed","comment":" ","args":[],"cases":[["Parsed",["Mark.Internal.Description.ParsedDetails"]]]},{"name":"Record","comment":" ","args":["data"],"cases":[["ProtoRecord",["{ name : String.String, blockKind : Mark.Internal.Description.BlockKind, expectations : List.List ( String.String, Mark.Internal.Description.Expectation ), fieldConverter : Mark.Internal.Description.Description -> Mark.Internal.Description.InlineSelection -> Mark.Internal.Description.BlockOutcome (Mark.Internal.Description.FieldConverter data), fields : List.List Mark.Internal.Description.FieldParser }"]]]},{"name":"Style","comment":" ","args":[],"cases":[["Bold",[]],["Italic",[]],["Strike",[]]]},{"name":"Text","comment":" A text fragment with some styling.\n","args":[],"cases":[["Text",["Mark.Internal.Description.Styling","String.String"]]]},{"name":"TextDescription","comment":" ","args":[],"cases":[["Styled",["Mark.Internal.Description.Text"]],["InlineBlock",["{ kind : Mark.Internal.Description.InlineSelection, record : Mark.Internal.Description.Description }"]]]},{"name":"Uncertain","comment":" With this type, we're not quite sure if we're going to be able to render or not.\n\nScenarios:\n\n  - A field value of a record has multiple errors with it.\n  - It's caught and the error statue is rendered immediately.\n  - The document can be rendered, but we still have multiple errors to keep track of.\n\n","args":["data"],"cases":[["Uncertain",["( Mark.Internal.Error.UnexpectedDetails, List.List Mark.Internal.Error.UnexpectedDetails )"]],["Recovered",["( Mark.Internal.Error.UnexpectedDetails, List.List Mark.Internal.Error.UnexpectedDetails )","data"]]]}],"aliases":[{"name":"BlockOutcome","comment":" ","args":["data"],"type":"Mark.Internal.Outcome.Outcome Mark.Internal.Error.AstError (Mark.Internal.Description.Uncertain (Mark.Internal.Description.WithAttr data)) (Mark.Internal.Description.WithAttr data)"},{"name":"ParsedDetails","comment":" ","args":[],"type":"{ errors : List.List Mark.Internal.Error.Rendered, found : Mark.Internal.Description.Description, expected : Mark.Internal.Description.Expectation, initialSeed : Mark.Internal.Id.Seed, currentSeed : Mark.Internal.Id.Seed, attributes : List.List Mark.Internal.Description.Attribute }"},{"name":"Range","comment":" ","args":[],"type":"{ start : Mark.Internal.Description.Position, end : Mark.Internal.Description.Position }"},{"name":"Styling","comment":" ","args":[],"type":"{ bold : Basics.Bool, italic : Basics.Bool, strike : Basics.Bool }"}],"values":[{"name":"blockKindToContext","comment":" ","type":"Mark.Internal.Description.BlockKind -> Mark.Internal.Description.ParseContext"},{"name":"blockKindToSelection","comment":" ","type":"Mark.Internal.Description.BlockKind -> Mark.Internal.Description.InlineSelection"},{"name":"blockName","comment":" ","type":"Mark.Internal.Description.Block data -> Maybe.Maybe String.String"},{"name":"boldStyle","comment":" ","type":"Mark.Internal.Description.Styling"},{"name":"compile","comment":" ","type":"Mark.Internal.Description.Document meta data -> String.String -> Result.Result (Mark.Internal.Outcome.Outcome (List.List Mark.Internal.Error.Rendered) { errors : List.List Mark.Internal.Error.Rendered, result : ( meta, List.List data ) } ( meta, List.List data )) ( Mark.Internal.Description.Parsed, Mark.Internal.Outcome.Outcome (List.List Mark.Internal.Error.Rendered) { errors : List.List Mark.Internal.Error.Rendered, result : ( meta, List.List data ) } ( meta, List.List data ) )"},{"name":"create","comment":" This function does no validation, it only creates a new Description.\n\n    `\n\n","type":"Mark.Internal.Id.Seed -> Mark.Internal.Description.New -> { desc : Mark.Internal.Description.Description, seed : Mark.Internal.Id.Seed }"},{"name":"createInline","comment":" ","type":"List.List Mark.Internal.Description.NewInline -> List.List Mark.Internal.Description.TextDescription"},{"name":"createMany","comment":" NOTE, this returns items in reversed order!\n","type":"Mark.Internal.Id.Seed -> List.List Mark.Internal.Description.New -> { new : List.List Mark.Internal.Description.Description, seed : Mark.Internal.Id.Seed }"},{"name":"descriptionToString","comment":" ","type":"Mark.Internal.Description.Description -> String.String"},{"name":"emptyRange","comment":" ","type":"{ start : { offset : number, line : number, column : number }, end : { offset : number, line : number, column : number } }"},{"name":"emptyStyles","comment":" ","type":"Mark.Internal.Description.Styling"},{"name":"findMany","comment":" Subtle destinction between this and `find`.\n\nThis will NOT reconstruct the full hierarchy, but return the exact blocks asked for.\n\nThis also won't verify that all ids in the document were found, it'll just return the stuff it finds.\n\n","type":"List.List Mark.Internal.Id.Id -> Mark.Internal.Description.Description -> List.List Mark.Internal.Description.Description"},{"name":"findMatch","comment":" ","type":"Mark.Internal.Description.Description -> List.List (Mark.Internal.Description.Block a) -> Mark.Internal.Outcome.Outcome Mark.Internal.Error.AstError (Mark.Internal.Description.Uncertain (Mark.Internal.Description.WithAttr a)) (Mark.Internal.Description.WithAttr a)"},{"name":"getBlockExpectation","comment":" ","type":"Mark.Internal.Description.Block data -> Mark.Internal.Description.Expectation"},{"name":"getId","comment":" ","type":"Mark.Internal.Description.Description -> Mark.Internal.Id.Id"},{"name":"getParser","comment":" ","type":"Mark.Internal.Description.ParseContext -> Mark.Internal.Id.Seed -> Mark.Internal.Description.Block data -> ( Mark.Internal.Id.Seed, Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem Mark.Internal.Description.Description )"},{"name":"getParserNoBar","comment":" ","type":"Mark.Internal.Description.ParseContext -> Mark.Internal.Id.Seed -> Mark.Internal.Description.Block data -> ( Mark.Internal.Id.Seed, Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem Mark.Internal.Description.Description )"},{"name":"humanReadableExpectations","comment":" ","type":"Mark.Internal.Description.Expectation -> String.String"},{"name":"inlineExample","comment":" ","type":"Mark.Internal.Description.InlineSelection -> Mark.Internal.Description.Block a -> Maybe.Maybe String.String"},{"name":"italicStyle","comment":" ","type":"Mark.Internal.Description.Styling"},{"name":"length","comment":" ","type":"Mark.Internal.Description.TextDescription -> Basics.Int"},{"name":"lookup","comment":" In order for block lookups to work and for the block to be renderable, we need to retrieve a block, but keep the general structure.\n\nSo, if we have `ManyOf [ One,Two ]`, and our ID matches `Two`, we need to return `ManyOf [Two]`, not just `Two`.\n\nThen our rendering function will still work.\n\n","type":"Mark.Internal.Id.Id -> Mark.Internal.Description.Document meta block -> Mark.Internal.Description.Parsed -> Mark.Internal.Outcome.Outcome (List.List Mark.Internal.Error.Rendered) (Mark.Internal.Description.Partial block) block"},{"name":"mapSuccessAndRecovered","comment":" ","type":"(success -> otherSuccess) -> Mark.Internal.Description.BlockOutcome success -> Mark.Internal.Description.BlockOutcome otherSuccess"},{"name":"match","comment":" ","type":"Mark.Internal.Description.Description -> Mark.Internal.Description.Expectation -> Basics.Bool"},{"name":"matchBlock","comment":" ","type":"Mark.Internal.Description.Description -> Mark.Internal.Description.Block a -> Basics.Bool"},{"name":"matchExpected","comment":" Is the first expectation a subset of the second?\n","type":"Mark.Internal.Description.Expectation -> Mark.Internal.Description.Expectation -> Basics.Bool"},{"name":"mergeListWithAttrs","comment":" ","type":"(List.List one -> List.List two -> final) -> Mark.Internal.Description.ListOutcome one -> Mark.Internal.Description.ListOutcome two -> Mark.Internal.Description.BlockOutcome final"},{"name":"mergeWith","comment":" ","type":"(success -> a -> b) -> Mark.Internal.Outcome.Outcome failure (Mark.Internal.Description.Uncertain success) success -> Mark.Internal.Outcome.Outcome c (Mark.Internal.Description.Uncertain a) a -> Mark.Internal.Outcome.Outcome Mark.Internal.Error.AstError (Mark.Internal.Description.Uncertain b) b"},{"name":"mergeWithAttrs","comment":" mergeWithAttrs\n","type":"(one -> two -> final) -> Mark.Internal.Description.BlockOutcome one -> Mark.Internal.Description.BlockOutcome two -> Mark.Internal.Description.BlockOutcome final"},{"name":"minusPosition","comment":" ","type":"Mark.Internal.Description.Position -> Mark.Internal.Description.Position -> Mark.Internal.Description.Position"},{"name":"recordName","comment":" ","type":"Mark.Internal.Description.Description -> Maybe.Maybe String.String"},{"name":"render","comment":" Render is a little odd.\n\nWe should always expect `Parsed` to either already have our error messages, or to succeed.\n\nRender can't add additional errors.\n\n","type":"Mark.Internal.Description.Document meta data -> Mark.Internal.Description.Parsed -> Mark.Internal.Outcome.Outcome (List.List Mark.Internal.Error.Rendered) { errors : List.List Mark.Internal.Error.Rendered, result : ( meta, List.List data ) } ( meta, List.List data )"},{"name":"renderBlock","comment":" ","type":"Mark.Internal.Description.Block data -> Mark.Internal.Description.Description -> Mark.Internal.Description.BlockOutcome data"},{"name":"sizeFromRange","comment":" ","type":"Mark.Internal.Description.Range -> { offset : Basics.Int, line : Basics.Int }"},{"name":"strikeStyle","comment":" ","type":"Mark.Internal.Description.Styling"},{"name":"toNew","comment":" ","type":"Mark.Internal.Description.Description -> Mark.Internal.Description.New"},{"name":"toNewText","comment":" ","type":"Mark.Internal.Description.TextDescription -> Mark.Internal.Description.NewInline"},{"name":"toString","comment":" ","type":"Mark.Internal.Description.Parsed -> String.String"},{"name":"uncertain","comment":" ","type":"Mark.Internal.Error.UnexpectedDetails -> Mark.Internal.Outcome.Outcome Mark.Internal.Error.AstError (Mark.Internal.Description.Uncertain data) data"},{"name":"valid","comment":" ","type":"Mark.Internal.Description.New -> Mark.Internal.Description.Expectation -> Basics.Bool"}],"binops":[]},{"name":"Mark.Internal.Error","comment":"\n\n@docs Error, render\n\n@docs Context, Problem, UnexpectedDetails, documentMismatch, renderParsingErrors, idNotFound\n\n@docs EditErr, AstError, Rendered, compilerError, renderEditError\n\n","unions":[{"name":"AstError","comment":" ","args":[],"cases":[["NoMatch",[]]]},{"name":"Context","comment":" ","args":[],"cases":[["InBlock",["String.String"]],["InInline",["String.String"]],["InRecord",["String.String"]],["InRecordField",["String.String"]]]},{"name":"EditErr","comment":" ","args":[],"cases":[["IdNotFound",[]],["InvalidTextEdit",[]],["InvalidInsert",[]],["InvalidDelete",[]],["DocumentDoesntAllow",["String.String","List.List String.String"]]]},{"name":"Error","comment":" ","args":[],"cases":[["DocumentMismatch",[]],["CompilerError",[]],["ParsingIssue",["List.List (Parser.Advanced.DeadEnd Mark.Internal.Error.Context Mark.Internal.Error.Problem)"]],["UnknownBlock",["List.List String.String"]],["UnknownInline",["List.List String.String"]],["FailMatchOneOf",["List.List String.String"]],["MissingFields",["List.List String.String"]],["NonMatchingFields",["{ expecting : List.List String.String, found : List.List String.String }"]],["UnexpectedField",["{ found : String.String, options : List.List String.String, recordName : String.String }"]],["ExpectingIndent",["Basics.Int"]],["CantStartTextWithSpace",[]],["UnclosedStyle",["{ bold : Basics.Bool, italic : Basics.Bool, strike : Basics.Bool }"]],["BadFloat",[]],["BadInt",[]],["BadBool",[]],["Custom",["{ title : String.String, message : List.List String.String }"]],["EditingError",["Mark.Internal.Error.EditErr"]]]},{"name":"Problem","comment":" ","args":[],"cases":[["ExpectingIndentation",["Basics.Int"]],["InlineStart",[]],["InlineEnd",[]],["BlockStart",[]],["Expecting",["String.String"]],["ExpectingBlockName",["String.String"]],["ExpectingInlineName",["String.String"]],["ExpectingFieldName",["String.String"]],["Escape",[]],["EscapedChar",[]],["Newline",[]],["Space",[]],["End",[]],["Integer",[]],["FloatingPoint",[]],["InvalidNumber",[]]]},{"name":"Rendered","comment":" ","args":[],"cases":[["Rendered",["{ title : String.String, problem : Mark.Internal.Error.Error, region : { start : Mark.Internal.Error.Position, end : Mark.Internal.Error.Position }, message : List.List Mark.Internal.Format.Text }"]],["Global",["{ problem : Mark.Internal.Error.Error, title : String.String, message : List.List Mark.Internal.Format.Text }"]]]}],"aliases":[{"name":"UnexpectedDetails","comment":" ","args":[],"type":"{ range : Mark.Internal.Error.Range, problem : Mark.Internal.Error.Error }"}],"values":[{"name":"compilerError","comment":" ","type":"Mark.Internal.Error.Rendered"},{"name":"documentMismatch","comment":" ","type":"Mark.Internal.Error.Rendered"},{"name":"idNotFound","comment":" ","type":"Mark.Internal.Error.Rendered"},{"name":"render","comment":" ","type":"String.String -> Mark.Internal.Error.UnexpectedDetails -> Mark.Internal.Error.Rendered"},{"name":"renderEditError","comment":" ","type":"Mark.Internal.Error.EditErr -> Mark.Internal.Error.Rendered"},{"name":"renderParsingErrors","comment":" ","type":"String.String -> List.List (Parser.Advanced.DeadEnd Mark.Internal.Error.Context Mark.Internal.Error.Problem) -> Mark.Internal.Error.Rendered"}],"binops":[]},{"name":"Mark.Internal.Format","comment":" \n@docs Text, bold, cyan, red, text, underline, yellow\n","unions":[],"aliases":[{"name":"Text","comment":" ","args":[],"type":"{ text : String.String, bold : Basics.Bool, underline : Basics.Bool, color : Maybe.Maybe String.String }"}],"values":[{"name":"bold","comment":" ","type":"Mark.Internal.Format.Text -> Mark.Internal.Format.Text"},{"name":"cyan","comment":" ","type":"Mark.Internal.Format.Text -> Mark.Internal.Format.Text"},{"name":"red","comment":" ","type":"Mark.Internal.Format.Text -> Mark.Internal.Format.Text"},{"name":"text","comment":" ","type":"String.String -> Mark.Internal.Format.Text"},{"name":"underline","comment":" ","type":"Mark.Internal.Format.Text -> Mark.Internal.Format.Text"},{"name":"yellow","comment":" ","type":"Mark.Internal.Format.Text -> Mark.Internal.Format.Text"}],"binops":[]},{"name":"Mark.Internal.Id","comment":" \n@docs Id, Seed, dedent, fromString, indent, initialSeed, step, thread, threadThrough, toString\n","unions":[{"name":"Id","comment":" ","args":[],"cases":[["Id",["String.String","List.List Basics.Int"]]]},{"name":"Seed","comment":" We might want to move to a list based ID.\n\nSo, when we `indent`, we're actually adding a level.\n\n    Seed [0]\n\n    Seed [1] --indent -> Seed [1, 0]\n                            |\n                            v\n                         Seed [1, 1]\n\n\n    Seed [2]\n\nIs there a performance issue with allocating a bunch of lists intead of base Ints?\n\nA very common pattern is to\n\n    1. step a seed forward and pass that seed for the next block\n    2. indent the same original seed, and pass that to the children\n\nSo\n\n    [0]\n        -> stepped [1]  (goes to next element by handing the seed back in the parser)\n        -> indented [0,0] (handed to child parser to go nuts with)\n\n","args":[],"cases":[]}],"aliases":[],"values":[{"name":"dedent","comment":" ","type":"Basics.Int -> Mark.Internal.Id.Seed -> Mark.Internal.Id.Seed"},{"name":"fromString","comment":" ","type":"String.String -> Maybe.Maybe Mark.Internal.Id.Id"},{"name":"indent","comment":" ","type":"Mark.Internal.Id.Seed -> Mark.Internal.Id.Seed"},{"name":"initialSeed","comment":" ","type":"String.String -> Mark.Internal.Id.Seed"},{"name":"step","comment":" ","type":"Mark.Internal.Id.Seed -> ( Mark.Internal.Id.Id, Mark.Internal.Id.Seed )"},{"name":"thread","comment":" ","type":"Mark.Internal.Id.Seed -> List.List (Mark.Internal.Id.Seed -> ( Mark.Internal.Id.Seed, thing )) -> ( Mark.Internal.Id.Seed, List.List thing )"},{"name":"threadThrough","comment":" ","type":"(a -> ( b, c )) -> ( a, List.List c ) -> ( b, List.List c )"},{"name":"toString","comment":" ","type":"Mark.Internal.Id.Id -> String.String"}],"binops":[]},{"name":"Mark.Internal.Index","comment":"\n@docs Index, dedent, increment, indent, toList, top, zero\n ","unions":[{"name":"Index","comment":" ","args":[],"cases":[["Index",["Basics.Int","List.List Basics.Int"]]]}],"aliases":[],"values":[{"name":"dedent","comment":" ","type":"Mark.Internal.Index.Index -> Mark.Internal.Index.Index"},{"name":"increment","comment":" ","type":"Mark.Internal.Index.Index -> Mark.Internal.Index.Index"},{"name":"indent","comment":" ","type":"Mark.Internal.Index.Index -> Mark.Internal.Index.Index"},{"name":"toList","comment":" ","type":"Mark.Internal.Index.Index -> ( Basics.Int, List.List Basics.Int )"},{"name":"top","comment":" ","type":"Mark.Internal.Index.Index -> Basics.Int"},{"name":"zero","comment":" ","type":"Mark.Internal.Index.Index"}],"binops":[]},{"name":"Mark.Internal.Outcome","comment":"\n\n@docs Outcome, mapSuccess\n\n","unions":[{"name":"Outcome","comment":" ","args":["failure","almost","success"],"cases":[["Success",["success"]],["Almost",["almost"]],["Failure",["failure"]]]}],"aliases":[],"values":[{"name":"mapSuccess","comment":" ","type":"(success -> otherSuccess) -> Mark.Internal.Outcome.Outcome f a success -> Mark.Internal.Outcome.Outcome f a otherSuccess"}],"binops":[]},{"name":"Mark.Internal.Parser","comment":" \n@docs PreviouslyAdded\n    , RecordType\n    , Replacement\n    , backtrackCharacters\n    , float\n    , fullTree\n    , getFailableBlock\n    , getPosition\n    , getRangeAndSource\n    , iconParser\n    , indentationString\n    , indentedString\n    , int\n    , manyOf\n    , newline\n    , newlineWith\n    , oneOf\n    , peek\n    , raggedIndentedStringAbove\n    , record\n    , skipBlankLineWith\n    , styledText\n    , withIndent\n    , withRange\n    , withRangeResult\n    , word\n","unions":[{"name":"PreviouslyAdded","comment":" ","args":[],"cases":[["AddedContent",[]],["AddedItem",[]]]},{"name":"RecordType","comment":" ","args":[],"cases":[["InlineRecord",[]],["BlockRecord",[]]]},{"name":"Replacement","comment":" ","args":[],"cases":[["Replacement",["String.String","String.String"]],["Balanced",["{ start : ( String.String, String.String ), end : ( String.String, String.String ) }"]]]}],"aliases":[],"values":[{"name":"backtrackCharacters","comment":" ","type":"number -> { a | start : { b | offset : number, line : c, column : number }, end : d } -> { start : { offset : number, line : c, column : number }, end : d }"},{"name":"float","comment":" Parses a float and must end with whitespace, not additional characters.\n","type":"Mark.Internal.Id.Id -> Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem Mark.Internal.Description.Description"},{"name":"fullTree","comment":" Parse a full nested tree in one go.\n","type":"Mark.Internal.Description.ParseContext -> Mark.Internal.Description.Block thing -> ( Mark.Internal.Parser.NestedIndex, Mark.Internal.Parser.TreeCursor ) -> Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem (Parser.Advanced.Step ( Mark.Internal.Parser.NestedIndex, Mark.Internal.Parser.TreeCursor ) (List.List Mark.Internal.Description.Description))"},{"name":"getFailableBlock","comment":" ","type":"Mark.Internal.Description.ParseContext -> Mark.Internal.Id.Seed -> Mark.Internal.Description.Block data -> ( Mark.Internal.Id.Seed, Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem Mark.Internal.Description.Description )"},{"name":"getPosition","comment":" ","type":"Parser.Advanced.Parser c p Mark.Internal.Parser.Position"},{"name":"getRangeAndSource","comment":" ","type":"Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem thing -> Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem { source : String.String, range : Mark.Internal.Parser.Range, value : thing }"},{"name":"iconParser","comment":" ","type":"Parser.Advanced.Parser c Mark.Internal.Error.Problem Mark.Internal.Description.Icon"},{"name":"indentationString","comment":" ","type":"Basics.Int -> String.String"},{"name":"indentedString","comment":" ","type":"Basics.Int -> String.String -> Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem (Parser.Advanced.Step String.String String.String)"},{"name":"int","comment":" ","type":"Mark.Internal.Id.Id -> Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem Mark.Internal.Description.Description"},{"name":"manyOf","comment":" ","type":"Basics.Int -> List.List (Mark.Internal.Description.Block data) -> { a | found : List.List Mark.Internal.Description.Description, seed : Mark.Internal.Id.Seed, parsedSomething : Basics.Bool } -> Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem (Parser.Advanced.Step { parsedSomething : Basics.Bool, found : List.List Mark.Internal.Description.Description, seed : Mark.Internal.Id.Seed } (List.List Mark.Internal.Description.Description))"},{"name":"newline","comment":" ","type":"Parser.Advanced.Parser c Mark.Internal.Error.Problem ()"},{"name":"newlineWith","comment":" ","type":"String.String -> Parser.Advanced.Parser c Mark.Internal.Error.Problem ()"},{"name":"oneOf","comment":" ","type":"List.List (Mark.Internal.Description.Block data) -> List.List Mark.Internal.Description.Expectation -> Mark.Internal.Description.ParseContext -> Mark.Internal.Id.Seed -> ( Mark.Internal.Id.Seed, Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem Mark.Internal.Description.Description )"},{"name":"peek","comment":" ","type":"String.String -> Parser.Advanced.Parser c p thing -> Parser.Advanced.Parser c p thing"},{"name":"raggedIndentedStringAbove","comment":" ","type":"Basics.Int -> String.String -> Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem (Parser.Advanced.Step String.String String.String)"},{"name":"record","comment":" ","type":"Mark.Internal.Parser.RecordType -> Mark.Internal.Id.Id -> Mark.Internal.Id.Id -> String.String -> Mark.Internal.Description.Expectation -> List.List ( String.String, Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem ( String.String, Mark.Internal.Description.Description ) ) -> Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem Mark.Internal.Description.Description"},{"name":"skipBlankLineWith","comment":" ","type":"thing -> Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem thing"},{"name":"styledText","comment":" ","type":"{ inlines : List.List (Mark.Internal.Description.Block a), replacements : List.List Mark.Internal.Parser.Replacement } -> Mark.Internal.Description.ParseContext -> Mark.Internal.Id.Seed -> Mark.Internal.Parser.Position -> Mark.Internal.Description.Styling -> Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem Mark.Internal.Description.Description"},{"name":"withIndent","comment":" ","type":"(Basics.Int -> Parser.Advanced.Parser c x b) -> Parser.Advanced.Parser c x b"},{"name":"withRange","comment":" ","type":"Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem thing -> Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem ( Mark.Internal.Parser.Range, thing )"},{"name":"withRangeResult","comment":" ","type":"Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem (Result.Result err thing) -> Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem (Result.Result { range : Mark.Internal.Parser.Range, error : err } { range : Mark.Internal.Parser.Range, value : thing })"},{"name":"word","comment":" ","type":"Parser.Advanced.Parser Mark.Internal.Error.Context Mark.Internal.Error.Problem String.String"}],"binops":[]},{"name":"Mark.Internal.TolerantParser","comment":"\n\n@docs Parser, try\n\n@docs Token, token, keyword, symbol, OnError, skip, fastForwardTo, stopWith\n\n@docs succeed, ignore, keep\n\n@docs oneOf\n\n@docs chompWhile\n\n@docs map\n\n","unions":[{"name":"OnError","comment":" ","args":["error"],"cases":[["FastForwardTo",["List.List Char.Char"]],["Skip",[]],["StopWith",["error"]]]}],"aliases":[{"name":"Parser","comment":" ","args":["context","problem","data"],"type":"Parser.Advanced.Parser context problem (Result.Result (List.List problem) data)"},{"name":"Token","comment":" ","args":["problem"],"type":"{ match : String.String, problem : problem, onError : Mark.Internal.TolerantParser.OnError problem }"}],"values":[{"name":"chompWhile","comment":" ","type":"(Char.Char -> Basics.Bool) -> Parser.Advanced.Parser c x (Result.Result error ())"},{"name":"fastForwardTo","comment":" ","type":"List.List Char.Char -> Mark.Internal.TolerantParser.OnError error"},{"name":"ignore","comment":" ","type":"Mark.Internal.TolerantParser.Parser c p ignore -> Mark.Internal.TolerantParser.Parser c p keep -> Mark.Internal.TolerantParser.Parser c p keep"},{"name":"keep","comment":" Almost like `|=`, except\n","type":"Mark.Internal.TolerantParser.Parser c p a -> Mark.Internal.TolerantParser.Parser c p (a -> b) -> Mark.Internal.TolerantParser.Parser c p b"},{"name":"keyword","comment":" ","type":"Mark.Internal.TolerantParser.Token problem -> Mark.Internal.TolerantParser.Parser context problem ()"},{"name":"map","comment":" ","type":"(a -> b) -> Mark.Internal.TolerantParser.Parser c p a -> Mark.Internal.TolerantParser.Parser c p b"},{"name":"oneOf","comment":" A tolerant `oneOf` means it has to succeed.\n\nSo, you provide an error to return if everything else fails.\n\n","type":"problem -> List.List (Mark.Internal.TolerantParser.Parser context problem data) -> Mark.Internal.TolerantParser.Parser context problem data"},{"name":"skip","comment":" ","type":"Mark.Internal.TolerantParser.OnError error"},{"name":"stopWith","comment":" ","type":"a -> Mark.Internal.TolerantParser.OnError a"},{"name":"succeed","comment":" ","type":"data -> Mark.Internal.TolerantParser.Parser context problem data"},{"name":"symbol","comment":" ","type":"Mark.Internal.TolerantParser.Token problem -> Mark.Internal.TolerantParser.Parser context problem ()"},{"name":"token","comment":" ","type":"Mark.Internal.TolerantParser.Token problem -> Mark.Internal.TolerantParser.Parser context problem ()"},{"name":"try","comment":" This might be a little odd, but it essentially means the parser its attached to should run normally, meaning it's ok if it fails.\n\nThis is generally useful with a `oneOf`, to ensure that an option can fail in the normal way and skip to try the next option.\n\n","type":"Parser.Advanced.Parser c p d -> Mark.Internal.TolerantParser.Parser c p d"}],"binops":[]},{"name":"Mark.New","comment":" Create a new `Mark.Block` that can be added to your document using `Mark.Edit.replace` or `Mark.Edit.insertAt`.\n\nLet's say we are capturing a basic diagram in our document and we want to dynamically insert a circle.\n\nWe can make a new circle by writing the following function\n\n    import Mark.New as New\n\n    type alias Circle =\n        { x : Int\n        , y : Int\n        , label : String\n        }\n\n    circle : Circle -> Mark.New.Block\n    circle details =\n        New.record \"Circle\"\n            [ ( \"label\", New.string details.label )\n            , ( \"x\", New.int details.x )\n            , ( \"y\", New.int details.y )\n            ]\n\nAnd then insert our newly made circle using `Mark.Edit.insertAt`.\n\n**Note:** The document will only accept edits which are valid.\n\n@docs Block\n\n\n# Primitives\n\n@docs string, int, float, bool\n\n\n# Blocks\n\n@docs block, record, many\n\n@docs bullet, numbered\n\n\n# Text\n\nHere's an example of creating some text.\n\n    newText =\n        New.text\n            [ Mark.unstyled \"Look at my \"\n            , Mark.bold \"cool\"\n            , Mark.unstyled \" new text!\"\n            ]\n\n@docs Text, text, unstyled, bold, italics, strike, Styles, styled\n\n\n# Text Annotation\n\n@docs annotation, verbatim\n\n","unions":[],"aliases":[{"name":"Block","comment":" ","args":[],"type":"Mark.Internal.Description.New"},{"name":"Styles","comment":" ","args":[],"type":"{ bold : Basics.Bool, italic : Basics.Bool, strike : Basics.Bool }"},{"name":"Text","comment":" ","args":[],"type":"Mark.Internal.Description.NewInline"}],"values":[{"name":"annotation","comment":"\n\n    New.annotation\n        { name = \"link\"\n        , text =\n            [ New.unstyled \"my link to the elm website!\" ]\n        , fields =\n            [ ( \"url\", Mark.string \"https://elm-lang.com\" ) ]\n        }\n\n","type":"{ name : String.String, text : List.List ( Mark.New.Styles, String.String ), fields : List.List ( String.String, Mark.New.Block ) } -> Mark.New.Text"},{"name":"block","comment":" ","type":"String.String -> Mark.New.Block -> Mark.New.Block"},{"name":"bold","comment":" ","type":"String.String -> Mark.New.Text"},{"name":"bool","comment":" ","type":"Basics.Bool -> Mark.New.Block"},{"name":"bullet","comment":" ","type":"List.List Mark.New.Block -> Mark.New.Block"},{"name":"float","comment":" ","type":"Basics.Float -> Mark.New.Block"},{"name":"int","comment":" ","type":"Basics.Int -> Mark.New.Block"},{"name":"italics","comment":" ","type":"String.String -> Mark.New.Text"},{"name":"many","comment":" ","type":"List.List Mark.New.Block -> Mark.New.Block"},{"name":"numbered","comment":" ","type":"Basics.Int -> List.List Mark.New.Block -> Mark.New.Block"},{"name":"record","comment":" ","type":"String.String -> List.List ( String.String, Mark.New.Block ) -> Mark.New.Block"},{"name":"strike","comment":" ","type":"String.String -> Mark.New.Text"},{"name":"string","comment":" ","type":"String.String -> Mark.New.Block"},{"name":"styled","comment":" ","type":"Mark.New.Styles -> String.String -> Mark.New.Text"},{"name":"text","comment":" ","type":"List.List Mark.New.Text -> Mark.New.Block"},{"name":"unstyled","comment":" ","type":"String.String -> Mark.New.Text"},{"name":"verbatim","comment":" ","type":"{ name : String.String, text : String.String, fields : List.List ( String.String, Mark.New.Block ) } -> Mark.New.Text"}],"binops":[]}]