[{"name":"XMarkdown.API","comment":" XMarkdown.API provides the core compilation interface for converting XMarkdown\n(SMarkdown) source text into renderable elm-ui Elements.\n\n\n# Overview\n\nThe API follows a two-step workflow:\n\n1.  **Compile** source text into a `CompilerOutput` using `compileOutput`\n2.  **View** the compiled output using `viewBodyOnly` or `viewTOC`\n\nThis separation allows you to compile once and render different parts (body, table\nof contents) independently, which is useful for building rich document viewers with\nnavigation panels.\n\n\n# Compilation\n\n@docs compileOutput\n\n\n# Viewing\n\n@docs viewBodyOnly, viewTOC, BlockMatch, compile, fromMsg, renderedTextId, searchBlocksContainingText\n@docs viewEditor, compileString, compileStringWithTitle, defaultCompilerParameters, editorView\n\n\n# Usage Example\n\n    import XMarkdown.API\n    import XMarkdown.Types exposing (defaultCompilerParameters)\n\n\n    -- Configure compiler\n    params =\n        { defaultCompilerParameters\n            | docWidth = 600\n            , editCount = 0\n        }\n\n    -- Compile source text\n    output =\n        XMarkdown.API.compileOutput params\n            [ \"# Introduction\"\n            , \"This is a document with **bold** text.\"\n            , \"\"\n            , \"## Details\"\n            , \"More content here.\"\n            ]\n\n    -- Render the document body\n    bodyElements =\n        XMarkdown.API.viewBodyOnly 600 output\n\n    -- Render table of contents separately\n    tocElements =\n        XMarkdown.API.viewTOC output\n\n\n# See Also\n\nFor one-step compilation that parses and renders together, use `compileSimple`.\n\n@docs compileSimple\n\n","unions":[],"aliases":[{"name":"BlockMatch","comment":" Re-export BlockMatch type for searching\n","args":[],"type":"XMarkdown.Compiler.BlockMatch"}],"values":[{"name":"compile","comment":" ","type":"XMarkdown.Types.CompilerParameters -> List.List String.String -> XMarkdown.Types.CompilerOutput"},{"name":"compileOutput","comment":" Compile source text into a CompilerOutput structure.\n\nThis is the main compilation function that parses and processes XMarkdown source text.\nThe output contains the rendered body, optional banner, table of contents, and title,\nwhich can then be displayed using the view functions.\n\n    params =\n        { defaultCompilerParameters\n            | docWidth = 600\n        }\n\n    output =\n        compileOutput params\n            [ \"# My Document\"\n            , \"## Introduction\"\n            , \"Content here.\"\n            ]\n\n","type":"XMarkdown.Types.CompilerParameters -> List.List String.String -> XMarkdown.Types.CompilerOutput"},{"name":"compileSimple","comment":" Compile source text to elm-ui HTML in one step (parse + render). The width of\nthe rendered text in pixels is `docWidth`. Use `editCount = 0` for a static\ndocument; in a live-editing context, increment it after each edit so the rendered\ntext updates correctly.\n\n    import Element exposing (Element)\n    import XMarkdown.API exposing (MarkupMsg, defaultCompilerParameters)\n\nYour `Msg` type should include `| Render MarkupMsg`.\n\n","type":"XMarkdown.Types.CompilerParameters -> String.String -> List.List (Element.Element XMarkdown.Types.MarkupMsg)"},{"name":"compileString","comment":" ","type":"XMarkdown.Types.CompilerParameters -> String.String -> List.List (Element.Element XMarkdown.Types.MarkupMsg)"},{"name":"compileStringWithTitle","comment":" ","type":"String.String -> XMarkdown.Types.CompilerParameters -> String.String -> List.List (Element.Element XMarkdown.Types.MarkupMsg)"},{"name":"defaultCompilerParameters","comment":" ","type":"XMarkdown.Types.CompilerParameters"},{"name":"editorView","comment":" ","type":"XMarkdown.Editor.Config msg -> Html.Html msg"},{"name":"fromMsg","comment":" ","type":"Basics.Int -> XMarkdown.Types.MarkupMsg -> Maybe.Maybe XMarkdown.Types.SyncHighlight"},{"name":"renderedTextId","comment":" ","type":"String.String"},{"name":"searchBlocksContainingText","comment":" Search blocks in the document for text containing the search query.\n\nReturns a list of matching blocks with their metadata (id, lineNumber, numberOfLines, sourceText).\nThe search is case-insensitive.\n\n    matches =\n        searchBlocksContainingText params (String.lines sourceText) \"hello\"\n\n","type":"XMarkdown.Types.CompilerParameters -> List.List String.String -> String.String -> List.List XMarkdown.API.BlockMatch"},{"name":"viewBodyOnly","comment":" Render only the body content from a CompilerOutput.\n\nTakes a width parameter (in pixels) and returns a list of elm-ui Elements\nrepresenting the document body without the title or banner.\n\n    bodyElements =\n        viewBodyOnly 600 output\n\nThis is useful when you want to display the main content separately from other\ndocument parts like the table of contents or title.\n\n","type":"Basics.Int -> XMarkdown.Types.CompilerOutput -> List.List (Element.Element XMarkdown.Types.MarkupMsg)"},{"name":"viewEditor","comment":" ","type":"XMarkdown.Editor.Config msg -> Html.Html msg"},{"name":"viewTOC","comment":" Render the table of contents from a CompilerOutput.\n\nGenerates a navigable table of contents based on the document structure\n(sections, subsections, etc.).\n\n    tocElements =\n        viewTOC output\n\nThe table of contents automatically includes links to document sections and\nrespects the document hierarchy.\n\n","type":"XMarkdown.Types.CompilerOutput -> List.List (Element.Element XMarkdown.Types.MarkupMsg)"}],"binops":[]},{"name":"XMarkdown.Types","comment":" This module defines the core types used for configuring the Scripta compiler.\nThe main type is `CompilerParameters`, which controls how XMarkdown source text\nis compiled and rendered.\n\n\n# Configuration\n\n@docs CompilerParameters, defaultCompilerParameters, Filter\n\n\n## Key Parameters\n\n  - **docWidth**: Width of the rendered document in pixels\n  - **editCount**: Increment this after each edit for live editing contexts (use 0 for static documents)\n  - **selectedId**: ID of the currently selected block for highlighting\n  - **theme**: Visual theme (Light or Dark)\n  - **idsOfOpenNodes**: List of IDs for expanded/collapsed sections\n\n\n## Usage\n\nFor simple use cases, start with `defaultCompilerParameters` and override the fields you need:\n\n    { defaultCompilerParameters\n        | docWidth = 600\n        , editCount = model.editCount\n    }\n\n@docs CompilerOutput, Handling, MarkupMsg, SyncHighlight, Theme\n\n","unions":[{"name":"Filter","comment":" ","args":[],"cases":[["NoFilter",[]],["SuppressDocumentBlocks",[]]]},{"name":"Handling","comment":" How to handle a MarkupMsg.\n","args":[],"cases":[["MHStandard",[]],["MHAsCheatSheet",[]]]},{"name":"MarkupMsg","comment":" Messages from rendered markup for synchronization with the editor.\nUsed for rendered-to-source syncing (e.g., clicking rendered text highlights source).\n","args":[],"cases":[["SendMeta",["{ begin : Basics.Int, end : Basics.Int, index : Basics.Int, id : String.String }"]],["SendLineNumber",["{ begin : Basics.Int, end : Basics.Int }"]],["SelectId",["String.String"]],["ToggleTOCNodeID",["String.String"]],["HighlightId",["String.String"]],["JumpToTop",[]],["MMNoOp",[]]]},{"name":"Theme","comment":" Represents the available themes.\n","args":[],"cases":[["Light",[]],["Dark",[]]]}],"aliases":[{"name":"CompilerOutput","comment":" ","args":[],"type":"{ body : List.List (Element.Element XMarkdown.Types.MarkupMsg), banner : Maybe.Maybe (Element.Element XMarkdown.Types.MarkupMsg), toc : List.List (Element.Element XMarkdown.Types.MarkupMsg), title : Element.Element XMarkdown.Types.MarkupMsg, interBlockSpacing : Basics.Float }"},{"name":"CompilerParameters","comment":" ","args":[],"type":"{ windowWidth : Basics.Int, scale : Basics.Float, docWidth : Basics.Int, editCount : Basics.Int, selectedId : String.String, selectedSlug : Maybe.Maybe String.String, idsOfOpenNodes : List.List String.String, filter : XMarkdown.Types.Filter, theme : XMarkdown.Types.Theme, highlightColor : String.String, paddingAboveHeadings : Basics.Float, interBlockSpacing : Basics.Float, lineHeight : Basics.Float, fontSize : Basics.Int, numberToLevel : Basics.Int, data : Dict.Dict String.String String.String }"},{"name":"SyncHighlight","comment":" A source span to highlight in the editor.\n\n  - `mode = \"chars\"`: `start`/`end` are document character offsets (`end` exclusive).\n    Used for inline (phrase) clicks.\n  - `mode = \"lines\"`: `start`/`end` are 1-indexed source lines, both inclusive.\n    Used for block clicks.\n  - `tick` is a monotonic counter so repeat clicks on the same span re-trigger the editor.\n\n","args":[],"type":"{ mode : String.String, start : Basics.Int, end : Basics.Int, tick : Basics.Int }"}],"values":[{"name":"defaultCompilerParameters","comment":" ","type":"XMarkdown.Types.CompilerParameters"}],"binops":[]}]