Package-level declarations

Types

Link copied to clipboard
data class InlineAttachmentRange(val offset: Int, val attachment: InlineTextAttachment)

Binds one attachment to an object-replacement character at offset.

Link copied to clipboard
class InlineTextAttachment(val id: String, val mimeType: String, val uri: String? = null, val contentDescription: String? = null, val widthPx: Int? = null, val heightPx: Int? = null, metadata: Map<String, String> = emptyMap())

Immutable metadata for one non-text inline attachment.

Link copied to clipboard
fun interface InputTransformation

Validates or rewrites a platform-proposed edit before TextFieldState commits it.

Link copied to clipboard
data class ParagraphStyle(val alignment: ParagraphTextAlignment? = null, val lineHeightPx: Float? = null, val firstLineIndentPx: Float = 0.0f, val restLineIndentPx: Float = 0.0f, val bullet: TextBullet? = null)

Immutable paragraph-level rich-text style.

Link copied to clipboard
data class ParagraphStyleRange(val range: TextRange, val style: ParagraphStyle)

Associates paragraph style with an ordered, document-bounded UTF-16 range.

Link copied to clipboard

Logical horizontal alignment for a paragraph.

Link copied to clipboard
class ReceiveContentConfiguration(mimeTypes: Set<String> = DefaultMimeTypes, val transformation: ReceiveContentTransformation? = null)

Defines the accepted MIME patterns and optional conversion policy for receive-content.

Link copied to clipboard

Source category assigned to content entering a text field from outside ordinary typing.

Link copied to clipboard

Decides whether and how normalized external content is inserted into a text field.

Link copied to clipboard
data class ReceivedContent(val document: TextDocument, val source: ReceiveContentSource, val mimeTypes: Set<String>, val platformItemCount: Int)

Immutable, platform-neutral content normalized from one external receive-content payload.

Link copied to clipboard
data class TextBullet(val radiusPx: Float = 3.0f, val gapWidthPx: Float = 8.0f, val color: Int? = null)

Immutable paragraph bullet geometry.

Link copied to clipboard
class TextDocument(val text: String, spanStyles: List<TextSpanRange> = emptyList(), paragraphStyles: List<ParagraphStyleRange> = emptyList(), inlineAttachments: List<InlineAttachmentRange> = emptyList())

Immutable rich-text document containing text, span styles, paragraph styles, and attachments.

Link copied to clipboard

Mutable builder for incrementally creating one validated TextDocument.

Link copied to clipboard

Versioned, platform-neutral save codec for complete TextDocument values.

Link copied to clipboard

Mutable transaction buffer used by programmatic edits and input transformations.

Link copied to clipboard
class TextFieldState(initialValue: TextFieldValue = TextFieldValue(""), val historyLimit: Int = DEFAULT_HISTORY_LIMIT)

Stable observable owner of editable text, selection, IME composition, and undo history.

Link copied to clipboard
data class TextFieldValue(val document: TextDocument, val selection: TextRange = TextRange(document.text.length), val composition: TextRange? = null)

Immutable snapshot of a complete editable text-field value.

Link copied to clipboard

Requested font posture for a text span.

Link copied to clipboard
data class TextRange(val start: Int, val end: Int = start)

Directional UTF-16 range used by platform text-editing contracts.

Link copied to clipboard
data class TextSpanRange(val range: TextRange, val style: TextSpanStyle)

Associates style with an ordered, document-bounded UTF-16 range.

Link copied to clipboard
data class TextSpanStyle(val color: Int? = null, val backgroundColor: Int? = null, val fontWeight: Int? = null, val fontStyle: TextFontStyle? = null, val relativeSize: Float? = null, val underline: Boolean = false, val lineThrough: Boolean = false, val verticalAlignment: TextVerticalAlignment = TextVerticalAlignment.Normal, val link: String? = null)

Immutable character-level rich-text style.

Link copied to clipboard

Vertical placement of a span relative to the surrounding text baseline.

Properties

Link copied to clipboard
const val INLINE_ATTACHMENT_CHARACTER: Char = '\uFFFC'

Unicode object-replacement character reserved for inline attachment positions.

Functions

Link copied to clipboard

Builds a validated rich-text document with block.

Link copied to clipboard

Returns a policy that applies this transformation and then next to the same buffer.