Package-level declarations

Types

Link copied to clipboard
data class AutoHighlightResult(val annotated: AnnotatedString, val detectedLanguage: String, val spanCount: Int, val durationMs: Long, val timings: HighlightTimings)

Result of a successful HighlightEngine.highlightAuto call.

Link copied to clipboard

Core engine that manages the hidden WebView and executes Highlight.js highlighting.

Link copied to clipboard

Exception hierarchy for compose-highlight engine failures.

Link copied to clipboard

Maps file extensions to Highlight.js language identifiers.

Link copied to clipboard
data class HighlightLanguageInfo(val name: String, val aliases: List<String>)

Metadata returned by HighlightEngine.getLanguage.

Link copied to clipboard
data class HighlightResult(val annotated: AnnotatedString, val spanCount: Int, val language: String, val durationMs: Long, val timings: HighlightTimings)

Result of a successful HighlightEngine.highlight call.

Link copied to clipboard

Represents a syntax highlighting theme backed by a Highlight.js CSS file.

Link copied to clipboard
data class HighlightTimings(val jsBridge: Duration, val jsonUnescape: Duration, val htmlParse: Duration, val treeWalk: Duration, val themeParse: Duration, val total: Duration)

Per-layer timing breakdown for a single highlight call.

Link copied to clipboard
data class HtmlHighlightResult(val html: String, val durationMs: Long, val jsBridgeDuration: Duration = Duration.ZERO, val jsonUnescapeDuration: Duration = Duration.ZERO)

Result of a successful HighlightEngine.highlightToHtml call.

Link copied to clipboard

Converts Highlight.js HTML output into a Compose AnnotatedString.

Link copied to clipboard
data class ThemedHighlightResult(val light: AnnotatedString, val dark: AnnotatedString, val durationMs: Long, val timings: HighlightTimings)

Holds both light and dark AnnotatedString results from a single highlight call. Used by HighlightEngine.highlightBothThemes.

Link copied to clipboard

Parses Highlight.js CSS theme files into a map of hljs class names ->SpanStyle.