[go: nahoru, domu]

Rename Item to Range

Bug: 156126205
Test: ./gradlew test
Test: ./gradlew ui:ui-text-core:cAT
RelNote: "API change: AnnotatedString.Item is renamed to AnnotatedString.Range."
Change-Id: I2d44dd9e4f565d5f90eeba93dc61a052109da32e
diff --git a/ui/ui-text-core/src/androidTest/java/androidx/ui/text/MultiParagraphIntegrationTest.kt b/ui/ui-text-core/src/androidTest/java/androidx/ui/text/MultiParagraphIntegrationTest.kt
index 6d2858b..17d201f 100644
--- a/ui/ui-text-core/src/androidTest/java/androidx/ui/text/MultiParagraphIntegrationTest.kt
+++ b/ui/ui-text-core/src/androidTest/java/androidx/ui/text/MultiParagraphIntegrationTest.kt
@@ -1229,14 +1229,14 @@
         val text = AnnotatedString(
             text = "ab",
             paragraphStyles = listOf(
-                ParagraphStyleItem(
+                ParagraphStyleRange(
                     item = ParagraphStyle(
                         textDirectionAlgorithm = TextDirectionAlgorithm.ContentOrLtr
                     ),
                     start = 0,
                     end = "a".length
                 ),
-                ParagraphStyleItem(
+                ParagraphStyleRange(
                     // skip setting [TextDirectionAlgorithm] on purpose, should inherit from the
                     // main [ParagraphStyle]
                     item = ParagraphStyle(),
@@ -1267,7 +1267,7 @@
         val fontSize = 20
         val width = 2.em
         val placeholders = listOf(
-            AnnotatedString.Item(
+            AnnotatedString.Range(
                 Placeholder(width, 1.em, PlaceholderVerticalAlign.AboveBaseline),
                 0,
                 1
@@ -1299,7 +1299,7 @@
         val fontSize = 20
         val width = 30.sp
         val placeholders = listOf(
-            AnnotatedString.Item(
+            AnnotatedString.Range(
                 Placeholder(width, 1.em, PlaceholderVerticalAlign.AboveBaseline),
                 0,
                 1
@@ -1332,7 +1332,7 @@
         val width = 2.em
         val height = 1.em
         val placeholders = listOf(
-            AnnotatedString.Item(
+            AnnotatedString.Range(
                 Placeholder(width, height, PlaceholderVerticalAlign.AboveBaseline),
                 0,
                 1
@@ -1370,12 +1370,12 @@
         val width = 2.em
         val height = 1.em
         val placeholders = listOf(
-            AnnotatedString.Item(
+            AnnotatedString.Range(
                 Placeholder(width, height, PlaceholderVerticalAlign.AboveBaseline),
                 0,
                 1
             ),
-            AnnotatedString.Item(
+            AnnotatedString.Range(
                 Placeholder(width, height, PlaceholderVerticalAlign.AboveBaseline),
                 2,
                 3
@@ -1421,7 +1421,7 @@
         val width = 2.em
         val height = 1.em
         val placeholders = listOf(
-            AnnotatedString.Item(
+            AnnotatedString.Range(
                 Placeholder(width, height, PlaceholderVerticalAlign.AboveBaseline),
                 1,
                 3
@@ -1464,7 +1464,7 @@
     private fun simpleMultiParagraphIntrinsics(
         text: AnnotatedString,
         fontSize: TextUnit = TextUnit.Inherit,
-        placeholders: List<AnnotatedString.Item<Placeholder>> = listOf()
+        placeholders: List<AnnotatedString.Range<Placeholder>> = listOf()
     ): MultiParagraphIntrinsics {
         return MultiParagraphIntrinsics(
             text,
diff --git a/ui/ui-text-core/src/androidTest/java/androidx/ui/text/ParagraphIntegrationTest.kt b/ui/ui-text-core/src/androidTest/java/androidx/ui/text/ParagraphIntegrationTest.kt
index d8fab6b..71fd9bc 100644
--- a/ui/ui-text-core/src/androidTest/java/androidx/ui/text/ParagraphIntegrationTest.kt
+++ b/ui/ui-text-core/src/androidTest/java/androidx/ui/text/ParagraphIntegrationTest.kt
@@ -2614,7 +2614,7 @@
 
             val paragraph = simpleParagraph(
                 text = text,
-                spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, text.length)),
+                spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, text.length)),
                 constraints = ParagraphConstraints(width = paragraphWidth)
             )
 
@@ -2638,7 +2638,7 @@
 
             val paragraph = simpleParagraph(
                 text = text,
-                spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, "abc".length)),
+                spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, "abc".length)),
                 style = TextStyle(fontSize = fontSize),
                 constraints = ParagraphConstraints(width = paragraphWidth)
             )
@@ -2668,8 +2668,8 @@
             val paragraph = simpleParagraph(
                 text = text,
                 spanStyles = listOf(
-                    AnnotatedString.Item(spanStyle, 0, text.length),
-                    AnnotatedString.Item(spanStyleOverwrite, 0, "abc".length)
+                    AnnotatedString.Range(spanStyle, 0, text.length),
+                    AnnotatedString.Range(spanStyleOverwrite, 0, "abc".length)
                 ),
                 constraints = ParagraphConstraints(width = paragraphWidth)
             )
@@ -2693,7 +2693,7 @@
 
             val paragraph = simpleParagraph(
                 text = text,
-                spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, text.length)),
+                spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, text.length)),
                 style = TextStyle(fontSize = fontSize)
             )
 
@@ -2717,8 +2717,8 @@
             val paragraph = simpleParagraph(
                 text = text,
                 spanStyles = listOf(
-                    AnnotatedString.Item(spanStyle, 0, text.length),
-                    AnnotatedString.Item(spanStyleNested, 0, text.length)
+                    AnnotatedString.Range(spanStyle, 0, text.length),
+                    AnnotatedString.Range(spanStyleNested, 0, text.length)
                 ),
                 style = TextStyle(fontSize = fontSize)
             )
@@ -2744,8 +2744,8 @@
             val paragraph = simpleParagraph(
                 text = text,
                 spanStyles = listOf(
-                    AnnotatedString.Item(fontSizeStyle, 0, text.length),
-                    AnnotatedString.Item(fontSizeScaleStyle, 0, text.length)
+                    AnnotatedString.Range(fontSizeStyle, 0, text.length),
+                    AnnotatedString.Range(fontSizeScaleStyle, 0, text.length)
                 ),
                 style = TextStyle(fontSize = paragraphFontSize)
             )
@@ -2771,8 +2771,8 @@
             val paragraph = simpleParagraph(
                 text = text,
                 spanStyles = listOf(
-                    AnnotatedString.Item(fontSizeScaleStyle, 0, text.length),
-                    AnnotatedString.Item(fontSizeStyle, 0, text.length)
+                    AnnotatedString.Range(fontSizeScaleStyle, 0, text.length),
+                    AnnotatedString.Range(fontSizeStyle, 0, text.length)
                 ),
                 style = TextStyle(fontSize = paragraphFontSize)
             )
@@ -2800,9 +2800,9 @@
             val paragraph = simpleParagraph(
                 text = text,
                 spanStyles = listOf(
-                    AnnotatedString.Item(fontSizeScaleStyle1, 0, text.length),
-                    AnnotatedString.Item(fontSizeStyle, 0, text.length),
-                    AnnotatedString.Item(fontSizeScaleStyle2, 0, text.length)
+                    AnnotatedString.Range(fontSizeScaleStyle1, 0, text.length),
+                    AnnotatedString.Range(fontSizeStyle, 0, text.length),
+                    AnnotatedString.Range(fontSizeScaleStyle2, 0, text.length)
                 ),
                 style = TextStyle(fontSize = paragraphFontSize)
             )
@@ -2824,7 +2824,7 @@
             val paragraph = simpleParagraph(
                 text = text,
                 style = TextStyle(fontSize = fontSize),
-                spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, text.length)),
+                spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, text.length)),
                 constraints = ParagraphConstraints(width = Float.MAX_VALUE)
             )
 
@@ -2847,7 +2847,7 @@
             val paragraph = simpleParagraph(
                 text = text,
                 style = TextStyle(fontSize = fontSize),
-                spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, text.length)),
+                spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, text.length)),
                 constraints = ParagraphConstraints(width = Float.MAX_VALUE)
             )
 
@@ -2870,7 +2870,7 @@
             val paragraph = simpleParagraph(
                 text = text,
                 style = TextStyle(fontSize = fontSize),
-                spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, "abc".length)),
+                spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, "abc".length)),
                 constraints = ParagraphConstraints(width = Float.MAX_VALUE)
             )
 
@@ -2897,8 +2897,8 @@
                 text = text,
                 style = TextStyle(fontSize = fontSize),
                 spanStyles = listOf(
-                    AnnotatedString.Item(spanStyle, 0, text.length),
-                    AnnotatedString.Item(spanStyleOverwrite, 0, "abc".length)
+                    AnnotatedString.Range(spanStyle, 0, text.length),
+                    AnnotatedString.Range(spanStyleOverwrite, 0, "abc".length)
                 ),
                 constraints = ParagraphConstraints(width = Float.MAX_VALUE)
             )
@@ -2929,8 +2929,8 @@
                 text = text,
                 style = TextStyle(fontSize = fontSize),
                 spanStyles = listOf(
-                    AnnotatedString.Item(letterSpacingStyle, 0, text.length),
-                    AnnotatedString.Item(fontSizeStyle, 0, "abc".length)
+                    AnnotatedString.Range(letterSpacingStyle, 0, text.length),
+                    AnnotatedString.Range(fontSizeStyle, 0, "abc".length)
                 ),
                 constraints = ParagraphConstraints(width = Float.MAX_VALUE)
             )
@@ -2960,8 +2960,8 @@
                 text = text,
                 style = TextStyle(fontSize = fontSize),
                 spanStyles = listOf(
-                    AnnotatedString.Item(letterSpacingStyle, 0, text.length),
-                    AnnotatedString.Item(scaleXStyle, 0, "abc".length)
+                    AnnotatedString.Range(letterSpacingStyle, 0, text.length),
+                    AnnotatedString.Range(scaleXStyle, 0, "abc".length)
                 ),
                 constraints = ParagraphConstraints(width = Float.MAX_VALUE)
             )
@@ -2993,8 +2993,8 @@
                 text = text,
                 style = TextStyle(fontSize = fontSize),
                 spanStyles = listOf(
-                    AnnotatedString.Item(letterSpacingStyle, 0, text.length),
-                    AnnotatedString.Item(fontSizeStyle, 0, "abc".length)
+                    AnnotatedString.Range(letterSpacingStyle, 0, text.length),
+                    AnnotatedString.Range(fontSizeStyle, 0, "abc".length)
                 ),
                 constraints = ParagraphConstraints(width = Float.MAX_VALUE)
             )
@@ -3025,8 +3025,8 @@
                 text = text,
                 style = TextStyle(fontSize = fontSize),
                 spanStyles = listOf(
-                    AnnotatedString.Item(letterSpacingStyle, 0, text.length),
-                    AnnotatedString.Item(scaleXStyle, 0, "abc".length)
+                    AnnotatedString.Range(letterSpacingStyle, 0, text.length),
+                    AnnotatedString.Range(scaleXStyle, 0, "abc".length)
                 ),
                 constraints = ParagraphConstraints(width = Float.MAX_VALUE)
             )
@@ -3055,8 +3055,8 @@
                 text = text,
                 style = TextStyle(fontSize = fontSize.sp),
                 spanStyles = listOf(
-                    AnnotatedString.Item(letterSpacingEmStyle, 0, text.length),
-                    AnnotatedString.Item(letterSpacingSpStyle, 0, "abc".length)
+                    AnnotatedString.Range(letterSpacingEmStyle, 0, text.length),
+                    AnnotatedString.Range(letterSpacingSpStyle, 0, "abc".length)
                 ),
                 constraints = ParagraphConstraints(width = Float.MAX_VALUE)
             )
@@ -3085,8 +3085,8 @@
                 text = text,
                 style = TextStyle(fontSize = fontSize.sp),
                 spanStyles = listOf(
-                    AnnotatedString.Item(letterSpacingSpStyle, 0, "abc".length),
-                    AnnotatedString.Item(letterSpacingEmStyle, 0, text.length)
+                    AnnotatedString.Range(letterSpacingSpStyle, 0, "abc".length),
+                    AnnotatedString.Range(letterSpacingEmStyle, 0, text.length)
                 ),
                 constraints = ParagraphConstraints(width = 500f)
             )
@@ -3254,7 +3254,7 @@
             val paragraph = simpleParagraph(
                 text = text,
                 spanStyles = listOf(
-                    AnnotatedString.Item(spanStyle, "a".length, text.length)
+                    AnnotatedString.Range(spanStyle, "a".length, text.length)
                 ),
                 style = TextStyle(
                     fontSize = fontSize,
@@ -3279,7 +3279,7 @@
             val paragraph = simpleParagraph(
                 text = text,
                 spanStyles = listOf(
-                    AnnotatedString.Item(spanStyle, 0, "aA".length)
+                    AnnotatedString.Range(spanStyle, 0, "aA".length)
                 ),
                 style = TextStyle(
                     fontSize = fontSize,
@@ -3313,7 +3313,7 @@
             val paragraphShadow = simpleParagraph(
                 text = text,
                 spanStyles = listOf(
-                    AnnotatedString.Item(spanStyle, 0, text.length)
+                    AnnotatedString.Range(spanStyle, 0, text.length)
                 ),
                 constraints = ParagraphConstraints(width = paragraphWidth)
             )
@@ -3806,7 +3806,7 @@
                 text = text,
                 style = TextStyle(fontSize = fontSize),
                 spanStyles = listOf(
-                    AnnotatedString.Item(
+                    AnnotatedString.Range(
                         SpanStyle(fontSize = styledFontSize), "a".length, "a bb ".length
                     )
                 )
@@ -3901,7 +3901,7 @@
         style: TextStyle? = null,
         maxLines: Int = Int.MAX_VALUE,
         ellipsis: Boolean = false,
-        spanStyles: List<AnnotatedString.Item<SpanStyle>> = listOf(),
+        spanStyles: List<AnnotatedString.Range<SpanStyle>> = listOf(),
         density: Density? = null,
         constraints: ParagraphConstraints = ParagraphConstraints(Float.MAX_VALUE)
     ): Paragraph {
diff --git a/ui/ui-text-core/src/androidTest/java/androidx/ui/text/ParagraphIntrinsicIntegrationTest.kt b/ui/ui-text-core/src/androidTest/java/androidx/ui/text/ParagraphIntrinsicIntegrationTest.kt
index 50f0ebc..277110f 100644
--- a/ui/ui-text-core/src/androidTest/java/androidx/ui/text/ParagraphIntrinsicIntegrationTest.kt
+++ b/ui/ui-text-core/src/androidTest/java/androidx/ui/text/ParagraphIntrinsicIntegrationTest.kt
@@ -98,7 +98,7 @@
                 text = text,
                 fontSize = fontSize,
                 spanStyles = listOf(
-                    SpanStyleItem(
+                    SpanStyleRange(
                         item = SpanStyle(fontSize = styledFontSize),
                         start = "a ".length,
                         end = "a bb ".length
@@ -182,7 +182,7 @@
                 text = text,
                 fontSize = fontSize,
                 spanStyles = listOf(
-                    SpanStyleItem(
+                    SpanStyleRange(
                         item = SpanStyle(fontSize = styledFontSize),
                         start = "a".length,
                         end = "a bb ".length
@@ -199,7 +199,7 @@
         text: String = "",
         style: TextStyle? = null,
         fontSize: TextUnit = 14.sp,
-        spanStyles: List<AnnotatedString.Item<SpanStyle>> = listOf()
+        spanStyles: List<AnnotatedString.Range<SpanStyle>> = listOf()
     ): ParagraphIntrinsics {
         return ParagraphIntrinsics(
             text = text,
diff --git a/ui/ui-text-core/src/androidTest/java/androidx/ui/text/ParagraphPlaceholderIntegrationTest.kt b/ui/ui-text-core/src/androidTest/java/androidx/ui/text/ParagraphPlaceholderIntegrationTest.kt
index 0fef88c..1b4cb7e 100644
--- a/ui/ui-text-core/src/androidTest/java/androidx/ui/text/ParagraphPlaceholderIntegrationTest.kt
+++ b/ui/ui-text-core/src/androidTest/java/androidx/ui/text/ParagraphPlaceholderIntegrationTest.kt
@@ -38,7 +38,7 @@
         val paragraph = simpleParagraph(
             text = text,
             fontSize = fontSize.sp,
-            placeholders = listOf(AnnotatedString.Item(placeholder, 1, 2)),
+            placeholders = listOf(AnnotatedString.Range(placeholder, 1, 2)),
             width = Float.MAX_VALUE
         )
         val placeholderRects = paragraph.placeholderRects
@@ -65,7 +65,7 @@
         val paragraph = simpleParagraph(
             text = text,
             fontSize = fontSize.sp,
-            placeholders = listOf(AnnotatedString.Item(placeholder, 1, 2)),
+            placeholders = listOf(AnnotatedString.Range(placeholder, 1, 2)),
             width = Float.MAX_VALUE
         )
         val placeholderRects = paragraph.placeholderRects
@@ -96,7 +96,7 @@
         val paragraph = simpleParagraph(
             text = text,
             fontSize = fontSize.sp,
-            placeholders = listOf(AnnotatedString.Item(placeholder, 1, 2)),
+            placeholders = listOf(AnnotatedString.Range(placeholder, 1, 2)),
             width = Float.MAX_VALUE
         )
         val placeholderRects = paragraph.placeholderRects
@@ -124,7 +124,7 @@
         val paragraph = simpleParagraph(
             text = text,
             fontSize = fontSize.sp,
-            placeholders = listOf(AnnotatedString.Item(placeholder, 1, 2)),
+            placeholders = listOf(AnnotatedString.Range(placeholder, 1, 2)),
             width = Float.MAX_VALUE
         )
         val placeholderRects = paragraph.placeholderRects
@@ -152,7 +152,7 @@
         val paragraph = simpleParagraph(
             text = text,
             fontSize = fontSize.sp,
-            placeholders = listOf(AnnotatedString.Item(placeholder, 1, 2)),
+            placeholders = listOf(AnnotatedString.Range(placeholder, 1, 2)),
             width = Float.MAX_VALUE
         )
         val placeholderRects = paragraph.placeholderRects
@@ -181,7 +181,7 @@
         val paragraph = simpleParagraph(
             text = text,
             fontSize = fontSize.sp,
-            placeholders = listOf(AnnotatedString.Item(placeholder, 1, 2)),
+            placeholders = listOf(AnnotatedString.Range(placeholder, 1, 2)),
             width = Float.MAX_VALUE
         )
         val placeholderRects = paragraph.placeholderRects
@@ -210,7 +210,7 @@
         val paragraph = simpleParagraph(
             text = text,
             fontSize = fontSize.sp,
-            placeholders = listOf(AnnotatedString.Item(placeholder, 1, 2)),
+            placeholders = listOf(AnnotatedString.Range(placeholder, 1, 2)),
             width = Float.MAX_VALUE
         )
         val placeholderRects = paragraph.placeholderRects
@@ -241,7 +241,7 @@
         val paragraph = simpleParagraph(
             text = text,
             fontSize = fontSize.sp,
-            placeholders = listOf(AnnotatedString.Item(placeholder, 1, 2)),
+            placeholders = listOf(AnnotatedString.Range(placeholder, 1, 2)),
             width = Float.MAX_VALUE
         )
         val placeholderRects = paragraph.placeholderRects
@@ -273,9 +273,9 @@
         val paragraph = simpleParagraph(
             text = text,
             spanStyles = listOf(
-                AnnotatedString.Item(SpanStyle(fontSize = fontSizeSpan.sp), 2, 3)
+                AnnotatedString.Range(SpanStyle(fontSize = fontSizeSpan.sp), 2, 3)
             ),
-            placeholders = listOf(AnnotatedString.Item(placeholder, 1, 2)),
+            placeholders = listOf(AnnotatedString.Range(placeholder, 1, 2)),
             fontSize = fontSize.sp,
             width = Float.MAX_VALUE
         )
@@ -305,9 +305,9 @@
         val paragraph = simpleParagraph(
             text = text,
             spanStyles = listOf(
-                AnnotatedString.Item(SpanStyle(fontSize = fontSizeSpan.sp), 2, 3)
+                AnnotatedString.Range(SpanStyle(fontSize = fontSizeSpan.sp), 2, 3)
             ),
-            placeholders = listOf(AnnotatedString.Item(placeholder, 1, 2)),
+            placeholders = listOf(AnnotatedString.Range(placeholder, 1, 2)),
             fontSize = fontSize.sp,
             width = Float.MAX_VALUE
         )
@@ -337,9 +337,9 @@
         val paragraph = simpleParagraph(
             text = text,
             spanStyles = listOf(
-                AnnotatedString.Item(SpanStyle(fontSize = fontSizeSpan.sp), 2, 3)
+                AnnotatedString.Range(SpanStyle(fontSize = fontSizeSpan.sp), 2, 3)
             ),
-            placeholders = listOf(AnnotatedString.Item(placeholder, 1, 2)),
+            placeholders = listOf(AnnotatedString.Range(placeholder, 1, 2)),
             fontSize = fontSize.sp,
             width = Float.MAX_VALUE
         )
@@ -365,8 +365,8 @@
 
         val placeholder = Placeholder(1.em, 1.em, PlaceholderVerticalAlign.TextCenter)
         val placeholders = listOf(
-            AnnotatedString.Item(placeholder, 0, 1),
-            AnnotatedString.Item(placeholder, 2, 3)
+            AnnotatedString.Range(placeholder, 0, 1),
+            AnnotatedString.Range(placeholder, 2, 3)
         )
         val paragraph = simpleParagraph(
             text = text,
@@ -390,8 +390,8 @@
     private fun simpleParagraph(
         text: String = "",
         fontSize: TextUnit = TextUnit.Inherit,
-        spanStyles: List<AnnotatedString.Item<SpanStyle>> = listOf(),
-        placeholders: List<AnnotatedString.Item<Placeholder>> = listOf(),
+        spanStyles: List<AnnotatedString.Range<SpanStyle>> = listOf(),
+        placeholders: List<AnnotatedString.Range<Placeholder>> = listOf(),
         width: Float = Float.MAX_VALUE,
         maxLines: Int = Int.MAX_VALUE,
         ellipsis: Boolean = false
diff --git a/ui/ui-text-core/src/androidTest/java/androidx/ui/text/platform/AndroidParagraphTest.kt b/ui/ui-text-core/src/androidTest/java/androidx/ui/text/platform/AndroidParagraphTest.kt
index b784a96..e2e5e08 100644
--- a/ui/ui-text-core/src/androidTest/java/androidx/ui/text/platform/AndroidParagraphTest.kt
+++ b/ui/ui-text-core/src/androidTest/java/androidx/ui/text/platform/AndroidParagraphTest.kt
@@ -109,7 +109,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, text.length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, text.length)),
             constraints = ParagraphConstraints(width = 100.0f)
         )
 
@@ -123,7 +123,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, "abc".length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, "abc".length)),
             constraints = ParagraphConstraints(width = 100.0f)
         )
 
@@ -139,8 +139,8 @@
         val paragraph = simpleParagraph(
             text = text,
             spanStyles = listOf(
-                AnnotatedString.Item(spanStyle, 0, text.length),
-                AnnotatedString.Item(spanStyleOverwrite, 0, "abc".length)
+                AnnotatedString.Range(spanStyle, 0, text.length),
+                AnnotatedString.Range(spanStyleOverwrite, 0, "abc".length)
             ),
             constraints = ParagraphConstraints(width = 100.0f)
         )
@@ -157,7 +157,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, text.length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, text.length)),
             constraints = ParagraphConstraints(width = 100.0f)
         )
 
@@ -172,7 +172,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, text.length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, text.length)),
             constraints = ParagraphConstraints(width = 100.0f)
         )
 
@@ -187,7 +187,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, "abc".length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, "abc".length)),
             constraints = ParagraphConstraints(width = 100.0f)
         )
 
@@ -202,7 +202,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, "abc".length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, "abc".length)),
             constraints = ParagraphConstraints(width = 100.0f)
         )
 
@@ -221,7 +221,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, "abc".length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, "abc".length)),
             constraints = ParagraphConstraints(width = 100.0f)
         )
 
@@ -240,7 +240,7 @@
 
             val paragraph = simpleParagraph(
                 text = text,
-                spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, text.length)),
+                spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, text.length)),
                 constraints = ParagraphConstraints(width = paragraphWidth)
             )
 
@@ -258,7 +258,7 @@
 
             val paragraph = simpleParagraph(
                 text = text,
-                spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, "abc".length)),
+                spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, "abc".length)),
                 constraints = ParagraphConstraints(width = paragraphWidth)
             )
 
@@ -279,8 +279,8 @@
             val paragraph = simpleParagraph(
                 text = text,
                 spanStyles = listOf(
-                    AnnotatedString.Item(spanStyle, 0, text.length),
-                    AnnotatedString.Item(spanStyleOverwrite, 0, "abc".length)
+                    AnnotatedString.Range(spanStyle, 0, text.length),
+                    AnnotatedString.Range(spanStyleOverwrite, 0, "abc".length)
                 ),
                 constraints = ParagraphConstraints(width = paragraphWidth)
             )
@@ -300,7 +300,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, text.length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, text.length)),
             constraints = ParagraphConstraints(width = 100.0f)
         )
 
@@ -317,7 +317,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, "abc".length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, "abc".length)),
             constraints = ParagraphConstraints(width = 100.0f)
         )
 
@@ -334,7 +334,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, text.length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, text.length)),
             constraints = ParagraphConstraints(width = 100.0f)
         )
 
@@ -349,7 +349,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, "abc".length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, "abc".length)),
             constraints = ParagraphConstraints(width = 100.0f)
         )
 
@@ -366,8 +366,8 @@
         val paragraph = simpleParagraph(
             text = text,
             spanStyles = listOf(
-                AnnotatedString.Item(spanStyle, 0, text.length),
-                AnnotatedString.Item(spanStyleOverwrite, 0, "abc".length)
+                AnnotatedString.Range(spanStyle, 0, text.length),
+                AnnotatedString.Range(spanStyleOverwrite, 0, "abc".length)
             ),
             constraints = ParagraphConstraints(width = 100.0f)
         )
@@ -386,7 +386,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, text.length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, text.length)),
             constraints = ParagraphConstraints(width = 100.0f)
         )
 
@@ -405,7 +405,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, "abc".length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, "abc".length)),
             constraints = ParagraphConstraints(width = 100.0f)
         )
 
@@ -427,8 +427,8 @@
         val paragraph = simpleParagraph(
             text = text,
             spanStyles = listOf(
-                AnnotatedString.Item(spanStyle, 0, text.length),
-                AnnotatedString.Item(spanStyleOverwrite, 0, "abc".length)
+                AnnotatedString.Range(spanStyle, 0, text.length),
+                AnnotatedString.Range(spanStyleOverwrite, 0, "abc".length)
             ),
             constraints = ParagraphConstraints(width = 100.0f)
         )
@@ -456,7 +456,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, text.length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, text.length)),
             constraints = ParagraphConstraints(width = 100.0f)
         )
 
@@ -471,7 +471,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, "abc".length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, "abc".length)),
             constraints = ParagraphConstraints(width = 100.0f)
         )
 
@@ -487,8 +487,8 @@
         val paragraph = simpleParagraph(
             text = text,
             spanStyles = listOf(
-                AnnotatedString.Item(spanStyle, 0, text.length),
-                AnnotatedString.Item(spanStyleOverwrite, 0, "abc".length)
+                AnnotatedString.Range(spanStyle, 0, text.length),
+                AnnotatedString.Range(spanStyleOverwrite, 0, "abc".length)
             ),
             constraints = ParagraphConstraints(width = 100.0f)
         )
@@ -505,7 +505,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, text.length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, text.length)),
             constraints = ParagraphConstraints(width = 100.0f) // width is not important
         )
 
@@ -519,7 +519,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, "abc".length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, "abc".length)),
             constraints = ParagraphConstraints(width = 100.0f) // width is not important
         )
 
@@ -536,8 +536,8 @@
         val paragraph = simpleParagraph(
             text = text,
             spanStyles = listOf(
-                AnnotatedString.Item(spanStyle, 0, text.length),
-                AnnotatedString.Item(spanStyleOverwrite, 0, "abc".length)
+                AnnotatedString.Range(spanStyle, 0, text.length),
+                AnnotatedString.Range(spanStyleOverwrite, 0, "abc".length)
             ),
             constraints = ParagraphConstraints(width = 100.0f) // width is not important
         )
@@ -554,7 +554,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, text.length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, text.length)),
             constraints = ParagraphConstraints(width = 100.0f) // width is not important
         )
 
@@ -574,7 +574,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, text.length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, text.length)),
             constraints = ParagraphConstraints(width = 100.0f) // width is not important
         )
 
@@ -592,7 +592,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, text.length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, text.length)),
             constraints = ParagraphConstraints(width = 100.0f) // width is not important
         )
 
@@ -631,7 +631,7 @@
         val paragraph = simpleParagraph(
             text = text,
             spanStyles = listOf(
-                AnnotatedString.Item(spanStyle, start = 0, end = text.length)
+                AnnotatedString.Range(spanStyle, start = 0, end = text.length)
             ),
             constraints = ParagraphConstraints(width = 100.0f) // width is not important
         )
@@ -663,8 +663,8 @@
         val paragraph = simpleParagraph(
             text = text,
             spanStyles = listOf(
-                AnnotatedString.Item(spanStyle, start = 0, end = text.length),
-                AnnotatedString.Item(spanStyleOverwrite, start = 0, end = "abc".length)
+                AnnotatedString.Range(spanStyle, start = 0, end = text.length),
+                AnnotatedString.Range(spanStyleOverwrite, start = 0, end = "abc".length)
             ),
             constraints = ParagraphConstraints(width = 100.0f) // width is not important
         )
@@ -704,7 +704,7 @@
         val paragraph = simpleParagraph(
             text = text,
             spanStyles = listOf(
-                AnnotatedString.Item(
+                AnnotatedString.Range(
                     spanStyle,
                     expectedStart,
                     expectedEnd
@@ -741,7 +741,7 @@
         val paragraph = simpleParagraph(
             text = text,
             spanStyles = listOf(
-                AnnotatedString.Item(
+                AnnotatedString.Range(
                     spanStyle,
                     expectedStart,
                     expectedEnd
@@ -765,7 +765,7 @@
 
         val paragraph = simpleParagraph(
             text = text,
-            spanStyles = listOf(AnnotatedString.Item(spanStyle, 0, "abc".length)),
+            spanStyles = listOf(AnnotatedString.Range(spanStyle, 0, "abc".length)),
             constraints = ParagraphConstraints(width = 100.0f) // width is not important
         )
 
@@ -1215,7 +1215,7 @@
 
     private fun simpleParagraph(
         text: String = "",
-        spanStyles: List<AnnotatedString.Item<SpanStyle>> = listOf(),
+        spanStyles: List<AnnotatedString.Range<SpanStyle>> = listOf(),
         textIndent: TextIndent? = null,
         textAlign: TextAlign? = null,
         textDirectionAlgorithm: TextDirectionAlgorithm? = TextDirectionAlgorithm.ContentOrLtr,