Package-level declarations

Functions

Link copied to clipboard
fun MarkdownStyling.Paragraph.Companion.create(inlinesStyling: InlinesStyling = InlinesStyling.create()): MarkdownStyling.Paragraph
fun MarkdownStyling.Code.Companion.create(editorTextStyle: TextStyle = defaultEditorTextStyle, indented: MarkdownStyling.Code.Indented = Indented.create(editorTextStyle), fenced: MarkdownStyling.Code.Fenced = Fenced.create(editorTextStyle)): MarkdownStyling.Code
fun MarkdownStyling.List.Companion.create(baseTextStyle: TextStyle = defaultTextStyle, ordered: MarkdownStyling.List.Ordered = Ordered.create(numberStyle = baseTextStyle), unordered: MarkdownStyling.List.Unordered = Unordered.create(bulletStyle = baseTextStyle.copy(fontWeight = FontWeight.Black))): MarkdownStyling.List
fun MarkdownStyling.ThematicBreak.Companion.create(padding: PaddingValues = PaddingValues(), lineWidth: Dp = 2.dp, lineColor: Color = dividerColor): MarkdownStyling.ThematicBreak
fun MarkdownStyling.BlockQuote.Companion.create(padding: PaddingValues = PaddingValues(horizontal = 16.dp, vertical = 8.dp), lineWidth: Dp = 4.dp, lineColor: Color = Color(0xFFD0D7DE), pathEffect: PathEffect? = null, strokeCap: StrokeCap = StrokeCap.Square, textColor: Color = Color(0xFF656d76)): MarkdownStyling.BlockQuote
fun MarkdownStyling.Heading.H1.Companion.create(baseTextStyle: TextStyle = defaultTextStyle, inlinesStyling: InlinesStyling = InlinesStyling.create( baseTextStyle.copy( fontSize = baseTextStyle.fontSize * 2, lineHeight = baseTextStyle.fontSize * 2 * 1.25, fontWeight = FontWeight.SemiBold, ) ), underlineWidth: Dp = 1.dp, underlineColor: Color = dividerColor, underlineGap: Dp = 10.dp, padding: PaddingValues = PaddingValues(top = 24.dp, bottom = 16.dp)): MarkdownStyling.Heading.H1
fun MarkdownStyling.Heading.H2.Companion.create(baseTextStyle: TextStyle = defaultTextStyle, inlinesStyling: InlinesStyling = InlinesStyling.create( baseTextStyle.copy( fontSize = baseTextStyle.fontSize * 1.5, lineHeight = baseTextStyle.fontSize * 1.5 * 1.25, fontWeight = FontWeight.SemiBold, ) ), underlineWidth: Dp = 1.dp, underlineColor: Color = dividerColor, underlineGap: Dp = 6.dp, padding: PaddingValues = PaddingValues(top = 24.dp, bottom = 16.dp)): MarkdownStyling.Heading.H2
fun MarkdownStyling.Heading.H3.Companion.create(baseTextStyle: TextStyle = defaultTextStyle, inlinesStyling: InlinesStyling = InlinesStyling.create( baseTextStyle.copy( fontSize = baseTextStyle.fontSize * 1.25, lineHeight = baseTextStyle.fontSize * 1.25 * 1.25, fontWeight = FontWeight.SemiBold, ) ), underlineWidth: Dp = 0.dp, underlineColor: Color = Color.Unspecified, underlineGap: Dp = 0.dp, padding: PaddingValues = PaddingValues(top = 24.dp, bottom = 16.dp)): MarkdownStyling.Heading.H3
fun MarkdownStyling.Heading.H4.Companion.create(baseTextStyle: TextStyle = defaultTextStyle, inlinesStyling: InlinesStyling = InlinesStyling.create( baseTextStyle.copy( fontSize = baseTextStyle.fontSize, lineHeight = baseTextStyle.fontSize * 1.25, fontWeight = FontWeight.SemiBold, ) ), underlineWidth: Dp = 0.dp, underlineColor: Color = Color.Unspecified, underlineGap: Dp = 0.dp, padding: PaddingValues = PaddingValues(top = 24.dp, bottom = 16.dp)): MarkdownStyling.Heading.H4
fun MarkdownStyling.Heading.H5.Companion.create(baseTextStyle: TextStyle = defaultTextStyle, inlinesStyling: InlinesStyling = InlinesStyling.create( baseTextStyle.copy( fontSize = baseTextStyle.fontSize * .875, lineHeight = baseTextStyle.fontSize * .875 * 1.25, fontWeight = FontWeight.SemiBold, ) ), underlineWidth: Dp = 0.dp, underlineColor: Color = Color.Unspecified, underlineGap: Dp = 0.dp, padding: PaddingValues = PaddingValues(top = 24.dp, bottom = 16.dp)): MarkdownStyling.Heading.H5
fun MarkdownStyling.Heading.H6.Companion.create(baseTextStyle: TextStyle = defaultTextStyle, inlinesStyling: InlinesStyling = InlinesStyling.create( baseTextStyle.copy( color = Color(0xFF656d76), fontSize = baseTextStyle.fontSize * .85, lineHeight = baseTextStyle.fontSize * .85 * 1.25, fontWeight = FontWeight.SemiBold, ) ), underlineWidth: Dp = 0.dp, underlineColor: Color = Color.Unspecified, underlineGap: Dp = 0.dp, padding: PaddingValues = PaddingValues(top = 24.dp, bottom = 16.dp)): MarkdownStyling.Heading.H6
fun MarkdownStyling.List.Unordered.Companion.create(bullet: Char? = '•', bulletStyle: TextStyle = defaultTextStyle.copy(fontWeight = FontWeight.Black), bulletContentGap: Dp = 16.dp, itemVerticalSpacing: Dp = 16.dp, itemVerticalSpacingTight: Dp = 4.dp, padding: PaddingValues = PaddingValues(start = 16.dp)): MarkdownStyling.List.Unordered
fun MarkdownStyling.Heading.Companion.create(baseTextStyle: TextStyle = defaultTextStyle, h1: MarkdownStyling.Heading.H1 = Heading.H1.create( baseTextStyle.copy( fontSize = baseTextStyle.fontSize * 2, lineHeight = baseTextStyle.fontSize * 2 * 1.25, fontWeight = FontWeight.SemiBold, ) ), h2: MarkdownStyling.Heading.H2 = Heading.H2.create( baseTextStyle.copy( fontSize = baseTextStyle.fontSize * 1.5, lineHeight = baseTextStyle.fontSize * 1.5 * 1.25, fontWeight = FontWeight.SemiBold, ) ), h3: MarkdownStyling.Heading.H3 = Heading.H3.create( baseTextStyle.copy( fontSize = baseTextStyle.fontSize * 1.25, lineHeight = baseTextStyle.fontSize * 1.25 * 1.25, fontWeight = FontWeight.SemiBold, ) ), h4: MarkdownStyling.Heading.H4 = Heading.H4.create( baseTextStyle.copy( fontSize = baseTextStyle.fontSize, lineHeight = baseTextStyle.fontSize * 1.25, fontWeight = FontWeight.SemiBold, ) ), h5: MarkdownStyling.Heading.H5 = Heading.H5.create( baseTextStyle.copy( fontSize = baseTextStyle.fontSize * .875, lineHeight = baseTextStyle.fontSize * .875 * 1.25, fontWeight = FontWeight.SemiBold, ) ), h6: MarkdownStyling.Heading.H6 = Heading.H6.create( baseTextStyle.copy( color = Color(0xFF656d76), fontSize = baseTextStyle.fontSize * .85, lineHeight = baseTextStyle.fontSize * .85 * 1.25, fontWeight = FontWeight.SemiBold, ) )): MarkdownStyling.Heading
fun MarkdownStyling.HtmlBlock.Companion.create(textStyle: TextStyle = defaultEditorTextStyle, padding: PaddingValues = PaddingValues(8.dp), shape: Shape = RoundedCornerShape(4.dp), background: Color = blockBackgroundColor, borderWidth: Dp = 1.dp, borderColor: Color = dividerColor, fillWidth: Boolean = true): MarkdownStyling.HtmlBlock
fun MarkdownStyling.List.Ordered.Companion.create(numberStyle: TextStyle = defaultTextStyle, numberContentGap: Dp = 8.dp, numberMinWidth: Dp = 16.dp, numberTextAlign: TextAlign = TextAlign.End, itemVerticalSpacing: Dp = 16.dp, itemVerticalSpacingTight: Dp = 4.dp, padding: PaddingValues = PaddingValues(start = 16.dp)): MarkdownStyling.List.Ordered
fun MarkdownStyling.Code.Indented.Companion.create(textStyle: TextStyle = defaultEditorTextStyle, padding: PaddingValues = PaddingValues(16.dp), shape: Shape = RectangleShape, background: Color = blockBackgroundColor, borderWidth: Dp = 0.dp, borderColor: Color = Color.Unspecified, fillWidth: Boolean = true, scrollsHorizontally: Boolean = true): MarkdownStyling.Code.Indented
fun MarkdownStyling.Code.Fenced.Companion.create(textStyle: TextStyle = defaultEditorTextStyle, padding: PaddingValues = PaddingValues(16.dp), shape: Shape = RectangleShape, background: Color = blockBackgroundColor, borderWidth: Dp = 0.dp, borderColor: Color = Color.Unspecified, fillWidth: Boolean = true, scrollsHorizontally: Boolean = true, infoTextStyle: TextStyle = TextStyle(color = infoContentColor, fontSize = 12.sp), infoPadding: PaddingValues = PaddingValues(bottom = 16.dp), infoPosition: MarkdownStyling.Code.Fenced.InfoPosition = InfoPosition.Hide): MarkdownStyling.Code.Fenced
fun InlinesStyling.Companion.create(textStyle: TextStyle = defaultTextStyle, inlineCode: SpanStyle = defaultEditorTextStyle .copy(fontSize = textStyle.fontSize * .85, background = inlineCodeBackgroundColor) .toSpanStyle(), link: SpanStyle = textStyle.copy(color = JBUI.CurrentTheme.Link.Foreground.ENABLED.toComposeColor()).toSpanStyle(), linkDisabled: SpanStyle = link.copy(color = JBUI.CurrentTheme.Link.Foreground.DISABLED.toComposeColor()), linkHovered: SpanStyle = link.copy( color = JBUI.CurrentTheme.Link.Foreground.HOVERED.toComposeColor(), textDecoration = TextDecoration.Underline, ), linkFocused: SpanStyle = link.copy( color = JBUI.CurrentTheme.Link.Foreground.ENABLED.toComposeColor(), background = JBUI.CurrentTheme.ActionButton.hoverBackground().toComposeColor(), textDecoration = TextDecoration.Underline, ), linkPressed: SpanStyle = link.copy( color = JBUI.CurrentTheme.Link.Foreground.PRESSED.toComposeColor(), background = JBUI.CurrentTheme.ActionButton.pressedBackground().toComposeColor(), textDecoration = TextDecoration.Underline, ), linkVisited: SpanStyle = link.copy(color = JBUI.CurrentTheme.Link.Foreground.VISITED.toComposeColor()), emphasis: SpanStyle = textStyle.copy(fontStyle = FontStyle.Italic).toSpanStyle(), strongEmphasis: SpanStyle = textStyle.copy(fontWeight = FontWeight.Bold).toSpanStyle(), inlineHtml: SpanStyle = textStyle.toSpanStyle(), renderInlineHtml: Boolean = true): InlinesStyling
fun MarkdownStyling.Companion.create(baseTextStyle: TextStyle = defaultTextStyle, editorTextStyle: TextStyle = defaultEditorTextStyle, inlinesStyling: InlinesStyling = InlinesStyling.create( baseTextStyle, defaultEditorTextStyle .copy(fontSize = baseTextStyle.fontSize * .85, background = inlineCodeBackgroundColor) .toSpanStyle(), ), blockVerticalSpacing: Dp = 16.dp, paragraph: MarkdownStyling.Paragraph = Paragraph.create(inlinesStyling), heading: MarkdownStyling.Heading = Heading.create(baseTextStyle), blockQuote: MarkdownStyling.BlockQuote = BlockQuote.create(textColor = baseTextStyle.color), code: MarkdownStyling.Code = Code.create(editorTextStyle), list: MarkdownStyling.List = List.create(baseTextStyle), image: MarkdownStyling.Image = Image.default(), thematicBreak: MarkdownStyling.ThematicBreak = ThematicBreak.create(), htmlBlock: MarkdownStyling.HtmlBlock = HtmlBlock.create(editorTextStyle)): MarkdownStyling
Link copied to clipboard
fun MarkdownStyling.Image.Companion.default(alignment: Alignment = Alignment.Center, contentScale: ContentScale = ContentScale.Fit, padding: PaddingValues = PaddingValues(), shape: Shape = RectangleShape, background: Color = Color.Unspecified, borderWidth: Dp = 0.dp, borderColor: Color = Color.Unspecified): MarkdownStyling.Image