[{"name":"Scripta","comment":" Public API for the Scripta compiler.\n\n\n# Options\n\n@docs Options, defaultOptions\n@docs withTheme, withWindowWidth, withContentWidth, withTOC, withMaxLevel, withSizing, withFilter\n@docs Theme, Filter, SizingConfig, defaultSizing\n\n\n# Documents and rendering\n\n@docs Document, Edit\n@docs Event, Output\n@docs parse, reparse, render, compile, mapEvent\n@docs applyEdit, applyEdits\n\n\n# Static export\n\n@docs exportHtml, exportLaTeX, exportRawLaTeX\n\n\n# Source\n\n@docs prettyPrint\n\n","unions":[{"name":"Event","comment":" An interaction event emitted by rendered output.\n\n  - `ClickedId` — the user clicked an element with the given id.\n  - `ClickedFootnote` / `ClickedCitation` — jump to a target, remembering a return id.\n  - `ClickedImage` — the user clicked an image (url).\n  - `ClickedLink` — the user clicked an internal document link (slug).\n  - `HighlightedId` — request to highlight the element with the given id.\n\n","args":[],"cases":[["ClickedId",["String.String"]],["ClickedFootnote",["{ targetId : String.String, returnId : String.String }"]],["ClickedCitation",["{ targetId : String.String, returnId : String.String }"]],["ClickedImage",["String.String"]],["ClickedLink",["String.String"]],["HighlightedId",["String.String"]]]},{"name":"Filter","comment":" Forest filter. `NoFilter` renders everything; `SuppressDocumentBlocks`\nhides `document` and `title` blocks.\n","args":[],"cases":[["NoFilter",[]],["SuppressDocumentBlocks",[]]]},{"name":"Theme","comment":" Light or dark theme.\n","args":[],"cases":[["Light",[]],["Dark",[]]]}],"aliases":[{"name":"Document","comment":" An opaque parsed document. Produced by `parse` / `reparse`, consumed by\n`render` and the `Scripta.Document` query functions.\n","args":[],"type":"Scripta.Internal.Document"},{"name":"Edit","comment":" A single source edit: a character range `removed` replaced by `inserted`,\nstarting at character `offset` in the pre-edit document.\n","args":[],"type":"Edit.Map.Edit"},{"name":"Options","comment":" Opaque compiler options. Build with `defaultOptions` and the `with*`\nfunctions.\n","args":[],"type":"Scripta.Internal.Options"},{"name":"Output","comment":" Rendered output, polymorphic in the message type so `mapEvent` can retarget it.\n","args":["msg"],"type":"{ title : Html.Html msg, body : List.List (Html.Html msg), toc : List.List (Html.Html msg), banner : Maybe.Maybe (Html.Html msg) }"},{"name":"SizingConfig","comment":" Sizing/spacing configuration (a record).\n","args":[],"type":"Scripta.Internal.SizingConfig"}],"values":[{"name":"applyEdit","comment":" Apply one edit's fast metadata shift to a Document, keeping the RL-sync\nmap (data-begin/data-end/data-lines/id) valid without reparsing content.\n\nThis is the high-frequency path (run per keystroke). It does NOT refresh\nblock content or rendering — use `reparse` on a longer debounce for that.\n","type":"Scripta.Edit -> Scripta.Document -> Scripta.Document"},{"name":"applyEdits","comment":" Apply a queue of edits in order (each in the coordinate space of the\ndocument produced by the previous edit).\n","type":"List.List Scripta.Edit -> Scripta.Document -> Scripta.Document"},{"name":"compile","comment":" Parse and render in one step (cold path).\n","type":"Scripta.Options -> String.String -> Scripta.Output Scripta.Event"},{"name":"defaultOptions","comment":" Default options: no filter, 800px window and content width, light theme,\nno table of contents, default sizing, unlimited heading level.\n","type":"Scripta.Options"},{"name":"defaultSizing","comment":" Default sizing configuration.\n","type":"Scripta.SizingConfig"},{"name":"exportHtml","comment":" Export a parsed Document as a complete standalone HTML document (a single String).\n\nThe output is meant for static viewing or printing: it includes a `<head>`\nthat pulls KaTeX from a CDN for math rendering and a default stylesheet,\nplus a `<body>` containing the title, optional TOC, and rendered content.\nNone of the interactive editor-sync handlers are included.\n\n","type":"Scripta.Options -> Scripta.Document -> String.String"},{"name":"exportLaTeX","comment":" Export a parsed document as a complete LaTeX document, with preamble, ready\nfor `xelatex`. The title and authors go into the document's title block.\n","type":"{ title : String.String, authors : List.List String.String } -> Scripta.Document -> String.String"},{"name":"exportRawLaTeX","comment":" Export a parsed document as LaTeX: the body only, without the preamble.\n","type":"Scripta.Document -> String.String"},{"name":"mapEvent","comment":" Retarget a whole Output from `Event` to the consumer's own message type.\n","type":"(Scripta.Event -> msg) -> Scripta.Output Scripta.Event -> Scripta.Output msg"},{"name":"parse","comment":" Parse source text into a Document (cold path: full parse).\n\nFor editor keystroke updates use `reparse`, which is incremental.\n\n","type":"Scripta.Options -> String.String -> Scripta.Document"},{"name":"prettyPrint","comment":" Pretty-print Scripta source text: parse it and write it back out with\nstandard indentation and spacing.\n","type":"String.String -> String.String"},{"name":"render","comment":" Render a parsed Document to HTML output carrying `Event`s.\n","type":"Scripta.Options -> Scripta.Document -> Scripta.Output Scripta.Event"},{"name":"reparse","comment":" Re-parse source text incrementally, reusing the previous Document's cache\nand accumulator where it is safe to do so. Use this for editor keystroke\nupdates; use `parse` for initial load and document switches.\n","type":"Scripta.Options -> Scripta.Document -> String.String -> Scripta.Document"},{"name":"withContentWidth","comment":" Set the content (text column) width in pixels.\n","type":"Basics.Int -> Scripta.Options -> Scripta.Options"},{"name":"withFilter","comment":" Set the forest filter.\n","type":"Scripta.Filter -> Scripta.Options -> Scripta.Options"},{"name":"withMaxLevel","comment":" Set the maximum heading level to render.\n","type":"Basics.Int -> Scripta.Options -> Scripta.Options"},{"name":"withSizing","comment":" Set the sizing configuration.\n","type":"Scripta.SizingConfig -> Scripta.Options -> Scripta.Options"},{"name":"withTOC","comment":" Show or hide the table of contents.\n","type":"Basics.Bool -> Scripta.Options -> Scripta.Options"},{"name":"withTheme","comment":" Set the theme.\n","type":"Scripta.Theme -> Scripta.Options -> Scripta.Options"},{"name":"withWindowWidth","comment":" Set the window width in pixels.\n","type":"Basics.Int -> Scripta.Options -> Scripta.Options"}],"binops":[]},{"name":"Scripta.Document","comment":" Query functions over a parsed Scripta `Document`.\n\n@docs Document\n@docs hasSections, idsContainingSource, sourceOfId, title\n\n","unions":[],"aliases":[{"name":"Document","comment":" Re-export of the opaque `Document` type.\n","args":[],"type":"Scripta.Internal.Document"}],"values":[{"name":"hasSections","comment":" Whether the document contains at least one `section` block. Used to decide\nwhether the rendered output includes a table of contents.\n","type":"Scripta.Document.Document -> Basics.Bool"},{"name":"idsContainingSource","comment":" Return the ids of all blocks whose source text contains `target`.\n\nReplaces hand-rolled forest walks like `Editor.matchingIdsInAST`. Used for\nleft-to-right sync: editor selection -> matching rendered element ids.\nAn empty or whitespace-only target yields `[]`.\n\n","type":"String.String -> Scripta.Document.Document -> List.List String.String"},{"name":"sourceOfId","comment":" Return the source text of the block with the given id, if any.\n","type":"String.String -> Scripta.Document.Document -> Maybe.Maybe String.String"},{"name":"title","comment":" Return the document title (the text of its `title` block), or `\"\"` if\nthere is no title block.\n","type":"Scripta.Document.Document -> String.String"}],"binops":[]}]