Package-level declarations
Types
What a relative com.kslides.CssFile or com.kslides.JsFile path is relative to. A value the author already anchored — absolute, external, or a data: URI — ignores this and is emitted as written.
A CSS file referenced from the generated <head>. A relative filename resolves against origin; an absolute, external, or data: value is emitted as written. The optional id is emitted as the <link>'s id attribute — used internally to tag theme / highlight stylesheets.
Accumulator for CSS content attached to a com.kslides.KSlides or com.kslides.Presentation. Supports both raw-string and Kotlin CSS-DSL input via +=, and enforces that CSS is only declared at scopes that actually render a <style> tag.
Receiver for diagram blocks. Extends DiagramConfig so you can override size, style, and output format in the same block that sets source.
Image format produced by a Kroki com.kslides.diagram call. Not every Kroki diagram type supports every output format — consult the Kroki docs for the specific diagram you are rendering.
Type-safe enumeration of Kroki diagram types for com.kslides.diagram. Using the enum overload turns a mistyped diagram type into a compile error rather than a far-away Kroki 400. The raw-String overload of diagram() remains for types not listed here.
A width × height pair. Used primarily for sizing the letsPlot{} render area; construct via the by infix helper (640 by 480) for readability.
reveal.js fragment effect applied to a progressively-revealed element. Used by com.kslides.fragment to build .fragment class attributes.
Code-highlighting theme shipped with the reveal.js highlight plugin. Assign to com.kslides.config.PresentationConfig.highlight.
HTML <a target="..."> value. Used by corner links and com.kslides.listHref to avoid hard-coding the magic strings.
A JavaScript file referenced from the generated <body>. A relative filename resolves against origin; an absolute, external, or data: value is emitted as written.
Root orchestrator for a set of presentations. Instances are not meant to be constructed directly — use the kslides top-level function instead, which applies the DSL block and then triggers the configured output modes.
Internal namespace for the kslides DSL infrastructure. Currently exposes only the shared logger used by free-standing DSL helpers in this file. Public so that DSL extensions defined in the same shape (e.g. letsPlot{}, custom user DSLs) can route their log output through the same channel as built-in helpers; not intended as a stable extension point.
Marks receiver types that participate in the kslides DSL so that Kotlin's scope-control can prevent unintended nesting (e.g. calling markdownSlide{} directly from inside another slide's content block).
Handle for a running kslides HTTP server started via KSlides.startHttpServer.
reveal.js navigation mode. Controls how arrow-key and touch navigation behave across horizontal and vertical slides.
Renderer for Kotlin Playground iframe documents. Builds a self-contained HTML page that boots the Kotlin Playground script (per com.kslides.config.KSlidesConfig.playgroundUrl) against a primary source file plus optional dependency files, applying the supplied CSS to the page head.
Kotlin Playground editor theme.
A single presentation — the unit that reveal.js renders as one HTML page. Created via KSlides.presentation and populated with slide definitions, per-presentation configuration, and scoped CSS.
Built-in reveal.js presentation theme. Assign to com.kslides.config.PresentationConfig.theme.
reveal.js 5.0+ scroll-layout mode.
Options for reveal.js 5.0+ scrollProgress. Use the config property's Boolean form for on/off.
reveal.js 5.0+ scroll-snap mode. Use the config property's Boolean form to disable snapping.
reveal.js transition speed. UNASSIGNED means "inherit from the enclosing scope" and is the default in com.kslides.config.SlideConfig.
A directory under reveal.js's static asset root that kslides should expose when serving over HTTP. Registered on com.kslides.config.KSlidesConfig.httpStaticRoots.
Kotlin Playground execution target — what runtime the embedded code runs against. Mirrors the Kotlin Playground data-target-platform attribute.
reveal.js slide-transition style. UNASSIGNED means "inherit" and is the default in com.kslides.config.SlideConfig so that per-slide transitions fall back to the presentation setting.
Receiver type for verticalSlides{} blocks. Exposes per-stack id/classes/style attributes plus a slideConfig that applies reveal.js data-* options (transitions, backgrounds, Markdown separators) to every child slide in the stack via the wrapper <section>.
Functions
Evaluates the kslides DSL and validates the result without emitting any output: no files are written and no HTTP server is started, but all configuration blocks (including output {}) are applied. Used by tooling that renders presentations on its own terms — e.g. exportPdf() in the kslides-export module, which serves the built KSlides from an ephemeral-port server via KSlides.startHttpServer.
Infix helper for building a Dimensions: 640 by 480.
Emit a reveal.js-compatible <pre><code> code block with optional line-number highlighting and a copy-to-clipboard button (when the CopyCode plugin is enabled). Call from inside a com.kslides.slide.DslSlide content{} block.
fun DslSlide.diagram(diagramType: DiagramType, diagramBlock: DiagramDescription.() -> Unit): ERROR CLASS: Ambiguity: diagram, [com/kslides/diagram, com/kslides/diagram]
Type-safe overload of diagram taking a DiagramType enum instead of a raw Kroki type string, so a mistyped diagram type is a compile error. Delegates to the String overload.
fun DslSlide.diagram(diagramType: String, diagramBlock: DiagramDescription.() -> Unit)
Load content from a local file or remote URL. Preferred over embedding code inline in slides because it avoids whitespace-sensitivity issues and lets you keep the source of truth in one place.
include variant for use inside a com.kslides.slide.DslSlide content{} block. Same semantics as CODE.include — HTML escaping and the indent token are turned off.
include variant for use inside a <code> block. Disables the HTML escape + indent-token behavior (the <code> tag already controls both) and pads the result for reveal.js's line-number display.
include variant for an htmlSlide content{} block — the one sink whose content is still parsed as markup, so escaping stays on. Identical to the bare include; it exists so every sink is receiver-resolved, rather than htmlSlide being the one whose behavior comes from the absence of an overload.
include variant for a Markdown slide's content{} block, where reveal.js's Markdown renderer escapes its own output. Unlike CODE.include and DslSlide.include the indent token is kept, since Markdown content is re-indented to match the surrounding block.
Convenience wrapper around buildKSlides for tests: evaluates the DSL with both OutputConfig.enableFileSystem and OutputConfig.enableHttp forced to false, so no files are written and no server is started. The instance is closed before it is returned, releasing the HTTP client a diagram{} deck may have created.
Emit an <ol> with one <li> per string in items.
Emit an <ol> where each item is an LI-builder lambda.
fun DslSlide.playground(srcName: String, vararg otherSrcs: String = emptyArray(), configBlock: PlaygroundConfig.() -> Unit = {})
Embed an interactive Kotlin Playground iframe inside a DslSlide content{} block. The source file referenced by srcName is inlined into the Playground editor; any otherSrcs are attached as hidden <textarea class="hidden-dependency"> elements that Playground loads alongside the main file.
Record iframe content for later retrieval. In HTTP mode, the content is cached (by filename) either as a materialized string (when staticContent is true) or as a lambda that is re-invoked per request. In filesystem mode, the content is written to <path>/<filename> immediately.
Emit the reveal.js HTML comment that sets a slide's background color. Interpolate the result anywhere in a Markdown slide's content{} block — its own line reads best:
Parse a reveal.js line-highlight pattern string (e.g. "[1-3|5|*]" or "(1|2|*)") into a list of reveal.js data-line-numbers tokens. * in the input is converted to an empty string (meaning "highlight nothing").
Emit a <ul> with one <li> per string in items.
Emit a <ul> where each item is an LI-builder lambda. Use this form when the list items need nested markup (e.g. links, inline code).