DocumentStyles

@Immutable
data class DocumentStyles(val defaultFontFamily: FontFamily = FontFamily.Default, val blockShape: Shape = RoundedCornerShape(5.dp), val paragraph: TextStyle = TextStyle( fontWeight = FontWeight.Normal, fontSize = 14.sp, letterSpacing = 0.5.sp, textAlign = TextAlign.Justify, lineHeight = 14.sp ), val h1: TextStyle = TextStyle( fontWeight = FontWeight.Light, fontSize = paragraph.fontSize * 3.5, letterSpacing = (-1.5).sp ), val h2: TextStyle = TextStyle( fontWeight = FontWeight.Light, fontSize = paragraph.fontSize * 3, letterSpacing = (-0.5).sp ), val h3: TextStyle = TextStyle( fontWeight = FontWeight.Normal, fontSize = paragraph.fontSize * 2.5, letterSpacing = 0.sp ), val h4: TextStyle = TextStyle( fontWeight = FontWeight.Normal, fontSize = paragraph.fontSize * 2, letterSpacing = 0.25.sp ), val h5: TextStyle = TextStyle( fontWeight = FontWeight.Normal, fontSize = paragraph.fontSize * 1.7, letterSpacing = 0.sp ), val h6: TextStyle = TextStyle( fontWeight = FontWeight.Medium, fontSize = paragraph.fontSize * 1.2, letterSpacing = 0.15.sp ), val listNumber: TextStyle = TextStyle( fontWeight = FontWeight.Bold, textAlign = TextAlign.Left ), val taskListCheckbox: BoxStyle = BoxStyle( modifier = Modifier.composed { padding(2.dp, 0.dp, 4.dp, 0.dp) .scale(0.8f) .pointerHoverIcon(PointerIcon.Hand) .size(with(LocalDensity.current) { paragraph.lineHeight.toDp() }) } ), val inlineCode: TextStyle = TextStyle( fontWeight = FontWeight.Normal, fontFamily = FontFamily.Monospace, background = Color.LightGray ), val codeBlock: BlockStyle = BlockStyle( textStyle = inlineCode.copy(background = Color.Transparent), modifier = Modifier .padding(15.dp) .border(Dp.Hairline, lerp(Color.LightGray, Color.Black, 0.1f), blockShape) .background(Color.LightGray, blockShape) .padding(10.dp, 5.dp) ), val blockQuote: BoxStyle = BoxStyle( modifier = Modifier .padding(15.dp) .border(Dp.Hairline, lerp(Color.LightGray, Color.Black, 0.1f), blockShape) .background(Color.Black.copy(alpha = 0.2f), blockShape) .clip(blockShape) .leftBorder(5.dp, lerp(Color.LightGray, Color.Black, 0.2f)) .padding(10.dp, 5.dp) ), val table: TableStyle = TableStyle( headerCellStyle = BlockStyle( textStyle = paragraph, modifier = Modifier .background(Color.LightGray) .leftBorder(Dp.Hairline, Color.Gray) .padding(8.dp) ), bodyCellStyle = BlockStyle( textStyle = paragraph, modifier = Modifier .leftBorder(Dp.Hairline, Color.LightGray) .topBorder(Dp.Hairline, Color.LightGray) .padding(8.dp) ), modifier = Modifier .fillMaxWidth() .padding(16.dp) .clip(blockShape) .border(Dp.Hairline, lerp(Color.LightGray, Color.Black, 0.1f), blockShape) ), val link: TextStyle = TextStyle( color = Color.Blue, textDecoration = TextDecoration.Underline ), val inlineAnchor: TextStyle = TextStyle( fontWeight = FontWeight.Bold, textDecoration = TextDecoration.Underline ), val deadLink: TextStyle = TextStyle( color = Color.Red, textDecoration = TextDecoration.Underline ), val emphasis: TextStyle = TextStyle( fontStyle = FontStyle.Italic ), val strong: TextStyle = TextStyle( fontWeight = FontWeight.Bold ), val strikethrough: TextStyle = TextStyle( textDecoration = TextDecoration.LineThrough ), val selection: SelectionStyle = SelectionStyle( fillColor = Color.Cyan.copy(alpha = 0.3f), stroke = SelectionStyle.Stroke( width = 2.dp, color = Color.Cyan ) ), val image: ImageStyle = ImageStyle( modifier = Modifier .clip(blockShape) .border(Dp.Hairline, lerp(Color.LightGray, Color.Black, 0.1f), blockShape), title = BlockStyle( textStyle = paragraph.copy(textAlign = TextAlign.Center), modifier = Modifier .fillMaxWidth(1.0f) .background(Color.White.copy(alpha = 0.5f)) .padding(4.dp) ) ))

Constructors

Link copied to clipboard
constructor(defaultFontFamily: FontFamily = FontFamily.Default, blockShape: Shape = RoundedCornerShape(5.dp), paragraph: TextStyle = TextStyle( fontWeight = FontWeight.Normal, fontSize = 14.sp, letterSpacing = 0.5.sp, textAlign = TextAlign.Justify, lineHeight = 14.sp ), h1: TextStyle = TextStyle( fontWeight = FontWeight.Light, fontSize = paragraph.fontSize * 3.5, letterSpacing = (-1.5).sp ), h2: TextStyle = TextStyle( fontWeight = FontWeight.Light, fontSize = paragraph.fontSize * 3, letterSpacing = (-0.5).sp ), h3: TextStyle = TextStyle( fontWeight = FontWeight.Normal, fontSize = paragraph.fontSize * 2.5, letterSpacing = 0.sp ), h4: TextStyle = TextStyle( fontWeight = FontWeight.Normal, fontSize = paragraph.fontSize * 2, letterSpacing = 0.25.sp ), h5: TextStyle = TextStyle( fontWeight = FontWeight.Normal, fontSize = paragraph.fontSize * 1.7, letterSpacing = 0.sp ), h6: TextStyle = TextStyle( fontWeight = FontWeight.Medium, fontSize = paragraph.fontSize * 1.2, letterSpacing = 0.15.sp ), listNumber: TextStyle = TextStyle( fontWeight = FontWeight.Bold, textAlign = TextAlign.Left ), taskListCheckbox: BoxStyle = BoxStyle( modifier = Modifier.composed { padding(2.dp, 0.dp, 4.dp, 0.dp) .scale(0.8f) .pointerHoverIcon(PointerIcon.Hand) .size(with(LocalDensity.current) { paragraph.lineHeight.toDp() }) } ), inlineCode: TextStyle = TextStyle( fontWeight = FontWeight.Normal, fontFamily = FontFamily.Monospace, background = Color.LightGray ), codeBlock: BlockStyle = BlockStyle( textStyle = inlineCode.copy(background = Color.Transparent), modifier = Modifier .padding(15.dp) .border(Dp.Hairline, lerp(Color.LightGray, Color.Black, 0.1f), blockShape) .background(Color.LightGray, blockShape) .padding(10.dp, 5.dp) ), blockQuote: BoxStyle = BoxStyle( modifier = Modifier .padding(15.dp) .border(Dp.Hairline, lerp(Color.LightGray, Color.Black, 0.1f), blockShape) .background(Color.Black.copy(alpha = 0.2f), blockShape) .clip(blockShape) .leftBorder(5.dp, lerp(Color.LightGray, Color.Black, 0.2f)) .padding(10.dp, 5.dp) ), table: TableStyle = TableStyle( headerCellStyle = BlockStyle( textStyle = paragraph, modifier = Modifier .background(Color.LightGray) .leftBorder(Dp.Hairline, Color.Gray) .padding(8.dp) ), bodyCellStyle = BlockStyle( textStyle = paragraph, modifier = Modifier .leftBorder(Dp.Hairline, Color.LightGray) .topBorder(Dp.Hairline, Color.LightGray) .padding(8.dp) ), modifier = Modifier .fillMaxWidth() .padding(16.dp) .clip(blockShape) .border(Dp.Hairline, lerp(Color.LightGray, Color.Black, 0.1f), blockShape) ), link: TextStyle = TextStyle( color = Color.Blue, textDecoration = TextDecoration.Underline ), inlineAnchor: TextStyle = TextStyle( fontWeight = FontWeight.Bold, textDecoration = TextDecoration.Underline ), deadLink: TextStyle = TextStyle( color = Color.Red, textDecoration = TextDecoration.Underline ), emphasis: TextStyle = TextStyle( fontStyle = FontStyle.Italic ), strong: TextStyle = TextStyle( fontWeight = FontWeight.Bold ), strikethrough: TextStyle = TextStyle( textDecoration = TextDecoration.LineThrough ), selection: SelectionStyle = SelectionStyle( fillColor = Color.Cyan.copy(alpha = 0.3f), stroke = SelectionStyle.Stroke( width = 2.dp, color = Color.Cyan ) ), image: ImageStyle = ImageStyle( modifier = Modifier .clip(blockShape) .border(Dp.Hairline, lerp(Color.LightGray, Color.Black, 0.1f), blockShape), title = BlockStyle( textStyle = paragraph.copy(textAlign = TextAlign.Center), modifier = Modifier .fillMaxWidth(1.0f) .background(Color.White.copy(alpha = 0.5f)) .padding(4.dp) ) ))

Properties

Link copied to clipboard
Link copied to clipboard
val blockShape: Shape
Link copied to clipboard
Link copied to clipboard
val deadLink: TextStyle
Link copied to clipboard
val defaultFontFamily: FontFamily
Link copied to clipboard
val emphasis: TextStyle
Link copied to clipboard
val h1: TextStyle
Link copied to clipboard
val h2: TextStyle
Link copied to clipboard
val h3: TextStyle
Link copied to clipboard
val h4: TextStyle
Link copied to clipboard
val h5: TextStyle
Link copied to clipboard
val h6: TextStyle
Link copied to clipboard
Link copied to clipboard
val inlineAnchor: TextStyle
Link copied to clipboard
val inlineCode: TextStyle
Link copied to clipboard
val link: TextStyle
Link copied to clipboard
val listNumber: TextStyle
Link copied to clipboard
val paragraph: TextStyle
Link copied to clipboard
val selection: SelectionStyle
Link copied to clipboard
val strikethrough: TextStyle
Link copied to clipboard
val strong: TextStyle
Link copied to clipboard
Link copied to clipboard