Skip to content

Commit

Permalink
React 19.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
porotkin committed Jan 20, 2025
1 parent bc51fbc commit 1bb94bb
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
6 changes: 6 additions & 0 deletions buildSrc/src/main/kotlin/karakum/react/Converter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ internal fun convertDefinitions(
.replace(" | undefined", " | undefined")
.replace(" | (string & {})", "")
.replace("((formData: FormData) => void | Promise<void>) |", "")
.replace("""popover?: "" | "auto" | "manual" | undefined;""", "popover?: Popover;")
.replace(
"""popoverTargetAction?: "toggle" | "show" | "hide" | undefined;""",
"popoverTargetAction?: PopoverTargetAction;",
)
.replace("((formData: FormData) => void | Promise<void>) |", "")
.withDefaultLineBreaks()

val intrinsicsContent = content.substringAfter(" interface IntrinsicElements {\n")
Expand Down
5 changes: 3 additions & 2 deletions buildSrc/src/main/kotlin/karakum/react/EventConverter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import web.data.DataTransfer
import web.uievents.MouseButton
import web.uievents.MouseButtons
import web.time.DOMHighResTimeStamp
import web.popover.ToggleState
"""

internal fun convertEventInterface(
Expand Down Expand Up @@ -99,8 +100,8 @@ internal fun convertEventInterface(

"ToggleEvent",
-> members = members
.replaceFirst("val oldState: OldState", "val oldState: String /* ToggleState */")
.replaceFirst("val newState: NewState", "val newState: String /* ToggleState */")
.replaceFirst("val oldState: OldState", "val oldState: ToggleState")
.replaceFirst("val newState: NewState", "val newState: ToggleState")
}

val body = DEFAULT_EVENT_IMPORTS.removePrefix("\n") +
Expand Down
2 changes: 2 additions & 0 deletions buildSrc/src/main/kotlin/karakum/react/Generator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import web.html.AutoCapitalize
import web.html.InputMode
import web.html.ButtonType
import web.autofill.AutoFill
import web.popover.Popover
import web.popover.PopoverTargetAction
""".trimIndent()

private val SESKAR_IMPORTS = """
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ csstype.version=3.1.3
popperjs-core.version=2.11.8
tanstack-react-query.version=5.64.2
tanstack-react-table.version=8.20.6
types-react.version=19.0.2
types-react.version=19.0.7
tanstack-react-virtual.version=3.11.2

kotlin-wrappers.version=2025.1.4
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1bb94bb

Please sign in to comment.