- Note: The
highlightslibrary in v1.1.0 seems to be compiled with Java 21 - Breaking Change: Some underlying APIs start to require API 23 instead of 21.
org.jetbrains.compose.components.resources
- Dependency Upgrade: Kotlin 2.3.0
- Dependency Upgrade: Compose 1.10.x
- Breaking Change: Removes prior deprecated APIs and functionality (
PlaceholderConfig.animate)
- Dependency Upgrade: Kotlin 2.2.x / Compose 1.8.3 / Compose Multiplatform 1.8.2
- Breaking Change: Remove all deprecated functions and fields
- Behavior Change: Configuration classes were changed to be now stable
- Dependency Upgrade: Compose 1.8.0 / Compose Multiplatform 1.8.0
- Breaking Change: Reordered arguments for
markdownAnnotatorto improve backwards comp. - Behavior Change: Handle empty lines in block quotes. (Using block quote text size as height)
- Dependency Upgrade: Kotlin 2.1.20
- Breaking Change: The provided
Markdown(String) is now parsed asynchronously.- This results in a
loadingstate being displayed prior to the parsing result.- While the
rememberMarkdownStateoffers the ability to requireimmediateparsing as before, this is not advised as it might block the composition of the UI.
- While the
- A new
loadinganderrorcomposable can be provided to handle the different states - A new
successcomposable was also introduced to modify success states (See more on the lazy handling) - The
linkDefinitioncomponent was deprecated in favor of the new link lookup ahead of time - Accompanying this change, a new
rememberMarkdownStatewas introduced to retrieve a hoisted observable state from the markdown.- This offers greater flexibility and allows custom state handling.
- This results in a
val markdownState = rememberMarkdownState(MARKDOWN)
Markdown(markdownState = markdownState)
// exposes the general state:
markdownState.state
// exposes found link definitions and links
markdownState.links- Breaking Change: The
MarkdownComponentcomposable function no longer passes on aColumnScope- This change was made to allow for more flexibility in the layout of the markdown components.
- The
ColumnScopewasn't used by the library before, and prevented use cases likeLazyColumn. - If you have implemented your own
MarkdownComponentdepending on this, you will need to remove theColumnScopeparameter from your implementation, and wrap the component in aColumn {}directly. - Thanks to this change a new
LazyMarkdownSuccesscomposable was introduced to allow rendering very long markdown content asLazyColumninstead of aColumn
Markdown(
markdownState = markdownState,
success = { state, components, modifier ->
LazyMarkdownSuccess(state, components, modifier, contentPadding = PaddingValues(16.dp))
},
modifier = Modifier.fillMaxSize()
)-
Breaking Change: The
levelargument forMarkdownOrderedListandMarkdownBulletListwere renamed todepth. -
Breaking Change: The
MarkdownListItemscomponent was refactored rendering nested Ordered/Unordered lists using theMarkdownComponentsas defined.- As a result the component spec now needs to handle depth. See Source for details.
-
Breaking Change: The
MarkdownListItemscomponent now takes 2 optional lambdas- These lambdas offer the ability to provide custom
Modifiers for the marker and the list content. - This can be helpful for example to adjust the baseline. See: mikepenz#329
- These lambdas offer the ability to provide custom
-
Breaking Change: The
BulletHandleradds a new argument in the functionlistNumber: Int.- This was introduced to allow for more flexibility in the rendering of the bullet points.
- But also specifically to enable list rendering according to spec:
- The
indexargument was retained to allow custom implementations adjust this behavior.
-
Behavior Change: To account for the behavior change introduced in v0.32.0 on EOL handling a new API was introduced to bring back prior behavior
annotator = markdownAnnotator(
config = markdownAnnotatorConfig(
eolAsNewLine = true
)
)- Breaking Change: The
MarkdownTypographyinterface introduces thetableproperty.- This property is used to define the typography for tables in markdown.
- If you have implemented your own
MarkdownTypography, you will need to add thetableproperty to your implementation.
- Breaking Change: The
BulletHandlerfunction has been updated to include another argumentdepth- This property can be used to use a different
bullet stylefor different levels of depth.
- This property can be used to use a different
- Behavior Change:
EOLis now considered a' 'whitespace character instead of a line break.- This change was made to align more properly with the markdown standard
- More details: mikepenz#337
- Behavior Change: The primary definition for text color of components is now in the
MarkdownTypographytext styles.- This change was made to have a more consistent definition of text colors across all components.
Unfortunately no upgrade notes were provided for the releases prior to 0.32.0. See the release notes available on GitHub for more details: https://github.com/mikepenz/multiplatform-markdown-renderer/releases