From 48bc00ec4b7709b707ef48b84a2bbf25cbef42ea Mon Sep 17 00:00:00 2001 From: Severn Everett Date: Wed, 15 May 2024 12:30:24 +0200 Subject: [PATCH 1/2] Fixing typo in area attribute --- buildSrc/src/main/resources/html_5.xsd | 2 +- src/commonMain/kotlin/generated/gen-attributes.kt | 2 ++ src/commonMain/kotlin/generated/gen-consumer-tags.kt | 2 +- src/commonMain/kotlin/generated/gen-tag-unions.kt | 10 +++++----- src/commonMain/kotlin/generated/gen-tags-a.kt | 4 ++++ src/jsMain/kotlin/generated/gen-consumer-tags-js.kt | 2 +- .../kotlin/generated/gen-consumer-tags-wasm-js.kt | 2 +- 7 files changed, 15 insertions(+), 9 deletions(-) diff --git a/buildSrc/src/main/resources/html_5.xsd b/buildSrc/src/main/resources/html_5.xsd index 1f47791a..fa124837 100644 --- a/buildSrc/src/main/resources/html_5.xsd +++ b/buildSrc/src/main/resources/html_5.xsd @@ -1781,7 +1781,7 @@ - + diff --git a/src/commonMain/kotlin/generated/gen-attributes.kt b/src/commonMain/kotlin/generated/gen-attributes.kt index a342c1d6..8d29d555 100644 --- a/src/commonMain/kotlin/generated/gen-attributes.kt +++ b/src/commonMain/kotlin/generated/gen-attributes.kt @@ -18,6 +18,8 @@ internal val attributeBooleanBooleanOnOff : Attribute = BooleanAttribut internal val attributeBooleanTicker : Attribute = TickerAttribute() +internal val attributeAreaShapeEnumAreaShapeValues : Attribute = EnumAttribute(areaShapeValues) + internal val attributeButtonFormEncTypeEnumButtonFormEncTypeValues : Attribute = EnumAttribute(buttonFormEncTypeValues) internal val attributeButtonFormMethodEnumButtonFormMethodValues : Attribute = EnumAttribute(buttonFormMethodValues) diff --git a/src/commonMain/kotlin/generated/gen-consumer-tags.kt b/src/commonMain/kotlin/generated/gen-consumer-tags.kt index f4d27e49..91739dd4 100644 --- a/src/commonMain/kotlin/generated/gen-consumer-tags.kt +++ b/src/commonMain/kotlin/generated/gen-consumer-tags.kt @@ -199,7 +199,7 @@ public inline fun > C.area( crossinline block: AREA.() -> Unit = {}, ): T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return AREA(attributesMapOf("Shape", shape?.enumEncode(),"alt", alt,"class", classes), this) + return AREA(attributesMapOf("shape", shape?.enumEncode(),"alt", alt,"class", classes), this) .visitAndFinalize(this, block) } diff --git a/src/commonMain/kotlin/generated/gen-tag-unions.kt b/src/commonMain/kotlin/generated/gen-tag-unions.kt index 0cd2bc89..b6d0b512 100644 --- a/src/commonMain/kotlin/generated/gen-tag-unions.kt +++ b/src/commonMain/kotlin/generated/gen-tag-unions.kt @@ -312,31 +312,31 @@ inline fun FlowOrPhrasingContent.abbr(classes : String? = null, crossinline bloc @OptIn(ExperimentalContracts::class) inline fun FlowOrPhrasingContent.area(shape : AreaShape? = null, alt : String? = null, classes : String? = null, crossinline block : AREA.() -> Unit = {}) : Unit { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - AREA(attributesMapOf("Shape", shape?.enumEncode(),"alt", alt,"class", classes), consumer).visit(block) + AREA(attributesMapOf("shape", shape?.enumEncode(),"alt", alt,"class", classes), consumer).visit(block) } @HtmlTagMarker @OptIn(ExperimentalContracts::class) inline fun FlowOrPhrasingContent.rectArea(alt : String? = null, classes : String? = null, crossinline block : AREA.() -> Unit = {}) : Unit { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - AREA(attributesMapOf("Shape", AreaShape.rect.realValue,"alt", alt,"class", classes), consumer).visit(block) + AREA(attributesMapOf("shape", AreaShape.rect.realValue,"alt", alt,"class", classes), consumer).visit(block) } @HtmlTagMarker @OptIn(ExperimentalContracts::class) inline fun FlowOrPhrasingContent.circleArea(alt : String? = null, classes : String? = null, crossinline block : AREA.() -> Unit = {}) : Unit { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - AREA(attributesMapOf("Shape", AreaShape.circle.realValue,"alt", alt,"class", classes), consumer).visit(block) + AREA(attributesMapOf("shape", AreaShape.circle.realValue,"alt", alt,"class", classes), consumer).visit(block) } @HtmlTagMarker @OptIn(ExperimentalContracts::class) inline fun FlowOrPhrasingContent.polyArea(alt : String? = null, classes : String? = null, crossinline block : AREA.() -> Unit = {}) : Unit { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - AREA(attributesMapOf("Shape", AreaShape.poly.realValue,"alt", alt,"class", classes), consumer).visit(block) + AREA(attributesMapOf("shape", AreaShape.poly.realValue,"alt", alt,"class", classes), consumer).visit(block) } @HtmlTagMarker @OptIn(ExperimentalContracts::class) inline fun FlowOrPhrasingContent.defaultArea(alt : String? = null, classes : String? = null, crossinline block : AREA.() -> Unit = {}) : Unit { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - AREA(attributesMapOf("Shape", AreaShape.default.realValue,"alt", alt,"class", classes), consumer).visit(block) + AREA(attributesMapOf("shape", AreaShape.default.realValue,"alt", alt,"class", classes), consumer).visit(block) } /** diff --git a/src/commonMain/kotlin/generated/gen-tags-a.kt b/src/commonMain/kotlin/generated/gen-tags-a.kt index 120c7576..8886dae1 100644 --- a/src/commonMain/kotlin/generated/gen-tags-a.kt +++ b/src/commonMain/kotlin/generated/gen-tags-a.kt @@ -68,6 +68,10 @@ open class ADDRESS(initialAttributes : Map, override val consume @Suppress("unused") open class AREA(initialAttributes : Map, override val consumer : TagConsumer<*>) : HTMLTag("area", consumer, initialAttributes, null, true, true), HtmlBlockInlineTag { + var shape : AreaShape + get() = attributeAreaShapeEnumAreaShapeValues.get(this, "shape") + set(newValue) {attributeAreaShapeEnumAreaShapeValues.set(this, "shape", newValue)} + var coords : String get() = attributeStringString.get(this, "coords") set(newValue) {attributeStringString.set(this, "coords", newValue)} diff --git a/src/jsMain/kotlin/generated/gen-consumer-tags-js.kt b/src/jsMain/kotlin/generated/gen-consumer-tags-js.kt index 51ec3641..443f352a 100644 --- a/src/jsMain/kotlin/generated/gen-consumer-tags-js.kt +++ b/src/jsMain/kotlin/generated/gen-consumer-tags-js.kt @@ -251,7 +251,7 @@ public inline fun TagConsumer.area( crossinline block: AREA.() -> Unit = {}, ): HTMLAreaElement { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return AREA(attributesMapOf("Shape", shape?.enumEncode(),"alt", alt,"class", classes), this) + return AREA(attributesMapOf("shape", shape?.enumEncode(),"alt", alt,"class", classes), this) .visitAndFinalize(this, block) as HTMLAreaElement } diff --git a/src/wasmJsMain/kotlin/generated/gen-consumer-tags-wasm-js.kt b/src/wasmJsMain/kotlin/generated/gen-consumer-tags-wasm-js.kt index 03acc713..98848ed6 100644 --- a/src/wasmJsMain/kotlin/generated/gen-consumer-tags-wasm-js.kt +++ b/src/wasmJsMain/kotlin/generated/gen-consumer-tags-wasm-js.kt @@ -251,7 +251,7 @@ public inline fun TagConsumer.area( crossinline block: AREA.() -> Unit = {}, ): HTMLAreaElement { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } - return AREA(attributesMapOf("Shape", shape?.enumEncode(),"alt", alt,"class", classes), this) + return AREA(attributesMapOf("shape", shape?.enumEncode(),"alt", alt,"class", classes), this) .visitAndFinalize(this, block) as HTMLAreaElement } From 544c9bf900fe096c3c543ceba56fec8cb3990e39 Mon Sep 17 00:00:00 2001 From: Severn Everett Date: Wed, 15 May 2024 12:50:32 +0200 Subject: [PATCH 2/2] Updating gen-attributes.kt --- src/commonMain/kotlin/generated/gen-attributes.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/commonMain/kotlin/generated/gen-attributes.kt b/src/commonMain/kotlin/generated/gen-attributes.kt index 3bd039d2..8e32f7ea 100644 --- a/src/commonMain/kotlin/generated/gen-attributes.kt +++ b/src/commonMain/kotlin/generated/gen-attributes.kt @@ -20,6 +20,8 @@ internal val attributeBooleanTicker : Attribute = TickerAttribute() internal val attributeAReferrerPolicyEnumAReferrerPolicyValues : Attribute = EnumAttribute(aReferrerPolicyValues) +internal val attributeAreaShapeEnumAreaShapeValues : Attribute = EnumAttribute(areaShapeValues) + internal val attributeButtonFormEncTypeEnumButtonFormEncTypeValues : Attribute = EnumAttribute(buttonFormEncTypeValues) internal val attributeButtonFormMethodEnumButtonFormMethodValues : Attribute = EnumAttribute(buttonFormMethodValues)