From 0c30a3e2af62e01fc9221dd1c97b5e73bc4e7c73 Mon Sep 17 00:00:00 2001 From: Oleksandr Karpovich Date: Wed, 2 Feb 2022 14:24:10 +0100 Subject: [PATCH] web: add typealias AttrsBuilder referencing new AttrsScopeBuilder (#1778) This mitigates possible breaking API changes Co-authored-by: Oleksandr Karpovich --- .../compose/web/attributes/AttrsScope.kt | 43 +++--- .../compose/web/elements/Elements.kt | 131 +++++++++--------- .../org/jetbrains/compose/web/svg/svg.kt | 78 +++++------ 3 files changed, 129 insertions(+), 123 deletions(-) diff --git a/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/attributes/AttrsScope.kt b/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/attributes/AttrsScope.kt index b6205c8fbc..e4f35bcde2 100644 --- a/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/attributes/AttrsScope.kt +++ b/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/attributes/AttrsScope.kt @@ -8,6 +8,15 @@ import org.jetbrains.compose.web.internal.runtime.ComposeWebInternalApi import org.w3c.dom.Element import org.w3c.dom.HTMLElement +@Deprecated( + message = "Renamed to AttrsScopeBuilder", + replaceWith = ReplaceWith( + expression = "AttrsScopeBuilder", + imports = arrayOf("org.jetbrains.compose.web.attributes.AttrsScopeBuilder") + ) +) +typealias AttrsBuilder = AttrsScopeBuilder + /** * [AttrsScope] is a class that is used (as a builder context, that is as AttrsBuilder.() -> Unit) * in all DOM-element creating API calls. It's used for adding attributes to the element created, @@ -23,12 +32,12 @@ interface AttrsScope: EventsListenerScope { val attributesMap: Map @ComposeWebInternalApi val styleScope: StyleScope - + @ComposeWebInternalApi val propertyUpdates: List Unit, Any>> @ComposeWebInternalApi var refEffect: (DisposableEffectScope.(TElement) -> DisposableEffectResult)? - + /** * [style] add inline CSS-style properties to the element via [StyleScope] context * @@ -42,7 +51,7 @@ interface AttrsScope: EventsListenerScope { fun style(builder: StyleScope.() -> Unit) { styleScope.apply(builder) } - + /** * [classes] adds all values passed as params to the element's classList. * This method acts cumulatively, that is, each call adds values to the classList. @@ -50,7 +59,7 @@ interface AttrsScope: EventsListenerScope { * since if your classList is, for instance, condition-dependent, you can always just call this method conditionally. */ fun classes(vararg classes: String)= prop(setClassList, classes) - + fun id(value: String) = attr(ID, value) fun hidden() = attr(HIDDEN, true.toString()) fun title(value: String) = attr(TITLE, value) @@ -60,17 +69,17 @@ interface AttrsScope: EventsListenerScope { fun lang(value: String) = attr(LANG, value) fun tabIndex(value: Int) = attr(TAB_INDEX, value.toString()) fun spellCheck(value: Boolean) = attr(SPELLCHECK, value.toString()) - + /** * see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode */ fun inputMode(value: String) = attr("inputmode", value) - + /** * see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode */ fun inputMode(value: InputMode) = attr("inputmode", value.str) - + /** * [ref] can be used to retrieve a reference to a html element. * The lambda that `ref` takes in is not Composable. It will be called only once when an element added into a composition. @@ -79,7 +88,7 @@ interface AttrsScope: EventsListenerScope { * Under the hood, `ref` uses [DisposableEffect](https://developer.android.com/jetpack/compose/side-effects#disposableeffect) */ fun ref(effect: DisposableEffectScope.(TElement) -> DisposableEffectResult) - + /** * [attr] adds arbitrary attribute to the Element. * If it called twice for the same attribute name, attribute value will be resolved to the last call. @@ -90,7 +99,7 @@ interface AttrsScope: EventsListenerScope { * For boolean attributes cast boolean value to String and pass it as value. */ fun attr(attr: String, value: String): AttrsScope - + /** * [prop] allows setting values of element's properties which can't be set by ussing [attr]. * [update] is a lambda with two parameters: `element` and `value`. `element` is a reference to a native element. @@ -110,9 +119,10 @@ interface AttrsScope: EventsListenerScope { */ @Suppress("UNCHECKED_CAST") fun prop(update: (E, V) -> Unit, value: V) - + + @ComposeWebInternalApi fun copyFrom(attrsScope: AttrsScope) - + companion object { const val CLASS = "class" const val ID = "id" @@ -130,10 +140,10 @@ interface AttrsScope: EventsListenerScope { open class AttrsScopeBuilder : AttrsScope, EventsListenerScope by EventsListenerScopeBuilder() { override val attributesMap = mutableMapOf() override val styleScope: StyleScope = StyleScopeBuilder() - + override val propertyUpdates = mutableListOf Unit, Any>>() override var refEffect: (DisposableEffectScope.(TElement) -> DisposableEffectResult)? = null - + /** * [ref] can be used to retrieve a reference to a html element. * The lambda that `ref` takes in is not Composable. It will be called only once when an element added into a composition. @@ -184,14 +194,15 @@ open class AttrsScopeBuilder : AttrsScope, EventsL internal fun collect(): Map { return attributesMap } - + + @ComposeWebInternalApi override fun copyFrom(attrsScope: AttrsScope) { refEffect = attrsScope.refEffect styleScope.copyFrom(attrsScope.styleScope) - + attributesMap.putAll(attrsScope.attributesMap) propertyUpdates.addAll(attrsScope.propertyUpdates) - + copyListenersFrom(attrsScope) } } diff --git a/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/elements/Elements.kt b/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/elements/Elements.kt index a48b9712c4..50061b09a3 100644 --- a/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/elements/Elements.kt +++ b/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/elements/Elements.kt @@ -60,12 +60,7 @@ import org.w3c.dom.HTMLVideoElement import org.w3c.dom.Text import org.w3c.dom.css.CSSStyleSheet -@Deprecated( - message = "Renamed to AttrsBuilder", - replaceWith = ReplaceWith("AttrsBuilder", "org.jetbrains.compose.web.dom.AttrsBuilder") -) -typealias AttrBuilderContext = AttrsBuilder -typealias AttrsBuilder = AttrsScope.() -> Unit +typealias AttrBuilderContext = AttrsScope.() -> Unit typealias ContentBuilder = @Composable ElementScope.() -> Unit private open class ElementBuilderImplementation(private val tagName: String) : ElementBuilder { @@ -168,7 +163,7 @@ fun interface ElementBuilder { @Composable fun Address( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -180,7 +175,7 @@ fun Address( @Composable fun Article( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -192,7 +187,7 @@ fun Article( @Composable fun Aside( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -204,7 +199,7 @@ fun Aside( @Composable fun Header( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -216,7 +211,7 @@ fun Header( @Composable fun Area( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -228,7 +223,7 @@ fun Area( @Composable fun Audio( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -240,7 +235,7 @@ fun Audio( @Composable fun HTMLMap( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -252,7 +247,7 @@ fun HTMLMap( @Composable fun Track( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -264,7 +259,7 @@ fun Track( @Composable fun Video( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -276,7 +271,7 @@ fun Video( @Composable fun Datalist( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -288,7 +283,7 @@ fun Datalist( @Composable fun Fieldset( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -300,7 +295,7 @@ fun Fieldset( @Composable fun Legend( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -312,7 +307,7 @@ fun Legend( @Composable fun Meter( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -324,7 +319,7 @@ fun Meter( @Composable fun Output( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -336,7 +331,7 @@ fun Output( @Composable fun Progress( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -348,7 +343,7 @@ fun Progress( @Composable fun Embed( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -360,7 +355,7 @@ fun Embed( @Composable fun Iframe( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -372,7 +367,7 @@ fun Iframe( @Composable fun Object( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -384,7 +379,7 @@ fun Object( @Composable fun Param( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -396,7 +391,7 @@ fun Param( @Composable fun Picture( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -408,7 +403,7 @@ fun Picture( @Composable fun Source( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -431,7 +426,7 @@ fun Text(value: String) { @Composable fun Div( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -444,7 +439,7 @@ fun Div( @Composable fun A( href: String? = null, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -463,101 +458,101 @@ fun A( @Composable fun Button( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement(elementBuilder = Button, applyAttrs = attrs, content = content) @Composable fun H1( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement(elementBuilder = H1, applyAttrs = attrs, content = content) @Composable fun H2( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement(elementBuilder = H2, applyAttrs = attrs, content = content) @Composable fun H3( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement(elementBuilder = H3, applyAttrs = attrs, content = content) @Composable fun H4( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement(elementBuilder = H4, applyAttrs = attrs, content = content) @Composable fun H5( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement(elementBuilder = H5, applyAttrs = attrs, content = content) @Composable fun H6( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement(elementBuilder = H6, applyAttrs = attrs, content = content) @Composable fun P( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement(elementBuilder = P, applyAttrs = attrs, content = content) @Composable fun Em( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement(elementBuilder = Em, applyAttrs = attrs, content = content) @Composable fun I( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement(elementBuilder = I, applyAttrs = attrs, content = content) @Composable fun B( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement(elementBuilder = B, applyAttrs = attrs, content = content) @Composable fun Small( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement(elementBuilder = Small, applyAttrs = attrs, content = content) @Composable fun Span( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement(elementBuilder = Span, applyAttrs = attrs, content = content) @Composable -fun Br(attrs: AttrsBuilder? = null) = +fun Br(attrs: AttrBuilderContext? = null) = TagElement(elementBuilder = Br, applyAttrs = attrs, content = null) @Composable fun Ul( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement(elementBuilder = Ul, applyAttrs = attrs, content = content) @Composable fun Ol( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement(elementBuilder = Ol, applyAttrs = attrs, content = content) @Composable fun Li( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement(elementBuilder = Li, applyAttrs = attrs, content = content) @@ -565,7 +560,7 @@ fun Li( fun Img( src: String, alt: String = "", - attrs: AttrsBuilder? = null + attrs: AttrBuilderContext? = null ) = TagElement( elementBuilder = Img, applyAttrs = { @@ -580,7 +575,7 @@ fun Img( @Composable fun Form( action: String? = null, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement( elementBuilder = Form, @@ -616,7 +611,7 @@ fun Select( @Composable fun Option( value: String, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement( elementBuilder = Option, @@ -632,7 +627,7 @@ fun Option( @Composable fun OptGroup( label: String, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement( elementBuilder = OptGroup, @@ -647,7 +642,7 @@ fun OptGroup( @Composable fun Section( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement( elementBuilder = Section, @@ -713,7 +708,7 @@ private val textAreaRestoreControlledStateEffect: DomEffectScope.(HTMLTextAreaEl @Composable fun Nav( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) = TagElement( elementBuilder = Nav, @@ -723,7 +718,7 @@ fun Nav( @Composable fun Pre( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -735,7 +730,7 @@ fun Pre( @Composable fun Code( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -747,7 +742,7 @@ fun Code( @Composable fun Main( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -759,7 +754,7 @@ fun Main( @Composable fun Footer( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -771,7 +766,7 @@ fun Footer( @Composable fun Hr( - attrs: AttrsBuilder? = null + attrs: AttrBuilderContext? = null ) { TagElement( elementBuilder = Hr, @@ -783,7 +778,7 @@ fun Hr( @Composable fun Label( forId: String? = null, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -802,7 +797,7 @@ fun Label( @Composable fun Table( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -814,7 +809,7 @@ fun Table( @Composable fun Caption( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -826,7 +821,7 @@ fun Caption( @Composable fun Col( - attrs: AttrsBuilder? = null + attrs: AttrBuilderContext? = null ) { TagElement( elementBuilder = Col, @@ -837,7 +832,7 @@ fun Col( @Composable fun Colgroup( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -849,7 +844,7 @@ fun Colgroup( @Composable fun Tr( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -861,7 +856,7 @@ fun Tr( @Composable fun Thead( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -873,7 +868,7 @@ fun Thead( @Composable fun Th( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -885,7 +880,7 @@ fun Th( @Composable fun Td( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -897,7 +892,7 @@ fun Td( @Composable fun Tbody( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -909,7 +904,7 @@ fun Tbody( @Composable fun Tfoot( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( diff --git a/web/svg/src/jsMain/kotlin/org/jetbrains/compose/web/svg/svg.kt b/web/svg/src/jsMain/kotlin/org/jetbrains/compose/web/svg/svg.kt index dee2de80df..53cfc97f34 100644 --- a/web/svg/src/jsMain/kotlin/org/jetbrains/compose/web/svg/svg.kt +++ b/web/svg/src/jsMain/kotlin/org/jetbrains/compose/web/svg/svg.kt @@ -62,7 +62,7 @@ private val View = ElementBuilderNS("view", SVG_NS) @ExperimentalComposeWebSvgApi fun Svg( viewBox: String? = null, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -79,7 +79,7 @@ fun Svg( @ExperimentalComposeWebSvgApi fun ElementScope.SvgA( href: String, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -98,7 +98,7 @@ fun ElementScope.Circle( cx: CSSLengthOrPercentageValue, cy: CSSLengthOrPercentageValue, r: CSSLengthOrPercentageValue, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -120,7 +120,7 @@ fun ElementScope.Circle( cx: Number, cy: Number, r: Number, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -142,7 +142,7 @@ fun ElementScope.SvgText( text: String, x: Number = 0, y: Number = 0, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, ) { TagElement( elementBuilder = Text, @@ -162,7 +162,7 @@ fun ElementScope.SvgText( fun ElementScope.View( id: String, viewBox: String, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, ) { TagElement( elementBuilder = View, @@ -182,7 +182,7 @@ fun ElementScope.Rect( y: Number, width: Number, height: Number, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -205,7 +205,7 @@ fun ElementScope.Rect( y: CSSLengthOrPercentageValue, width: CSSLengthOrPercentageValue, height: CSSLengthOrPercentageValue, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -228,7 +228,7 @@ fun ElementScope.Ellipse( cy: CSSLengthOrPercentageValue, rx: CSSLengthOrPercentageValue, ry: CSSLengthOrPercentageValue, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -251,7 +251,7 @@ fun ElementScope.Ellipse( cy: Number, rx: Number, ry: Number, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -272,7 +272,7 @@ fun ElementScope.Ellipse( @ExperimentalComposeWebSvgApi fun ElementScope.Symbol( id: String? = null, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -289,7 +289,7 @@ fun ElementScope.Symbol( @ExperimentalComposeWebSvgApi fun ElementScope.Use( href: String, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -309,7 +309,7 @@ fun ElementScope.Line( y1: CSSLengthOrPercentageValue, x2: CSSLengthOrPercentageValue, y2: CSSLengthOrPercentageValue, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -332,7 +332,7 @@ fun ElementScope.Line( y1: Number, x2: Number, y2: Number, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -353,7 +353,7 @@ fun ElementScope.Line( @ExperimentalComposeWebSvgApi fun ElementScope.ClipPath( id: String, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -370,7 +370,7 @@ fun ElementScope.ClipPath( @ExperimentalComposeWebSvgApi fun ElementScope.Path( d: String, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -386,7 +386,7 @@ fun ElementScope.Path( @Composable @ExperimentalComposeWebSvgApi fun ElementScope.G( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -400,7 +400,7 @@ fun ElementScope.G( @ExperimentalComposeWebSvgApi fun ElementScope.Image( href: String, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -417,7 +417,7 @@ fun ElementScope.Image( @ExperimentalComposeWebSvgApi fun ElementScope.Mask( id: String? = null, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -433,7 +433,7 @@ fun ElementScope.Mask( @Composable @ExperimentalComposeWebSvgApi fun ElementScope.Defs( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -447,7 +447,7 @@ fun ElementScope.Defs( @ExperimentalComposeWebSvgApi fun ElementScope.Pattern( id: String, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -464,7 +464,7 @@ fun ElementScope.Pattern( @ExperimentalComposeWebSvgApi fun ElementScope.Polygon( vararg points: Number, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -481,7 +481,7 @@ fun ElementScope.Polygon( @ExperimentalComposeWebSvgApi fun ElementScope.Polyline( vararg points: Number, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -499,7 +499,7 @@ fun ElementScope.Polyline( fun ElementScope.TextPath( href: String, text: String, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, ) { TagElement( elementBuilder = TextPath, @@ -516,7 +516,7 @@ fun ElementScope.TextPath( @Composable @ExperimentalComposeWebSvgApi fun ElementScope.Animate( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -529,7 +529,7 @@ fun ElementScope.Animate( @Composable @ExperimentalComposeWebSvgApi fun ElementScope.AnimateMotion( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -542,7 +542,7 @@ fun ElementScope.AnimateMotion( @Composable @ExperimentalComposeWebSvgApi fun ElementScope.AnimateTransform( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -556,7 +556,7 @@ fun ElementScope.AnimateTransform( @ExperimentalComposeWebSvgApi fun ElementScope.LinearGradient( id: String? = null, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -574,7 +574,7 @@ fun ElementScope.LinearGradient( @ExperimentalComposeWebSvgApi fun ElementScope.RadialGradient( id: String? = null, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -590,7 +590,7 @@ fun ElementScope.RadialGradient( @Composable @ExperimentalComposeWebSvgApi fun ElementScope.Stop( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -603,7 +603,7 @@ fun ElementScope.Stop( @Composable @ExperimentalComposeWebSvgApi fun ElementScope.Switch( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -617,7 +617,7 @@ fun ElementScope.Switch( @ExperimentalComposeWebSvgApi fun ElementScope.Title( text: String, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, ) { TagElement( elementBuilder = Title, @@ -631,7 +631,7 @@ fun ElementScope.Title( @Composable @ExperimentalComposeWebSvgApi fun ElementScope.Tspan( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -645,7 +645,7 @@ fun ElementScope.Tspan( @ExperimentalComposeWebSvgApi fun ElementScope.Desc( content: String, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, ) { TagElement( elementBuilder = Desc, @@ -659,7 +659,7 @@ fun ElementScope.Desc( @Composable @ExperimentalComposeWebSvgApi fun ElementScope.Marker( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -672,7 +672,7 @@ fun ElementScope.Marker( @Composable @ExperimentalComposeWebSvgApi fun ElementScope.Mpath( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -685,7 +685,7 @@ fun ElementScope.Mpath( @Composable @ExperimentalComposeWebSvgApi fun ElementScope.Filter( - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -700,7 +700,7 @@ fun ElementScope.Filter( fun ElementScope.Set( attributeName: String, to: String, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement( @@ -718,7 +718,7 @@ fun ElementScope.Set( @ExperimentalComposeWebSvgApi fun SvgElement( name: String, - attrs: AttrsBuilder? = null, + attrs: AttrBuilderContext? = null, content: ContentBuilder? = null ) { TagElement(