From df46ae820a38eee380393c5b4ece52e76d6e021e Mon Sep 17 00:00:00 2001 From: Yoonchulchung Date: Thu, 19 Feb 2026 19:43:37 +0900 Subject: [PATCH 1/5] =?UTF-8?q?refactor(#344):=20K8S=20Application?= =?UTF-8?q?=EA=B3=BC=20Infra=20=EC=83=9D=EC=84=B1=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradlew | 251 ------------------------ gradlew.bat | 94 --------- infra/k8s/base/kafka/kafka-connect.yaml | 8 +- infra/k8s/base/kafka/kafka-nodepool.yml | 4 +- infra/k8s/base/kafka/kafka.yaml | 18 +- infra/k8s/base/kustomization.yaml | 8 + infra/k8s/base/temporal/temporal.yaml | 10 +- infra/k8s/monitoring/kustomization.yaml | 10 +- package-lock.json | 40 ---- package.json | 6 - run_k3d_app.sh | 16 +- settings.gradle | 8 - terraform.tfstate | 9 - 13 files changed, 53 insertions(+), 429 deletions(-) delete mode 100755 gradlew delete mode 100644 gradlew.bat delete mode 100644 package-lock.json delete mode 100644 package.json delete mode 100644 settings.gradle delete mode 100644 terraform.tfstate diff --git a/gradlew b/gradlew deleted file mode 100755 index ef07e016..00000000 --- a/gradlew +++ /dev/null @@ -1,251 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH="\\\"\\\"" - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - if ! command -v java >/dev/null 2>&1 - then - die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, -# and any embedded shellness will be escaped. -# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be -# treated as '${Hostname}' itself on the command line. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat deleted file mode 100644 index 5eed7ee8..00000000 --- a/gradlew.bat +++ /dev/null @@ -1,94 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem -@rem SPDX-License-Identifier: Apache-2.0 -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH= - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/infra/k8s/base/kafka/kafka-connect.yaml b/infra/k8s/base/kafka/kafka-connect.yaml index d22663d7..d0df774a 100644 --- a/infra/k8s/base/kafka/kafka-connect.yaml +++ b/infra/k8s/base/kafka/kafka-connect.yaml @@ -7,7 +7,7 @@ metadata: strimzi.io/use-connector-resources: "true" spec: version: 4.0.0 - replicas: 2 + replicas: 1 bootstrapServers: spot-cluster-kafka-bootstrap:9092 image: spot-registry.localhost:5111/spot-connect-custom:latest @@ -17,9 +17,9 @@ spec: statusStorageTopic: connect_status config: - config.storage.replication.factor: 3 - offset.storage.replication.factor: 3 - status.storage.replication.factor: 3 + config.storage.replication.factor: 1 + offset.storage.replication.factor: 1 + status.storage.replication.factor: 1 key.converter: org.apache.kafka.connect.json.JsonConverter value.converter: org.apache.kafka.connect.json.JsonConverter diff --git a/infra/k8s/base/kafka/kafka-nodepool.yml b/infra/k8s/base/kafka/kafka-nodepool.yml index 195b7696..622e8b54 100644 --- a/infra/k8s/base/kafka/kafka-nodepool.yml +++ b/infra/k8s/base/kafka/kafka-nodepool.yml @@ -6,7 +6,7 @@ metadata: labels: strimzi.io/cluster: spot-cluster spec: - replicas: 3 + replicas: 1 roles: - broker - controller @@ -23,4 +23,4 @@ spec: cpu: 250m limits: memory: 1Gi - cpu: 500m \ No newline at end of file + cpu: 500m diff --git a/infra/k8s/base/kafka/kafka.yaml b/infra/k8s/base/kafka/kafka.yaml index 6a082c0f..8ebee058 100644 --- a/infra/k8s/base/kafka/kafka.yaml +++ b/infra/k8s/base/kafka/kafka.yaml @@ -3,6 +3,9 @@ kind: Kafka metadata: name: spot-cluster namespace: spot + annotations: + strimzi.io/node-pools: enabled + strimzi.io/kraft: enabled spec: kafka: version: 4.0.0 @@ -12,17 +15,12 @@ spec: port: 9092 type: internal tls: false - - name: controller - port: 9093 - type: internal - tls: false config: - process.roles: "broker,controller" - offsets.topic.replication.factor: 3 - transaction.state.log.replication.factor: 3 - transaction.state.log.min.isr: 2 - default.replication.factor: 3 - min.insync.replicas: 2 + offsets.topic.replication.factor: 1 + transaction.state.log.replication.factor: 1 + transaction.state.log.min.isr: 1 + default.replication.factor: 1 + min.insync.replicas: 1 auto.create.topics.enable: "true" num.partitions: 3 entityOperator: diff --git a/infra/k8s/base/kustomization.yaml b/infra/k8s/base/kustomization.yaml index 7a9b2ea7..a6f67cf2 100644 --- a/infra/k8s/base/kustomization.yaml +++ b/infra/k8s/base/kustomization.yaml @@ -28,5 +28,13 @@ configMapGenerator: options: disableNameSuffixHash: true +secretGenerator: + - name: spot-secrets + namespace: spot + envs: + - ../../../.env + options: + disableNameSuffixHash: true + generatorOptions: disableNameSuffixHash: true diff --git a/infra/k8s/base/temporal/temporal.yaml b/infra/k8s/base/temporal/temporal.yaml index ab115462..406cddc8 100644 --- a/infra/k8s/base/temporal/temporal.yaml +++ b/infra/k8s/base/temporal/temporal.yaml @@ -23,11 +23,17 @@ spec: - name: DB value: postgres12 - name: POSTGRES_SEEDS - value: host.k3d.internal + valueFrom: + secretKeyRef: + name: spot-secrets + key: TEMPORAL_DB_HOST - name: DB_PORT value: "5432" - name: POSTGRES_USER - value: "admin" + valueFrom: + secretKeyRef: + name: spot-secrets + key: SPRING_DATASOURCE_USERNAME - name: POSTGRES_PWD valueFrom: secretKeyRef: diff --git a/infra/k8s/monitoring/kustomization.yaml b/infra/k8s/monitoring/kustomization.yaml index bb0cda3e..0a68e9aa 100644 --- a/infra/k8s/monitoring/kustomization.yaml +++ b/infra/k8s/monitoring/kustomization.yaml @@ -27,5 +27,13 @@ configMapGenerator: files: - ../base/monitoring/grafana/dashboards/15661.json +secretGenerator: + - name: spot-secrets + namespace: spot + envs: + - ../../../.env + options: + disableNameSuffixHash: true + generatorOptions: - disableNameSuffixHash: true + disableNameSuffixHash: true \ No newline at end of file diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 9b926404..00000000 --- a/package-lock.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "Spot", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "devDependencies": { - "@types/react": "^19.2.10", - "@types/react-dom": "^19.2.3" - } - }, - "node_modules/@types/react": { - "version": "19.2.10", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.10.tgz", - "integrity": "sha512-WPigyYuGhgZ/cTPRXB2EwUw+XvsRA3GqHlsP4qteqrnnjDrApbS7MxcGr/hke5iUoeB7E/gQtrs9I37zAJ0Vjw==", - "dev": true, - "license": "MIT", - "dependencies": { - "csstype": "^3.2.2" - } - }, - "node_modules/@types/react-dom": { - "version": "19.2.3", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz", - "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@types/react": "^19.2.0" - } - }, - "node_modules/csstype": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", - "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", - "dev": true, - "license": "MIT" - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index a9d0b756..00000000 --- a/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "devDependencies": { - "@types/react": "^19.2.10", - "@types/react-dom": "^19.2.3" - } -} diff --git a/run_k3d_app.sh b/run_k3d_app.sh index 36dca63b..79094a4a 100755 --- a/run_k3d_app.sh +++ b/run_k3d_app.sh @@ -85,6 +85,11 @@ create_cluster() { log_info "Waiting for cluster to be ready..." kubectl wait --for=condition=ready node --all --timeout=180s + log_info "Waiting for registry to be ready..." + until curl -sf "http://$REGISTRY_NAME:$REGISTRY_PORT/v2/" > /dev/null 2>&1; do + sleep 2 + done + log_info "Cluster created successfully!" } @@ -134,8 +139,15 @@ install_strimzi() { helm install strimzi-operator strimzi/strimzi-kafka-operator \ --namespace kafka \ --create-namespace \ - --set crds.enabled=true - + --set crds.enabled=true \ + --set watchNamespaces={spot} \ + --wait + + log_info "Waiting for Strimzi operator to be ready..." + kubectl wait --for=condition=ready pod \ + -l name=strimzi-cluster-operator \ + -n kafka --timeout=180s + log_info "Strimzi Operator installed successfully!" } diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 69b9c2c7..00000000 --- a/settings.gradle +++ /dev/null @@ -1,8 +0,0 @@ -rootProject.name = "Spot" - -include("spot-user") -include("spot-store") -include("spot-order") -include("spot-payment") -include("spot-mono") -include("spot-gateway") diff --git a/terraform.tfstate b/terraform.tfstate deleted file mode 100644 index 2ffdfe40..00000000 --- a/terraform.tfstate +++ /dev/null @@ -1,9 +0,0 @@ -{ - "version": 4, - "terraform_version": "1.14.3", - "serial": 1, - "lineage": "160e7fea-08d2-395f-ae56-957539d598ca", - "outputs": {}, - "resources": [], - "check_results": null -} From e1f3051b30139b514d9cd1af3b429fa72e68baf0 Mon Sep 17 00:00:00 2001 From: Yoonchulchung Date: Thu, 19 Feb 2026 20:06:41 +0900 Subject: [PATCH 2/5] =?UTF-8?q?chore(#344):=20dev=20=EB=B8=8C=EB=9E=9C?= =?UTF-8?q?=EC=B9=98=EC=99=80=20=EB=B3=91=ED=95=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- infra/k8s/kustomization.yaml | 2 +- run_k3d_infra.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) mode change 100755 => 100644 run_k3d_infra.sh diff --git a/infra/k8s/kustomization.yaml b/infra/k8s/kustomization.yaml index 017feb99..d831c686 100644 --- a/infra/k8s/kustomization.yaml +++ b/infra/k8s/kustomization.yaml @@ -10,4 +10,4 @@ kind: Kustomization resources: - base/ - apps/ - - monitoring/ + - monitoring/ \ No newline at end of file diff --git a/run_k3d_infra.sh b/run_k3d_infra.sh old mode 100755 new mode 100644 index 49354f21..957aeaad --- a/run_k3d_infra.sh +++ b/run_k3d_infra.sh @@ -210,4 +210,5 @@ main() { show_status } -main "$@" \ No newline at end of file +main "$@" + No newline at end of file From ea1b8eac304b630e4b4058fc322725941a9931a1 Mon Sep 17 00:00:00 2001 From: Yoonchulchung Date: Thu, 19 Feb 2026 20:09:54 +0900 Subject: [PATCH 3/5] =?UTF-8?q?fix(#344):=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20=ED=8C=8C=EC=9D=BC=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- node_modules/.package-lock.json | 34 - node_modules/@types/react-dom/LICENSE | 21 - node_modules/@types/react-dom/README.md | 16 - node_modules/@types/react-dom/canary.d.ts | 71 - node_modules/@types/react-dom/client.d.ts | 105 - .../@types/react-dom/experimental.d.ts | 54 - node_modules/@types/react-dom/index.d.ts | 133 - node_modules/@types/react-dom/package.json | 128 - .../@types/react-dom/server.browser.d.ts | 1 - node_modules/@types/react-dom/server.bun.d.ts | 1 - node_modules/@types/react-dom/server.d.ts | 183 - .../@types/react-dom/server.edge.d.ts | 1 - .../@types/react-dom/server.node.d.ts | 8 - .../@types/react-dom/static.browser.d.ts | 1 - node_modules/@types/react-dom/static.d.ts | 153 - .../@types/react-dom/static.edge.d.ts | 1 - .../@types/react-dom/static.node.d.ts | 7 - .../@types/react-dom/test-utils/index.d.ts | 7 - node_modules/@types/react/LICENSE | 21 - node_modules/@types/react/README.md | 15 - node_modules/@types/react/canary.d.ts | 120 - .../@types/react/compiler-runtime.d.ts | 4 - node_modules/@types/react/experimental.d.ts | 177 - node_modules/@types/react/global.d.ts | 166 - node_modules/@types/react/index.d.ts | 4362 --- .../@types/react/jsx-dev-runtime.d.ts | 45 - node_modules/@types/react/jsx-runtime.d.ts | 36 - node_modules/@types/react/package.json | 210 - node_modules/@types/react/ts5.0/canary.d.ts | 120 - .../@types/react/ts5.0/experimental.d.ts | 177 - node_modules/@types/react/ts5.0/global.d.ts | 166 - node_modules/@types/react/ts5.0/index.d.ts | 4346 --- .../@types/react/ts5.0/jsx-dev-runtime.d.ts | 44 - .../@types/react/ts5.0/jsx-runtime.d.ts | 35 - node_modules/csstype/LICENSE | 19 - node_modules/csstype/README.md | 291 - node_modules/csstype/index.d.ts | 22569 ---------------- node_modules/csstype/index.js.flow | 6863 ----- node_modules/csstype/package.json | 70 - 39 files changed, 40781 deletions(-) delete mode 100644 node_modules/.package-lock.json delete mode 100644 node_modules/@types/react-dom/LICENSE delete mode 100644 node_modules/@types/react-dom/README.md delete mode 100644 node_modules/@types/react-dom/canary.d.ts delete mode 100644 node_modules/@types/react-dom/client.d.ts delete mode 100644 node_modules/@types/react-dom/experimental.d.ts delete mode 100644 node_modules/@types/react-dom/index.d.ts delete mode 100644 node_modules/@types/react-dom/package.json delete mode 100644 node_modules/@types/react-dom/server.browser.d.ts delete mode 100644 node_modules/@types/react-dom/server.bun.d.ts delete mode 100644 node_modules/@types/react-dom/server.d.ts delete mode 100644 node_modules/@types/react-dom/server.edge.d.ts delete mode 100644 node_modules/@types/react-dom/server.node.d.ts delete mode 100644 node_modules/@types/react-dom/static.browser.d.ts delete mode 100644 node_modules/@types/react-dom/static.d.ts delete mode 100644 node_modules/@types/react-dom/static.edge.d.ts delete mode 100644 node_modules/@types/react-dom/static.node.d.ts delete mode 100644 node_modules/@types/react-dom/test-utils/index.d.ts delete mode 100644 node_modules/@types/react/LICENSE delete mode 100644 node_modules/@types/react/README.md delete mode 100644 node_modules/@types/react/canary.d.ts delete mode 100644 node_modules/@types/react/compiler-runtime.d.ts delete mode 100644 node_modules/@types/react/experimental.d.ts delete mode 100644 node_modules/@types/react/global.d.ts delete mode 100644 node_modules/@types/react/index.d.ts delete mode 100644 node_modules/@types/react/jsx-dev-runtime.d.ts delete mode 100644 node_modules/@types/react/jsx-runtime.d.ts delete mode 100644 node_modules/@types/react/package.json delete mode 100644 node_modules/@types/react/ts5.0/canary.d.ts delete mode 100644 node_modules/@types/react/ts5.0/experimental.d.ts delete mode 100644 node_modules/@types/react/ts5.0/global.d.ts delete mode 100644 node_modules/@types/react/ts5.0/index.d.ts delete mode 100644 node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts delete mode 100644 node_modules/@types/react/ts5.0/jsx-runtime.d.ts delete mode 100644 node_modules/csstype/LICENSE delete mode 100644 node_modules/csstype/README.md delete mode 100644 node_modules/csstype/index.d.ts delete mode 100644 node_modules/csstype/index.js.flow delete mode 100644 node_modules/csstype/package.json diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json deleted file mode 100644 index 876c871e..00000000 --- a/node_modules/.package-lock.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "Spot", - "lockfileVersion": 3, - "requires": true, - "packages": { - "node_modules/@types/react": { - "version": "19.2.10", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.10.tgz", - "integrity": "sha512-WPigyYuGhgZ/cTPRXB2EwUw+XvsRA3GqHlsP4qteqrnnjDrApbS7MxcGr/hke5iUoeB7E/gQtrs9I37zAJ0Vjw==", - "dev": true, - "license": "MIT", - "dependencies": { - "csstype": "^3.2.2" - } - }, - "node_modules/@types/react-dom": { - "version": "19.2.3", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz", - "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@types/react": "^19.2.0" - } - }, - "node_modules/csstype": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", - "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", - "dev": true, - "license": "MIT" - } - } -} diff --git a/node_modules/@types/react-dom/LICENSE b/node_modules/@types/react-dom/LICENSE deleted file mode 100644 index 9e841e7a..00000000 --- a/node_modules/@types/react-dom/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/react-dom/README.md b/node_modules/@types/react-dom/README.md deleted file mode 100644 index 79ab708b..00000000 --- a/node_modules/@types/react-dom/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/react-dom` - -# Summary -This package contains type definitions for react-dom (https://react.dev/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom. - -### Additional Details - * Last updated: Wed, 12 Nov 2025 04:37:38 GMT - * Dependencies: none - * Peer dependencies: [@types/react](https://npmjs.com/package/@types/react) - -# Credits -These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [MartynasZilinskas](https://github.com/MartynasZilinskas), [Josh Rutherford](https://github.com/theruther4d), [Jessica Franco](https://github.com/Jessidhia), and [Sebastian Silbermann](https://github.com/eps1lon). diff --git a/node_modules/@types/react-dom/canary.d.ts b/node_modules/@types/react-dom/canary.d.ts deleted file mode 100644 index 1d65161e..00000000 --- a/node_modules/@types/react-dom/canary.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* eslint-disable @definitelytyped/no-self-import -- self-imports in module augmentations aren't self-imports */ -/* eslint-disable @definitelytyped/no-declare-current-package -- The module augmentations are optional */ -/** - * These are types for things that are present in the upcoming React 18 release. - * - * Once React 18 is released they can just be moved to the main index file. - * - * To load the types declared here in an actual project, there are three ways. The easiest one, - * if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section, - * is to add `"react-dom/canary"` to the `"types"` array. - * - * Alternatively, a specific import syntax can to be used from a typescript file. - * This module does not exist in reality, which is why the {} is important: - * - * ```ts - * import {} from 'react-dom/canary' - * ``` - * - * It is also possible to include it through a triple-slash reference: - * - * ```ts - * /// - * ``` - * - * Either the import or the reference only needs to appear once, anywhere in the project. - */ - -// See https://github.com/facebook/react/blob/main/packages/react-dom/index.js to see how the exports are declared, -// but confirm with published source code (e.g. https://unpkg.com/react-dom@canary) that these exports end up in the published code - -import React = require("react"); -import ReactDOM = require("."); - -export {}; - -declare module "react" { - // @enableViewTransition - interface ViewTransitionPseudoElement extends Animatable { - getComputedStyle: () => CSSStyleDeclaration; - } - - interface ViewTransitionInstance { - group: ViewTransitionPseudoElement; - imagePair: ViewTransitionPseudoElement; - old: ViewTransitionPseudoElement; - new: ViewTransitionPseudoElement; - } - - // @enableFragmentRefs - interface FragmentInstance { - blur: () => void; - focus: (focusOptions?: FocusOptions | undefined) => void; - focusLast: (focusOptions?: FocusOptions | undefined) => void; - observeUsing(observer: IntersectionObserver | ResizeObserver): void; - unobserveUsing(observer: IntersectionObserver | ResizeObserver): void; - getClientRects(): Array; - getRootNode(getRootNodeOptions?: GetRootNodeOptions | undefined): Document | ShadowRoot | FragmentInstance; - addEventListener( - type: string, - listener: EventListener, - optionsOrUseCapture?: Parameters[2], - ): void; - removeEventListener( - type: string, - listener: EventListener, - optionsOrUseCapture?: Parameters[2], - ): void; - dispatchEvent(event: Event): boolean; - scrollIntoView(alignToTop?: boolean): void; - } -} diff --git a/node_modules/@types/react-dom/client.d.ts b/node_modules/@types/react-dom/client.d.ts deleted file mode 100644 index 2c7affa7..00000000 --- a/node_modules/@types/react-dom/client.d.ts +++ /dev/null @@ -1,105 +0,0 @@ -/** - * WARNING: This entrypoint is only available starting with `react-dom@18.0.0-rc.1` - */ - -// See https://github.com/facebook/react/blob/main/packages/react-dom/client.js to see how the exports are declared, - -import React = require("react"); - -export {}; - -declare const REACT_FORM_STATE_SIGIL: unique symbol; -export interface ReactFormState { - [REACT_FORM_STATE_SIGIL]: never; -} - -export interface HydrationOptions { - formState?: ReactFormState | null; - /** - * Prefix for `useId`. - */ - identifierPrefix?: string; - onUncaughtError?: - | ((error: unknown, errorInfo: { componentStack?: string | undefined }) => void) - | undefined; - onRecoverableError?: (error: unknown, errorInfo: ErrorInfo) => void; - onCaughtError?: - | (( - error: unknown, - errorInfo: { - componentStack?: string | undefined; - errorBoundary?: React.Component | undefined; - }, - ) => void) - | undefined; -} - -export interface RootOptions { - /** - * Prefix for `useId`. - */ - identifierPrefix?: string; - onUncaughtError?: - | ((error: unknown, errorInfo: { componentStack?: string | undefined }) => void) - | undefined; - onRecoverableError?: (error: unknown, errorInfo: ErrorInfo) => void; - onCaughtError?: - | (( - error: unknown, - errorInfo: { - componentStack?: string | undefined; - errorBoundary?: React.Component | undefined; - }, - ) => void) - | undefined; -} - -export interface ErrorInfo { - componentStack?: string; -} - -export interface Root { - render(children: React.ReactNode): void; - unmount(): void; -} - -/** - * Different release channels declare additional types of ReactNode this particular release channel accepts. - * App or library types should never augment this interface. - */ -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_CREATE_ROOT_CONTAINERS {} - -export type Container = - | Element - | DocumentFragment - | Document - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_CREATE_ROOT_CONTAINERS[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_CREATE_ROOT_CONTAINERS - ]; - -/** - * createRoot lets you create a root to display React components inside a browser DOM node. - * - * @see {@link https://react.dev/reference/react-dom/client/createRoot API Reference for `createRoot`} - */ -export function createRoot(container: Container, options?: RootOptions): Root; - -/** - * Same as `createRoot()`, but is used to hydrate a container whose HTML contents were rendered by ReactDOMServer. - * - * React will attempt to attach event listeners to the existing markup. - * - * **Example Usage** - * - * ```jsx - * hydrateRoot(document.querySelector('#root'), ) - * ``` - * - * @see https://react.dev/reference/react-dom/client/hydrateRoot - */ -export function hydrateRoot( - container: Element | Document, - initialChildren: React.ReactNode, - options?: HydrationOptions, -): Root; diff --git a/node_modules/@types/react-dom/experimental.d.ts b/node_modules/@types/react-dom/experimental.d.ts deleted file mode 100644 index 01999d35..00000000 --- a/node_modules/@types/react-dom/experimental.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * These are types for things that are present in the `experimental` builds of React but not yet - * on a stable build. - * - * Once they are promoted to stable they can just be moved to the main index file. - * - * To load the types declared here in an actual project, there are three ways. The easiest one, - * if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section, - * is to add `"react-dom/experimental"` to the `"types"` array. - * - * Alternatively, a specific import syntax can to be used from a typescript file. - * This module does not exist in reality, which is why the {} is important: - * - * ```ts - * import {} from 'react-dom/experimental' - * ``` - * - * It is also possible to include it through a triple-slash reference: - * - * ```ts - * /// - * ``` - * - * Either the import or the reference only needs to appear once, anywhere in the project. - */ - -// See https://github.com/facebook/react/blob/main/packages/react-dom/index.experimental.js to see how the exports are declared, -// but confirm with published source code (e.g. https://unpkg.com/react-dom@experimental) that these exports end up in the published code - -import React = require("react"); -import ReactDOM = require("./canary"); - -export {}; - -declare const UNDEFINED_VOID_ONLY: unique symbol; -type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never }; - -declare module "." { -} - -declare module "react" { - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface GestureProvider extends AnimationTimeline {} -} - -declare module "./client" { - type TransitionIndicatorCleanup = () => VoidOrUndefinedOnly; - interface RootOptions { - onDefaultTransitionIndicator?: (() => void | TransitionIndicatorCleanup) | undefined; - } - interface HydrationOptions { - onDefaultTransitionIndicator?: (() => void | TransitionIndicatorCleanup) | undefined; - } -} diff --git a/node_modules/@types/react-dom/index.d.ts b/node_modules/@types/react-dom/index.d.ts deleted file mode 100644 index efb52b27..00000000 --- a/node_modules/@types/react-dom/index.d.ts +++ /dev/null @@ -1,133 +0,0 @@ -// NOTE: Users of the `experimental` builds of React should add a reference -// to 'react-dom/experimental' in their project. See experimental.d.ts's top comment -// for reference and documentation on how exactly to do it. - -export as namespace ReactDOM; - -import { Key, ReactNode, ReactPortal } from "react"; - -declare module "react" { - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface CacheSignal extends AbortSignal {} -} - -export function createPortal( - children: ReactNode, - container: Element | DocumentFragment, - key?: Key | null, -): ReactPortal; - -export const version: string; - -export function flushSync(fn: () => R): R; - -export function unstable_batchedUpdates(callback: (a: A) => R, a: A): R; -export function unstable_batchedUpdates(callback: () => R): R; - -export interface FormStatusNotPending { - pending: false; - data: null; - method: null; - action: null; -} - -export interface FormStatusPending { - pending: true; - data: FormData; - method: string; - action: string | ((formData: FormData) => void | Promise); -} - -export type FormStatus = FormStatusPending | FormStatusNotPending; - -export function useFormStatus(): FormStatus; - -export function useFormState( - action: (state: Awaited) => State | Promise, - initialState: Awaited, - permalink?: string, -): [state: Awaited, dispatch: () => void, isPending: boolean]; -export function useFormState( - action: (state: Awaited, payload: Payload) => State | Promise, - initialState: Awaited, - permalink?: string, -): [state: Awaited, dispatch: (payload: Payload) => void, isPending: boolean]; - -export function prefetchDNS(href: string): void; - -export interface PreconnectOptions { - // Don't create a helper type. - // It would have to be in module scope to be inlined in TS tooltips. - // But then it becomes part of the public API. - // TODO: Upstream to microsoft/TypeScript-DOM-lib-generator -> w3c/webref - // since the spec has a notion of a dedicated type: https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attribute - crossOrigin?: "anonymous" | "use-credentials" | "" | undefined; -} -export function preconnect(href: string, options?: PreconnectOptions): void; - -export type PreloadAs = - | "audio" - | "document" - | "embed" - | "fetch" - | "font" - | "image" - | "object" - | "track" - | "script" - | "style" - | "video" - | "worker"; -export interface PreloadOptions { - as: PreloadAs; - crossOrigin?: "anonymous" | "use-credentials" | "" | undefined; - fetchPriority?: "high" | "low" | "auto" | undefined; - // TODO: These should only be allowed with `as: 'image'` but it's not trivial to write tests against the full TS support matrix. - imageSizes?: string | undefined; - imageSrcSet?: string | undefined; - integrity?: string | undefined; - type?: string | undefined; - nonce?: string | undefined; - referrerPolicy?: ReferrerPolicy | undefined; - media?: string | undefined; -} -export function preload(href: string, options?: PreloadOptions): void; - -// https://html.spec.whatwg.org/multipage/links.html#link-type-modulepreload -export type PreloadModuleAs = RequestDestination; -export interface PreloadModuleOptions { - /** - * @default "script" - */ - as: PreloadModuleAs; - crossOrigin?: "anonymous" | "use-credentials" | "" | undefined; - integrity?: string | undefined; - nonce?: string | undefined; -} -export function preloadModule(href: string, options?: PreloadModuleOptions): void; - -export type PreinitAs = "script" | "style"; -export interface PreinitOptions { - as: PreinitAs; - crossOrigin?: "anonymous" | "use-credentials" | "" | undefined; - fetchPriority?: "high" | "low" | "auto" | undefined; - precedence?: string | undefined; - integrity?: string | undefined; - nonce?: string | undefined; -} -export function preinit(href: string, options?: PreinitOptions): void; - -// Will be expanded to include all of https://github.com/tc39/proposal-import-attributes -export type PreinitModuleAs = "script"; -export interface PreinitModuleOptions { - /** - * @default "script" - */ - as?: PreinitModuleAs; - crossOrigin?: "anonymous" | "use-credentials" | "" | undefined; - integrity?: string | undefined; - nonce?: string | undefined; -} -export function preinitModule(href: string, options?: PreinitModuleOptions): void; - -export function requestFormReset(form: HTMLFormElement): void; diff --git a/node_modules/@types/react-dom/package.json b/node_modules/@types/react-dom/package.json deleted file mode 100644 index 62ca60ff..00000000 --- a/node_modules/@types/react-dom/package.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "name": "@types/react-dom", - "version": "19.2.3", - "description": "TypeScript definitions for react-dom", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom", - "license": "MIT", - "contributors": [ - { - "name": "Asana", - "url": "https://asana.com" - }, - { - "name": "AssureSign", - "url": "http://www.assuresign.com" - }, - { - "name": "Microsoft", - "url": "https://microsoft.com" - }, - { - "name": "MartynasZilinskas", - "githubUsername": "MartynasZilinskas", - "url": "https://github.com/MartynasZilinskas" - }, - { - "name": "Josh Rutherford", - "githubUsername": "theruther4d", - "url": "https://github.com/theruther4d" - }, - { - "name": "Jessica Franco", - "githubUsername": "Jessidhia", - "url": "https://github.com/Jessidhia" - }, - { - "name": "Sebastian Silbermann", - "githubUsername": "eps1lon", - "url": "https://github.com/eps1lon" - } - ], - "main": "", - "types": "index.d.ts", - "exports": { - ".": { - "types": { - "default": "./index.d.ts" - } - }, - "./client": { - "types": { - "default": "./client.d.ts" - } - }, - "./canary": { - "types": { - "default": "./canary.d.ts" - } - }, - "./server": { - "types": { - "default": "./server.d.ts" - } - }, - "./server.browser": { - "types": { - "default": "./server.browser.d.ts" - } - }, - "./server.bun": { - "types": { - "default": "./server.bun.d.ts" - } - }, - "./server.edge": { - "types": { - "default": "./server.edge.d.ts" - } - }, - "./server.node": { - "types": { - "default": "./server.node.d.ts" - } - }, - "./static": { - "types": { - "default": "./static.d.ts" - } - }, - "./static.browser": { - "types": { - "default": "./static.browser.d.ts" - } - }, - "./static.edge": { - "types": { - "default": "./static.edge.d.ts" - } - }, - "./static.node": { - "types": { - "default": "./static.node.d.ts" - } - }, - "./experimental": { - "types": { - "default": "./experimental.d.ts" - } - }, - "./test-utils": { - "types": { - "default": "./test-utils/index.d.ts" - } - }, - "./package.json": "./package.json" - }, - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/react-dom" - }, - "scripts": {}, - "dependencies": {}, - "peerDependencies": { - "@types/react": "^19.2.0" - }, - "typesPublisherContentHash": "6f16aac4f50b7ebe3201fdac53a58874d2899d6108894538ade2d61fbb99f8c5", - "typeScriptVersion": "5.2" -} \ No newline at end of file diff --git a/node_modules/@types/react-dom/server.browser.d.ts b/node_modules/@types/react-dom/server.browser.d.ts deleted file mode 100644 index f2e3bc93..00000000 --- a/node_modules/@types/react-dom/server.browser.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { renderToReadableStream, renderToStaticMarkup, renderToString } from "./server"; diff --git a/node_modules/@types/react-dom/server.bun.d.ts b/node_modules/@types/react-dom/server.bun.d.ts deleted file mode 100644 index f2e3bc93..00000000 --- a/node_modules/@types/react-dom/server.bun.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { renderToReadableStream, renderToStaticMarkup, renderToString } from "./server"; diff --git a/node_modules/@types/react-dom/server.d.ts b/node_modules/@types/react-dom/server.d.ts deleted file mode 100644 index 84312f9d..00000000 --- a/node_modules/@types/react-dom/server.d.ts +++ /dev/null @@ -1,183 +0,0 @@ -// forward declarations -declare global { - namespace NodeJS { - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface ReadableStream {} - - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface WritableStream {} - } - - /** - * Stub for https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal - */ - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface AbortSignal {} - - /** - * Stub for https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream - */ - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface ReadableStream {} -} - -import { ReactNode } from "react"; -import { ErrorInfo, ReactFormState } from "./client"; -import { PostponedState, ResumeOptions } from "./static"; - -export interface BootstrapScriptDescriptor { - src: string; - integrity?: string | undefined; - crossOrigin?: string | undefined; -} - -/** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap Import maps} - */ -// TODO: Ideally TypeScripts standard library would include this type. -// Until then we keep the prefixed one for future compatibility. -export interface ReactImportMap { - /** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#imports `imports` reference} - */ - imports?: { - [specifier: string]: string; - } | undefined; - /** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#integrity `integrity` reference} - */ - integrity?: { - [moduleURL: string]: string; - } | undefined; - /** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#scopes `scopes` reference} - */ - scopes?: { - [scope: string]: { - [specifier: string]: string; - }; - } | undefined; -} - -export interface RenderToPipeableStreamOptions { - identifierPrefix?: string; - namespaceURI?: string; - nonce?: string; - bootstrapScriptContent?: string; - bootstrapScripts?: Array; - bootstrapModules?: Array; - /** - * Maximum length of the header content in unicode code units i.e. string.length. - * Must be a positive integer if specified. - * @default 2000 - */ - headersLengthHint?: number | undefined; - importMap?: ReactImportMap | undefined; - progressiveChunkSize?: number; - onHeaders?: ((headers: Headers) => void) | undefined; - onShellReady?: () => void; - onShellError?: (error: unknown) => void; - onAllReady?: () => void; - onError?: (error: unknown, errorInfo: ErrorInfo) => string | void; - formState?: ReactFormState | null; -} - -export interface PipeableStream { - abort: (reason?: unknown) => void; - pipe: (destination: Writable) => Writable; -} - -export interface ServerOptions { - identifierPrefix?: string; -} - -/** - * Only available in the environments with [Node.js Streams](https://nodejs.dev/learn/nodejs-streams). - * - * @see [API](https://react.dev/reference/react-dom/server/renderToPipeableStream) - * - * @param children - * @param options - */ -export function renderToPipeableStream(children: ReactNode, options?: RenderToPipeableStreamOptions): PipeableStream; - -/** - * Render a React element to its initial HTML. This should only be used on the server. - * React will return an HTML string. You can use this method to generate HTML on the server - * and send the markup down on the initial request for faster page loads and to allow search - * engines to crawl your pages for SEO purposes. - * - * If you call `ReactDOMClient.hydrateRoot()` on a node that already has this server-rendered markup, - * React will preserve it and only attach event handlers, allowing you - * to have a very performant first-load experience. - */ -export function renderToString(element: ReactNode, options?: ServerOptions): string; - -/** - * Similar to `renderToString`, except this doesn't create extra DOM attributes - * such as `data-reactid`, that React uses internally. This is useful if you want - * to use React as a simple static page generator, as stripping away the extra - * attributes can save lots of bytes. - */ -export function renderToStaticMarkup(element: ReactNode, options?: ServerOptions): string; - -export interface RenderToReadableStreamOptions { - identifierPrefix?: string; - importMap?: ReactImportMap | undefined; - namespaceURI?: string; - nonce?: string; - bootstrapScriptContent?: string; - bootstrapScripts?: Array; - bootstrapModules?: Array; - /** - * Maximum length of the header content in unicode code units i.e. string.length. - * Must be a positive integer if specified. - * @default 2000 - */ - headersLengthHint?: number | undefined; - progressiveChunkSize?: number; - signal?: AbortSignal; - onError?: (error: unknown, errorInfo: ErrorInfo) => string | void; - onHeaders?: ((headers: Headers) => void) | undefined; - formState?: ReactFormState | null; -} - -export interface ReactDOMServerReadableStream extends ReadableStream { - allReady: Promise; -} - -/** - * Only available in the environments with [Web Streams](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API) (this includes browsers, Deno, and some modern edge runtimes). - * - * @see [API](https://react.dev/reference/react-dom/server/renderToReadableStream) - */ -export function renderToReadableStream( - children: ReactNode, - options?: RenderToReadableStreamOptions, -): Promise; - -export { ResumeOptions }; - -/** - * @see {@link https://react.dev/reference/react-dom/server/resume `resume`` reference documentation} - * @version 19.2 - */ -export function resume( - children: React.ReactNode, - postponedState: PostponedState, - options?: ResumeOptions, -): Promise; - -/** - * @see {@link https://react.dev/reference/react-dom/server/resumeToPipeableStream `resumeToPipeableStream`` reference documentation} - * @version 19.2 - */ -export function resumeToPipeableStream( - children: React.ReactNode, - postponedState: PostponedState, - options?: ResumeOptions, -): Promise; - -export const version: string; - -export as namespace ReactDOMServer; diff --git a/node_modules/@types/react-dom/server.edge.d.ts b/node_modules/@types/react-dom/server.edge.d.ts deleted file mode 100644 index f21d7d2b..00000000 --- a/node_modules/@types/react-dom/server.edge.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { renderToReadableStream, renderToStaticMarkup, renderToString, resume } from "./server"; diff --git a/node_modules/@types/react-dom/server.node.d.ts b/node_modules/@types/react-dom/server.node.d.ts deleted file mode 100644 index eb777a99..00000000 --- a/node_modules/@types/react-dom/server.node.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export { - renderToPipeableStream, - renderToReadableStream, - renderToStaticMarkup, - renderToString, - resume, - resumeToPipeableStream, -} from "./server"; diff --git a/node_modules/@types/react-dom/static.browser.d.ts b/node_modules/@types/react-dom/static.browser.d.ts deleted file mode 100644 index cd2d05ff..00000000 --- a/node_modules/@types/react-dom/static.browser.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { prerender, version } from "./static"; diff --git a/node_modules/@types/react-dom/static.d.ts b/node_modules/@types/react-dom/static.d.ts deleted file mode 100644 index c86d5c10..00000000 --- a/node_modules/@types/react-dom/static.d.ts +++ /dev/null @@ -1,153 +0,0 @@ -// forward declarations -declare global { - namespace NodeJS { - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface ReadableStream {} - } - - /** - * Stub for https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal - */ - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface AbortSignal {} - - /** - * Stub for https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream - */ - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface ReadableStream {} - - /** - * Stub for https://developer.mozilla.org/en-US/docs/Web/API/Uint8Array - */ - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface Uint8Array {} -} - -import { ReactNode } from "react"; -import { ErrorInfo } from "./client"; -export {}; - -declare const POSTPONED_STATE_SIGIL: unique symbol; - -/** - * This is an opaque type i.e. users should not make any assumptions about its structure. - * It is JSON-serializeable to be a able to store it and retrvieve later for use with {@link https://react.dev/reference/react-dom/server/resume `resume`}. - */ -export interface PostponedState { - [POSTPONED_STATE_SIGIL]: never; -} - -/** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap Import maps} - */ -// TODO: Ideally TypeScripts standard library would include this type. -// Until then we keep the prefixed one for future compatibility. -export interface ReactImportMap { - /** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#imports `imports` reference} - */ - imports?: { - [specifier: string]: string; - } | undefined; - /** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#integrity `integrity` reference} - */ - integrity?: { - [moduleURL: string]: string; - } | undefined; - /** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#scopes `scopes` reference} - */ - scopes?: { - [scope: string]: { - [specifier: string]: string; - }; - } | undefined; -} - -export interface BootstrapScriptDescriptor { - src: string; - integrity?: string | undefined; - crossOrigin?: string | undefined; -} - -export interface PrerenderOptions { - bootstrapScriptContent?: string; - bootstrapScripts?: Array; - bootstrapModules?: Array; - /** - * Maximum length of the header content in unicode code units i.e. string.length. - * Must be a positive integer if specified. - * @default 2000 - */ - headersLengthHint?: number | undefined; - identifierPrefix?: string; - importMap?: ReactImportMap | undefined; - namespaceURI?: string; - onError?: (error: unknown, errorInfo: ErrorInfo) => string | void; - onHeaders?: (headers: Headers) => void | undefined; - progressiveChunkSize?: number; - signal?: AbortSignal; -} - -export interface PrerenderResult { - postponed: null | PostponedState; - prelude: ReadableStream; -} - -/** - * Only available in the environments with [Web Streams](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API) (this includes browsers, Deno, and some modern edge runtimes). - * - * @see [API](https://react.dev/reference/react-dom/static/prerender) - */ -export function prerender( - reactNode: ReactNode, - options?: PrerenderOptions, -): Promise; - -export interface PrerenderToNodeStreamResult { - prelude: NodeJS.ReadableStream; - postponed: null | PostponedState; -} - -/** - * Only available in the environments with [Node.js Streams](https://nodejs.dev/learn/nodejs-streams). - * - * @see [API](https://react.dev/reference/react-dom/static/prerenderToNodeStream) - * - * @param children - * @param options - */ -export function prerenderToNodeStream( - reactNode: ReactNode, - options?: PrerenderOptions, -): Promise; - -export interface ResumeOptions { - nonce?: string; - signal?: AbortSignal; - onError?: (error: unknown) => string | undefined | void; -} - -/** - * @see {@link https://react.dev/reference/react-dom/static/resumeAndPrerender `resumeAndPrerender` reference documentation} - * @version 19.2 - */ -export function resumeAndPrerender( - children: React.ReactNode, - postponedState: null | PostponedState, - options?: Omit, -): Promise; - -/** - * @see {@link https://react.dev/reference/react-dom/static/resumeAndPrerenderToNodeStream `resumeAndPrerenderToNodeStream`` reference documentation} - * @version 19.2 - */ -export function resumeAndPrerenderToNodeStream( - children: React.ReactNode, - postponedState: null | PostponedState, - options?: Omit, -): Promise; - -export const version: string; diff --git a/node_modules/@types/react-dom/static.edge.d.ts b/node_modules/@types/react-dom/static.edge.d.ts deleted file mode 100644 index 94c53937..00000000 --- a/node_modules/@types/react-dom/static.edge.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { prerender, resumeAndPrerender, version } from "./static"; diff --git a/node_modules/@types/react-dom/static.node.d.ts b/node_modules/@types/react-dom/static.node.d.ts deleted file mode 100644 index 59dd5ddd..00000000 --- a/node_modules/@types/react-dom/static.node.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { - prerender, - prerenderToNodeStream, - resumeAndPrerender, - resumeAndPrerenderToNodeStream, - version, -} from "./static"; diff --git a/node_modules/@types/react-dom/test-utils/index.d.ts b/node_modules/@types/react-dom/test-utils/index.d.ts deleted file mode 100644 index 7e211ea0..00000000 --- a/node_modules/@types/react-dom/test-utils/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export {}; - -export { - /** - * @deprecated Import `act` from `react` instead. - */ act, -} from "react"; diff --git a/node_modules/@types/react/LICENSE b/node_modules/@types/react/LICENSE deleted file mode 100644 index 9e841e7a..00000000 --- a/node_modules/@types/react/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/react/README.md b/node_modules/@types/react/README.md deleted file mode 100644 index 5cbc0c29..00000000 --- a/node_modules/@types/react/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/react` - -# Summary -This package contains type definitions for react (https://react.dev/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react. - -### Additional Details - * Last updated: Tue, 27 Jan 2026 12:02:23 GMT - * Dependencies: [csstype](https://npmjs.com/package/csstype) - -# Credits -These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [John Reilly](https://github.com/johnnyreilly), [Benoit Benezech](https://github.com/bbenezech), [Patricio Zavolinsky](https://github.com/pzavolinsky), [Eric Anderson](https://github.com/ericanderson), [Dovydas Navickas](https://github.com/DovydasNavickas), [Josh Rutherford](https://github.com/theruther4d), [Guilherme Hübner](https://github.com/guilhermehubner), [Ferdy Budhidharma](https://github.com/ferdaber), [Johann Rakotoharisoa](https://github.com/jrakotoharisoa), [Olivier Pascal](https://github.com/pascaloliv), [Martin Hochel](https://github.com/hotell), [Frank Li](https://github.com/franklixuefei), [Jessica Franco](https://github.com/Jessidhia), [Saransh Kataria](https://github.com/saranshkataria), [Kanitkorn Sujautra](https://github.com/lukyth), [Sebastian Silbermann](https://github.com/eps1lon), [Kyle Scully](https://github.com/zieka), [Cong Zhang](https://github.com/dancerphil), [Dimitri Mitropoulos](https://github.com/dimitropoulos), [JongChan Choi](https://github.com/disjukr), [Victor Magalhães](https://github.com/vhfmag), [Priyanshu Rav](https://github.com/priyanshurav), [Dmitry Semigradsky](https://github.com/Semigradsky), and [Matt Pocock](https://github.com/mattpocock). diff --git a/node_modules/@types/react/canary.d.ts b/node_modules/@types/react/canary.d.ts deleted file mode 100644 index b1cac75e..00000000 --- a/node_modules/@types/react/canary.d.ts +++ /dev/null @@ -1,120 +0,0 @@ -/** - * These are types for things that are present in the React `canary` release channel. - * - * To load the types declared here in an actual project, there are three ways. The easiest one, - * if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section, - * is to add `"react/canary"` to the `"types"` array. - * - * Alternatively, a specific import syntax can to be used from a typescript file. - * This module does not exist in reality, which is why the {} is important: - * - * ```ts - * import {} from 'react/canary' - * ``` - * - * It is also possible to include it through a triple-slash reference: - * - * ```ts - * /// - * ``` - * - * Either the import or the reference only needs to appear once, anywhere in the project. - */ - -// See https://github.com/facebook/react/blob/main/packages/react/src/React.js to see how the exports are declared, - -import React = require("."); - -export {}; - -declare const UNDEFINED_VOID_ONLY: unique symbol; -type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never }; - -declare module "." { - export function unstable_useCacheRefresh(): () => void; - - // @enableViewTransition - export interface ViewTransitionInstance { - /** - * The {@link ViewTransitionProps name} that was used in the corresponding {@link ViewTransition} component or `"auto"` if the `name` prop was omitted. - */ - name: string; - } - - export type ViewTransitionClassPerType = Record<"default" | (string & {}), "none" | "auto" | (string & {})>; - export type ViewTransitionClass = ViewTransitionClassPerType | ViewTransitionClassPerType[string]; - - export interface ViewTransitionProps { - children?: ReactNode | undefined; - /** - * Assigns the {@link https://developer.chrome.com/blog/view-transitions-update-io24#view-transition-class `view-transition-class`} class to the underlying DOM node. - */ - default?: ViewTransitionClass | undefined; - /** - * Combined with {@link className} if this `` or its parent Component is mounted and there's no other with the same name being deleted. - * `"none"` is a special value that deactivates the view transition name under that condition. - */ - enter?: ViewTransitionClass | undefined; - /** - * Combined with {@link className} if this `` or its parent Component is unmounted and there's no other with the same name being deleted. - * `"none"` is a special value that deactivates the view transition name under that condition. - */ - exit?: ViewTransitionClass | undefined; - /** - * "auto" will automatically assign a view-transition-name to the inner DOM node. - * That way you can add a View Transition to a Component without controlling its DOM nodes styling otherwise. - * - * A difference between this and the browser's built-in view-transition-name: auto is that switching the DOM nodes within the `` component preserves the same name so this example cross-fades between the DOM nodes instead of causing an exit and enter. - * @default "auto" - */ - name?: "auto" | (string & {}) | undefined; - /** - * The `` or its parent Component is mounted and there's no other `` with the same name being deleted. - */ - onEnter?: (instance: ViewTransitionInstance, types: Array) => void | (() => void); - /** - * The `` or its parent Component is unmounted and there's no other `` with the same name being deleted. - */ - onExit?: (instance: ViewTransitionInstance, types: Array) => void | (() => void); - /** - * This `` is being mounted and another `` instance with the same name is being unmounted elsewhere. - */ - onShare?: (instance: ViewTransitionInstance, types: Array) => void | (() => void); - /** - * The content of `` has changed either due to DOM mutations or because an inner child `` has resized. - */ - onUpdate?: (instance: ViewTransitionInstance, types: Array) => void | (() => void); - ref?: Ref | undefined; - /** - * Combined with {@link className} if this `` is being mounted and another instance with the same name is being unmounted elsewhere. - * `"none"` is a special value that deactivates the view transition name under that condition. - */ - share?: ViewTransitionClass | undefined; - /** - * Combined with {@link className} if the content of this `` has changed either due to DOM mutations or because an inner child has resized. - * `"none"` is a special value that deactivates the view transition name under that condition. - */ - update?: ViewTransitionClass | undefined; - } - - /** - * Opt-in for using {@link https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API View Transitions} in React. - * View Transitions only trigger for async updates like {@link startTransition}, {@link useDeferredValue}, Actions or <{@link Suspense}> revealing from fallback to content. - * Synchronous updates provide an opt-out but also guarantee that they commit immediately which View Transitions can't. - * - * @see {@link https://react.dev/reference/react/ViewTransition `` reference documentation} - */ - export const ViewTransition: ExoticComponent; - - /** - * @see {@link https://react.dev/reference/react/addTransitionType `addTransitionType` reference documentation} - */ - export function addTransitionType(type: string): void; - - // @enableFragmentRefs - export interface FragmentInstance {} - - export interface FragmentProps { - ref?: Ref | undefined; - } -} diff --git a/node_modules/@types/react/compiler-runtime.d.ts b/node_modules/@types/react/compiler-runtime.d.ts deleted file mode 100644 index a98a26e6..00000000 --- a/node_modules/@types/react/compiler-runtime.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// Not meant to be used directly -// Omitting all exports so that they don't appear in IDE autocomplete. - -export {}; diff --git a/node_modules/@types/react/experimental.d.ts b/node_modules/@types/react/experimental.d.ts deleted file mode 100644 index 49ff8620..00000000 --- a/node_modules/@types/react/experimental.d.ts +++ /dev/null @@ -1,177 +0,0 @@ -/** - * These are types for things that are present in the `experimental` builds of React but not yet - * on a stable build. - * - * Once they are promoted to stable they can just be moved to the main index file. - * - * To load the types declared here in an actual project, there are three ways. The easiest one, - * if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section, - * is to add `"react/experimental"` to the `"types"` array. - * - * Alternatively, a specific import syntax can to be used from a typescript file. - * This module does not exist in reality, which is why the {} is important: - * - * ```ts - * import {} from 'react/experimental' - * ``` - * - * It is also possible to include it through a triple-slash reference: - * - * ```ts - * /// - * ``` - * - * Either the import or the reference only needs to appear once, anywhere in the project. - */ - -// See https://github.com/facebook/react/blob/master/packages/react/src/React.js to see how the exports are declared, -// and https://github.com/facebook/react/blob/master/packages/shared/ReactFeatureFlags.js to verify which APIs are -// flagged experimental or not. Experimental APIs will be tagged with `__EXPERIMENTAL__`. -// -// For the inputs of types exported as simply a fiber tag, the `beginWork` function of ReactFiberBeginWork.js -// is a good place to start looking for details; it generally calls prop validation functions or delegates -// all tasks done as part of the render phase (the concurrent part of the React update cycle). -// -// Suspense-related handling can be found in ReactFiberThrow.js. - -import React = require("./canary"); - -export {}; - -declare const UNDEFINED_VOID_ONLY: unique symbol; -type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never }; - -declare module "." { - export interface SuspenseProps { - // @enableCPUSuspense - /** - * The presence of this prop indicates that the content is computationally expensive to render. - * In other words, the tree is CPU bound and not I/O bound (e.g. due to fetching data). - * @see {@link https://github.com/facebook/react/pull/19936} - */ - defer?: boolean | undefined; - } - - export type SuspenseListRevealOrder = "forwards" | "backwards" | "together" | "independent"; - export type SuspenseListTailMode = "collapsed" | "hidden" | "visible"; - - export interface SuspenseListCommonProps { - } - - interface DirectionalSuspenseListProps extends SuspenseListCommonProps { - /** - * Note that SuspenseList require more than one child; - * it is a runtime warning to provide only a single child. - * - * It does, however, allow those children to be wrapped inside a single - * level of ``. - */ - children: Iterable | AsyncIterable; - /** - * Defines the order in which the `SuspenseList` children should be revealed. - * @default "forwards" - */ - revealOrder?: "forwards" | "backwards" | "unstable_legacy-backwards" | undefined; - /** - * Dictates how unloaded items in a SuspenseList is shown. - * - * - `collapsed` shows only the next fallback in the list. - * - `hidden` doesn't show any unloaded items. - * - `visible` shows all fallbacks in the list. - * - * @default "hidden" - */ - tail?: SuspenseListTailMode | undefined; - } - - interface NonDirectionalSuspenseListProps extends SuspenseListCommonProps { - children: ReactNode; - /** - * Defines the order in which the `SuspenseList` children should be revealed. - */ - revealOrder: Exclude; - /** - * The tail property is invalid when not using the `forwards` or `backwards` reveal orders. - */ - tail?: never; - } - - export type SuspenseListProps = DirectionalSuspenseListProps | NonDirectionalSuspenseListProps; - - /** - * `SuspenseList` helps coordinate many components that can suspend by orchestrating the order - * in which these components are revealed to the user. - * - * When multiple components need to fetch data, this data may arrive in an unpredictable order. - * However, if you wrap these items in a `SuspenseList`, React will not show an item in the list - * until previous items have been displayed (this behavior is adjustable). - * - * @see https://reactjs.org/docs/concurrent-mode-reference.html#suspenselist - * @see https://reactjs.org/docs/concurrent-mode-patterns.html#suspenselist - */ - export const unstable_SuspenseList: ExoticComponent; - - type Reference = object; - type TaintableUniqueValue = string | bigint | ArrayBufferView; - function experimental_taintUniqueValue( - message: string | undefined, - lifetime: Reference, - value: TaintableUniqueValue, - ): void; - function experimental_taintObjectReference(message: string | undefined, object: Reference): void; - - // @enableGestureTransition - // Implemented by the specific renderer e.g. `react-dom`. - // Keep in mind that augmented interfaces merge their JSDoc so if you put - // JSDoc here and in the renderer, the IDE will display both. - export interface GestureProvider {} - export interface GestureOptions { - rangeStart?: number | undefined; - rangeEnd?: number | undefined; - } - export type GestureOptionsRequired = { - [P in keyof GestureOptions]-?: NonNullable; - }; - /** */ - export function unstable_startGestureTransition( - provider: GestureProvider, - scope: () => void, - options?: GestureOptions, - ): () => void; - - interface ViewTransitionProps { - onGestureEnter?: ( - timeline: GestureProvider, - options: GestureOptionsRequired, - instance: ViewTransitionInstance, - types: Array, - ) => void | (() => void); - onGestureExit?: ( - timeline: GestureProvider, - options: GestureOptionsRequired, - instance: ViewTransitionInstance, - types: Array, - ) => void | (() => void); - onGestureShare?: ( - timeline: GestureProvider, - options: GestureOptionsRequired, - instance: ViewTransitionInstance, - types: Array, - ) => void | (() => void); - onGestureUpdate?: ( - timeline: GestureProvider, - options: GestureOptionsRequired, - instance: ViewTransitionInstance, - types: Array, - ) => void | (() => void); - } - - // @enableSrcObject - interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES { - srcObject: Blob; - } - - interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES { - srcObject: Blob | MediaSource | MediaStream; - } -} diff --git a/node_modules/@types/react/global.d.ts b/node_modules/@types/react/global.d.ts deleted file mode 100644 index 61862a3d..00000000 --- a/node_modules/@types/react/global.d.ts +++ /dev/null @@ -1,166 +0,0 @@ -/* -React projects that don't include the DOM library need these interfaces to compile. -React Native applications use React, but there is no DOM available. The JavaScript runtime -is ES6/ES2015 only. These definitions allow such projects to compile with only `--lib ES6`. - -Warning: all of these interfaces are empty. If you want type definitions for various properties -(such as HTMLInputElement.prototype.value), you need to add `--lib DOM` (via command line or tsconfig.json). -*/ - -interface Event {} -interface AnimationEvent extends Event {} -interface ClipboardEvent extends Event {} -interface CompositionEvent extends Event {} -interface DragEvent extends Event {} -interface FocusEvent extends Event {} -interface InputEvent extends Event {} -interface KeyboardEvent extends Event {} -interface MouseEvent extends Event {} -interface TouchEvent extends Event {} -interface PointerEvent extends Event {} -interface SubmitEvent extends Event {} -interface ToggleEvent extends Event {} -interface TransitionEvent extends Event {} -interface UIEvent extends Event {} -interface WheelEvent extends Event {} - -interface EventTarget {} -interface Document {} -interface DataTransfer {} -interface StyleMedia {} - -interface Element {} -interface DocumentFragment {} - -interface HTMLElement extends Element {} -interface HTMLAnchorElement extends HTMLElement {} -interface HTMLAreaElement extends HTMLElement {} -interface HTMLAudioElement extends HTMLElement {} -interface HTMLBaseElement extends HTMLElement {} -interface HTMLBodyElement extends HTMLElement {} -interface HTMLBRElement extends HTMLElement {} -interface HTMLButtonElement extends HTMLElement {} -interface HTMLCanvasElement extends HTMLElement {} -interface HTMLDataElement extends HTMLElement {} -interface HTMLDataListElement extends HTMLElement {} -interface HTMLDetailsElement extends HTMLElement {} -interface HTMLDialogElement extends HTMLElement {} -interface HTMLDivElement extends HTMLElement {} -interface HTMLDListElement extends HTMLElement {} -interface HTMLEmbedElement extends HTMLElement {} -interface HTMLFieldSetElement extends HTMLElement {} -interface HTMLFormElement extends HTMLElement {} -interface HTMLHeadingElement extends HTMLElement {} -interface HTMLHeadElement extends HTMLElement {} -interface HTMLHRElement extends HTMLElement {} -interface HTMLHtmlElement extends HTMLElement {} -interface HTMLIFrameElement extends HTMLElement {} -interface HTMLImageElement extends HTMLElement {} -interface HTMLInputElement extends HTMLElement {} -interface HTMLModElement extends HTMLElement {} -interface HTMLLabelElement extends HTMLElement {} -interface HTMLLegendElement extends HTMLElement {} -interface HTMLLIElement extends HTMLElement {} -interface HTMLLinkElement extends HTMLElement {} -interface HTMLMapElement extends HTMLElement {} -interface HTMLMetaElement extends HTMLElement {} -interface HTMLMeterElement extends HTMLElement {} -interface HTMLObjectElement extends HTMLElement {} -interface HTMLOListElement extends HTMLElement {} -interface HTMLOptGroupElement extends HTMLElement {} -interface HTMLOptionElement extends HTMLElement {} -interface HTMLOutputElement extends HTMLElement {} -interface HTMLParagraphElement extends HTMLElement {} -interface HTMLParamElement extends HTMLElement {} -interface HTMLPreElement extends HTMLElement {} -interface HTMLProgressElement extends HTMLElement {} -interface HTMLQuoteElement extends HTMLElement {} -interface HTMLSlotElement extends HTMLElement {} -interface HTMLScriptElement extends HTMLElement {} -interface HTMLSelectElement extends HTMLElement {} -interface HTMLSourceElement extends HTMLElement {} -interface HTMLSpanElement extends HTMLElement {} -interface HTMLStyleElement extends HTMLElement {} -interface HTMLTableElement extends HTMLElement {} -interface HTMLTableColElement extends HTMLElement {} -interface HTMLTableDataCellElement extends HTMLElement {} -interface HTMLTableHeaderCellElement extends HTMLElement {} -interface HTMLTableRowElement extends HTMLElement {} -interface HTMLTableSectionElement extends HTMLElement {} -interface HTMLTemplateElement extends HTMLElement {} -interface HTMLTextAreaElement extends HTMLElement {} -interface HTMLTimeElement extends HTMLElement {} -interface HTMLTitleElement extends HTMLElement {} -interface HTMLTrackElement extends HTMLElement {} -interface HTMLUListElement extends HTMLElement {} -interface HTMLVideoElement extends HTMLElement {} -interface HTMLWebViewElement extends HTMLElement {} - -interface SVGElement extends Element {} -interface SVGSVGElement extends SVGElement {} -interface SVGCircleElement extends SVGElement {} -interface SVGClipPathElement extends SVGElement {} -interface SVGDefsElement extends SVGElement {} -interface SVGDescElement extends SVGElement {} -interface SVGEllipseElement extends SVGElement {} -interface SVGFEBlendElement extends SVGElement {} -interface SVGFEColorMatrixElement extends SVGElement {} -interface SVGFEComponentTransferElement extends SVGElement {} -interface SVGFECompositeElement extends SVGElement {} -interface SVGFEConvolveMatrixElement extends SVGElement {} -interface SVGFEDiffuseLightingElement extends SVGElement {} -interface SVGFEDisplacementMapElement extends SVGElement {} -interface SVGFEDistantLightElement extends SVGElement {} -interface SVGFEDropShadowElement extends SVGElement {} -interface SVGFEFloodElement extends SVGElement {} -interface SVGFEFuncAElement extends SVGElement {} -interface SVGFEFuncBElement extends SVGElement {} -interface SVGFEFuncGElement extends SVGElement {} -interface SVGFEFuncRElement extends SVGElement {} -interface SVGFEGaussianBlurElement extends SVGElement {} -interface SVGFEImageElement extends SVGElement {} -interface SVGFEMergeElement extends SVGElement {} -interface SVGFEMergeNodeElement extends SVGElement {} -interface SVGFEMorphologyElement extends SVGElement {} -interface SVGFEOffsetElement extends SVGElement {} -interface SVGFEPointLightElement extends SVGElement {} -interface SVGFESpecularLightingElement extends SVGElement {} -interface SVGFESpotLightElement extends SVGElement {} -interface SVGFETileElement extends SVGElement {} -interface SVGFETurbulenceElement extends SVGElement {} -interface SVGFilterElement extends SVGElement {} -interface SVGForeignObjectElement extends SVGElement {} -interface SVGGElement extends SVGElement {} -interface SVGImageElement extends SVGElement {} -interface SVGLineElement extends SVGElement {} -interface SVGLinearGradientElement extends SVGElement {} -interface SVGMarkerElement extends SVGElement {} -interface SVGMaskElement extends SVGElement {} -interface SVGMetadataElement extends SVGElement {} -interface SVGPathElement extends SVGElement {} -interface SVGPatternElement extends SVGElement {} -interface SVGPolygonElement extends SVGElement {} -interface SVGPolylineElement extends SVGElement {} -interface SVGRadialGradientElement extends SVGElement {} -interface SVGRectElement extends SVGElement {} -interface SVGSetElement extends SVGElement {} -interface SVGStopElement extends SVGElement {} -interface SVGSwitchElement extends SVGElement {} -interface SVGSymbolElement extends SVGElement {} -interface SVGTextElement extends SVGElement {} -interface SVGTextPathElement extends SVGElement {} -interface SVGTSpanElement extends SVGElement {} -interface SVGUseElement extends SVGElement {} -interface SVGViewElement extends SVGElement {} - -interface FormData {} -interface Text {} -interface TouchList {} -interface WebGLRenderingContext {} -interface WebGL2RenderingContext {} - -interface TrustedHTML {} - -interface Blob {} -interface MediaStream {} -interface MediaSource {} diff --git a/node_modules/@types/react/index.d.ts b/node_modules/@types/react/index.d.ts deleted file mode 100644 index 40620b45..00000000 --- a/node_modules/@types/react/index.d.ts +++ /dev/null @@ -1,4362 +0,0 @@ -// NOTE: Users of the `experimental` builds of React should add a reference -// to 'react/experimental' in their project. See experimental.d.ts's top comment -// for reference and documentation on how exactly to do it. - -/// - -import * as CSS from "csstype"; - -type NativeAnimationEvent = AnimationEvent; -type NativeClipboardEvent = ClipboardEvent; -type NativeCompositionEvent = CompositionEvent; -type NativeDragEvent = DragEvent; -type NativeFocusEvent = FocusEvent; -type NativeInputEvent = InputEvent; -type NativeKeyboardEvent = KeyboardEvent; -type NativeMouseEvent = MouseEvent; -type NativeTouchEvent = TouchEvent; -type NativePointerEvent = PointerEvent; -type NativeSubmitEvent = SubmitEvent; -type NativeToggleEvent = ToggleEvent; -type NativeTransitionEvent = TransitionEvent; -type NativeUIEvent = UIEvent; -type NativeWheelEvent = WheelEvent; - -/** - * Used to represent DOM API's where users can either pass - * true or false as a boolean or as its equivalent strings. - */ -type Booleanish = boolean | "true" | "false"; - -/** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin MDN} - */ -type CrossOrigin = "anonymous" | "use-credentials" | "" | undefined; - -declare const UNDEFINED_VOID_ONLY: unique symbol; - -/** - * @internal Use `Awaited` instead - */ -// Helper type to enable `Awaited`. -// Must be a copy of the non-thenables of `ReactNode`. -type AwaitedReactNode = - | React.ReactElement - | string - | number - | bigint - | Iterable - | React.ReactPortal - | boolean - | null - | undefined - | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES[ - keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES - ]; - -/** - * The function returned from an effect passed to {@link React.useEffect useEffect}, - * which can be used to clean up the effect when the component unmounts. - * - * @see {@link https://react.dev/reference/react/useEffect React Docs} - */ -type Destructor = () => void | { [UNDEFINED_VOID_ONLY]: never }; -type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never }; - -// eslint-disable-next-line @definitelytyped/export-just-namespace -export = React; -export as namespace React; - -declare namespace React { - // - // React Elements - // ---------------------------------------------------------------------- - - /** - * Used to retrieve the possible components which accept a given set of props. - * - * Can be passed no type parameters to get a union of all possible components - * and tags. - * - * Is a superset of {@link ComponentType}. - * - * @template P The props to match against. If not passed, defaults to any. - * @template Tag An optional tag to match against. If not passed, attempts to match against all possible tags. - * - * @example - * - * ```tsx - * // All components and tags (img, embed etc.) - * // which accept `src` - * type SrcComponents = ElementType<{ src: any }>; - * ``` - * - * @example - * - * ```tsx - * // All components - * type AllComponents = ElementType; - * ``` - * - * @example - * - * ```tsx - * // All custom components which match `src`, and tags which - * // match `src`, narrowed down to just `audio` and `embed` - * type SrcComponents = ElementType<{ src: any }, 'audio' | 'embed'>; - * ``` - */ - type ElementType

= - | { [K in Tag]: P extends JSX.IntrinsicElements[K] ? K : never }[Tag] - | ComponentType

; - - /** - * Represents any user-defined component, either as a function or a class. - * - * Similar to {@link JSXElementConstructor}, but with extra properties like - * {@link FunctionComponent.defaultProps defaultProps }. - * - * @template P The props the component accepts. - * - * @see {@link ComponentClass} - * @see {@link FunctionComponent} - */ - type ComponentType

= ComponentClass

| FunctionComponent

; - - /** - * Represents any user-defined component, either as a function or a class. - * - * Similar to {@link ComponentType}, but without extra properties like - * {@link FunctionComponent.defaultProps defaultProps }. - * - * @template P The props the component accepts. - */ - type JSXElementConstructor

= - | (( - props: P, - ) => ReactNode | Promise) - // constructor signature must match React.Component - | (new(props: P, context: any) => Component); - - /** - * Created by {@link createRef}, or {@link useRef} when passed `null`. - * - * @template T The type of the ref's value. - * - * @example - * - * ```tsx - * const ref = createRef(); - * - * ref.current = document.createElement('div'); // Error - * ``` - */ - interface RefObject { - /** - * The current value of the ref. - */ - current: T; - } - - interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES { - } - /** - * A callback fired whenever the ref's value changes. - * - * @template T The type of the ref's value. - * - * @see {@link https://react.dev/reference/react-dom/components/common#ref-callback React Docs} - * - * @example - * - * ```tsx - *

console.log(node)} /> - * ``` - */ - type RefCallback = { - bivarianceHack( - instance: T | null, - ): - | void - | (() => VoidOrUndefinedOnly) - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES - ]; - }["bivarianceHack"]; - - /** - * A union type of all possible shapes for React refs. - * - * @see {@link RefCallback} - * @see {@link RefObject} - */ - - type Ref = RefCallback | RefObject | null; - /** - * @deprecated Use `Ref` instead. String refs are no longer supported. - * If you're typing a library with support for React versions with string refs, use `RefAttributes['ref']` instead. - */ - type LegacyRef = Ref; - /** - * @deprecated Use `ComponentRef` instead - * - * Retrieves the type of the 'ref' prop for a given component type or tag name. - * - * @template C The component type. - * - * @example - * - * ```tsx - * type MyComponentRef = React.ElementRef; - * ``` - * - * @example - * - * ```tsx - * type DivRef = React.ElementRef<'div'>; - * ``` - */ - type ElementRef< - C extends - | ForwardRefExoticComponent - | { new(props: any, context: any): Component } - | ((props: any) => ReactNode) - | keyof JSX.IntrinsicElements, - > = ComponentRef; - - type ComponentState = any; - - /** - * A value which uniquely identifies a node among items in an array. - * - * @see {@link https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key React Docs} - */ - type Key = string | number | bigint; - - /** - * @internal The props any component can receive. - * You don't have to add this type. All components automatically accept these props. - * ```tsx - * const Component = () =>
; - * - * ``` - * - * WARNING: The implementation of a component will never have access to these attributes. - * The following example would be incorrect usage because {@link Component} would never have access to `key`: - * ```tsx - * const Component = (props: React.Attributes) => props.key; - * ``` - */ - interface Attributes { - key?: Key | null | undefined; - } - /** - * The props any component accepting refs can receive. - * Class components, built-in browser components (e.g. `div`) and forwardRef components can receive refs and automatically accept these props. - * ```tsx - * const Component = forwardRef(() =>
); - * console.log(current)} /> - * ``` - * - * You only need this type if you manually author the types of props that need to be compatible with legacy refs. - * ```tsx - * interface Props extends React.RefAttributes {} - * declare const Component: React.FunctionComponent; - * ``` - * - * Otherwise it's simpler to directly use {@link Ref} since you can safely use the - * props type to describe to props that a consumer can pass to the component - * as well as describing the props the implementation of a component "sees". - * {@link RefAttributes} is generally not safe to describe both consumer and seen props. - * - * ```tsx - * interface Props extends { - * ref?: React.Ref | undefined; - * } - * declare const Component: React.FunctionComponent; - * ``` - * - * WARNING: The implementation of a component will not have access to the same type in versions of React supporting string refs. - * The following example would be incorrect usage because {@link Component} would never have access to a `ref` with type `string` - * ```tsx - * const Component = (props: React.RefAttributes) => props.ref; - * ``` - */ - interface RefAttributes extends Attributes { - /** - * Allows getting a ref to the component instance. - * Once the component unmounts, React will set `ref.current` to `null` - * (or call the ref with `null` if you passed a callback ref). - * - * @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} - */ - ref?: Ref | undefined; - } - - /** - * Represents the built-in attributes available to class components. - */ - interface ClassAttributes extends RefAttributes { - } - - /** - * Represents a JSX element. - * - * Where {@link ReactNode} represents everything that can be rendered, `ReactElement` - * only represents JSX. - * - * @template P The type of the props object - * @template T The type of the component or tag - * - * @example - * - * ```tsx - * const element: ReactElement =
; - * ``` - */ - interface ReactElement< - P = unknown, - T extends string | JSXElementConstructor = string | JSXElementConstructor, - > { - type: T; - props: P; - key: string | null; - } - - /** - * @deprecated - */ - interface ReactComponentElement< - T extends keyof JSX.IntrinsicElements | JSXElementConstructor, - P = Pick, Exclude, "key" | "ref">>, - > extends ReactElement> {} - - /** - * @deprecated Use `ReactElement>` - */ - interface FunctionComponentElement

extends ReactElement> { - /** - * @deprecated Use `element.props.ref` instead. - */ - ref?: ("ref" extends keyof P ? P extends { ref?: infer R | undefined } ? R : never : never) | undefined; - } - - /** - * @deprecated Use `ReactElement>` - */ - type CElement> = ComponentElement; - /** - * @deprecated Use `ReactElement>` - */ - interface ComponentElement> extends ReactElement> { - /** - * @deprecated Use `element.props.ref` instead. - */ - ref?: Ref | undefined; - } - - /** - * @deprecated Use {@link ComponentElement} instead. - */ - type ClassicElement

= CElement>; - - // string fallback for custom web-components - /** - * @deprecated Use `ReactElement` - */ - interface DOMElement

| SVGAttributes, T extends Element> - extends ReactElement - { - /** - * @deprecated Use `element.props.ref` instead. - */ - ref: Ref; - } - - // ReactHTML for ReactHTMLElement - interface ReactHTMLElement extends DetailedReactHTMLElement, T> {} - - interface DetailedReactHTMLElement

, T extends HTMLElement> extends DOMElement { - type: HTMLElementType; - } - - // ReactSVG for ReactSVGElement - interface ReactSVGElement extends DOMElement, SVGElement> { - type: SVGElementType; - } - - interface ReactPortal extends ReactElement { - children: ReactNode; - } - - /** - * Different release channels declare additional types of ReactNode this particular release channel accepts. - * App or library types should never augment this interface. - */ - interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES {} - - /** - * Represents all of the things React can render. - * - * Where {@link ReactElement} only represents JSX, `ReactNode` represents everything that can be rendered. - * - * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/react-types/reactnode/ React TypeScript Cheatsheet} - * - * @example - * - * ```tsx - * // Typing children - * type Props = { children: ReactNode } - * - * const Component = ({ children }: Props) =>

{children}
- * - * hello - * ``` - * - * @example - * - * ```tsx - * // Typing a custom element - * type Props = { customElement: ReactNode } - * - * const Component = ({ customElement }: Props) =>
{customElement}
- * - * hello
} /> - * ``` - */ - // non-thenables need to be kept in sync with AwaitedReactNode - type ReactNode = - | ReactElement - | string - | number - | bigint - | Iterable - | ReactPortal - | boolean - | null - | undefined - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES - ] - | Promise; - - // - // Top Level API - // ---------------------------------------------------------------------- - - // DOM Elements - // TODO: generalize this to everything in `keyof ReactHTML`, not just "input" - function createElement( - type: "input", - props?: InputHTMLAttributes & ClassAttributes | null, - ...children: ReactNode[] - ): DetailedReactHTMLElement, HTMLInputElement>; - function createElement

, T extends HTMLElement>( - type: HTMLElementType, - props?: ClassAttributes & P | null, - ...children: ReactNode[] - ): DetailedReactHTMLElement; - function createElement

, T extends SVGElement>( - type: SVGElementType, - props?: ClassAttributes & P | null, - ...children: ReactNode[] - ): ReactSVGElement; - function createElement

, T extends Element>( - type: string, - props?: ClassAttributes & P | null, - ...children: ReactNode[] - ): DOMElement; - - // Custom components - - function createElement

( - type: FunctionComponent

, - props?: Attributes & P | null, - ...children: ReactNode[] - ): FunctionComponentElement

; - function createElement

, C extends ComponentClass

>( - type: ClassType, - props?: ClassAttributes & P | null, - ...children: ReactNode[] - ): CElement; - function createElement

( - type: FunctionComponent

| ComponentClass

| string, - props?: Attributes & P | null, - ...children: ReactNode[] - ): ReactElement

; - - // DOM Elements - // ReactHTMLElement - function cloneElement

, T extends HTMLElement>( - element: DetailedReactHTMLElement, - props?: P, - ...children: ReactNode[] - ): DetailedReactHTMLElement; - // ReactHTMLElement, less specific - function cloneElement

, T extends HTMLElement>( - element: ReactHTMLElement, - props?: P, - ...children: ReactNode[] - ): ReactHTMLElement; - // SVGElement - function cloneElement

, T extends SVGElement>( - element: ReactSVGElement, - props?: P, - ...children: ReactNode[] - ): ReactSVGElement; - // DOM Element (has to be the last, because type checking stops at first overload that fits) - function cloneElement

, T extends Element>( - element: DOMElement, - props?: DOMAttributes & P, - ...children: ReactNode[] - ): DOMElement; - - // Custom components - function cloneElement

( - element: FunctionComponentElement

, - props?: Partial

& Attributes, - ...children: ReactNode[] - ): FunctionComponentElement

; - function cloneElement>( - element: CElement, - props?: Partial

& ClassAttributes, - ...children: ReactNode[] - ): CElement; - function cloneElement

( - element: ReactElement

, - props?: Partial

& Attributes, - ...children: ReactNode[] - ): ReactElement

; - - /** - * Describes the props accepted by a Context {@link Provider}. - * - * @template T The type of the value the context provides. - */ - interface ProviderProps { - value: T; - children?: ReactNode | undefined; - } - - /** - * Describes the props accepted by a Context {@link Consumer}. - * - * @template T The type of the value the context provides. - */ - interface ConsumerProps { - children: (value: T) => ReactNode; - } - - /** - * An object masquerading as a component. These are created by functions - * like {@link forwardRef}, {@link memo}, and {@link createContext}. - * - * In order to make TypeScript work, we pretend that they are normal - * components. - * - * But they are, in fact, not callable - instead, they are objects which - * are treated specially by the renderer. - * - * @template P The props the component accepts. - */ - interface ExoticComponent

{ - (props: P): ReactNode; - readonly $$typeof: symbol; - } - - /** - * An {@link ExoticComponent} with a `displayName` property applied to it. - * - * @template P The props the component accepts. - */ - interface NamedExoticComponent

extends ExoticComponent

{ - /** - * Used in debugging messages. You might want to set it - * explicitly if you want to display a different name for - * debugging purposes. - * - * @see {@link https://legacy.reactjs.org/docs/react-component.html#displayname Legacy React Docs} - */ - displayName?: string | undefined; - } - - /** - * An {@link ExoticComponent} with a `propTypes` property applied to it. - * - * @template P The props the component accepts. - */ - interface ProviderExoticComponent

extends ExoticComponent

{ - } - - /** - * Used to retrieve the type of a context object from a {@link Context}. - * - * @template C The context object. - * - * @example - * - * ```tsx - * import { createContext } from 'react'; - * - * const MyContext = createContext({ foo: 'bar' }); - * - * type ContextType = ContextType; - * // ContextType = { foo: string } - * ``` - */ - type ContextType> = C extends Context ? T : never; - - /** - * Wraps your components to specify the value of this context for all components inside. - * - * @see {@link https://react.dev/reference/react/createContext#provider React Docs} - * - * @example - * - * ```tsx - * import { createContext } from 'react'; - * - * const ThemeContext = createContext('light'); - * - * function App() { - * return ( - * - * - * - * ); - * } - * ``` - */ - type Provider = ProviderExoticComponent>; - - /** - * The old way to read context, before {@link useContext} existed. - * - * @see {@link https://react.dev/reference/react/createContext#consumer React Docs} - * - * @example - * - * ```tsx - * import { UserContext } from './user-context'; - * - * function Avatar() { - * return ( - * - * {user => {user.name}} - * - * ); - * } - * ``` - */ - type Consumer = ExoticComponent>; - - /** - * Context lets components pass information deep down without explicitly - * passing props. - * - * Created from {@link createContext} - * - * @see {@link https://react.dev/learn/passing-data-deeply-with-context React Docs} - * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/context/ React TypeScript Cheatsheet} - * - * @example - * - * ```tsx - * import { createContext } from 'react'; - * - * const ThemeContext = createContext('light'); - * ``` - */ - interface Context extends Provider { - Provider: Provider; - Consumer: Consumer; - /** - * Used in debugging messages. You might want to set it - * explicitly if you want to display a different name for - * debugging purposes. - * - * @see {@link https://legacy.reactjs.org/docs/react-component.html#displayname Legacy React Docs} - */ - displayName?: string | undefined; - } - - /** - * Lets you create a {@link Context} that components can provide or read. - * - * @param defaultValue The value you want the context to have when there is no matching - * {@link Provider} in the tree above the component reading the context. This is meant - * as a "last resort" fallback. - * - * @see {@link https://react.dev/reference/react/createContext#reference React Docs} - * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/context/ React TypeScript Cheatsheet} - * - * @example - * - * ```tsx - * import { createContext } from 'react'; - * - * const ThemeContext = createContext('light'); - * function App() { - * return ( - * - * - * - * ); - * } - * ``` - */ - function createContext( - // If you thought this should be optional, see - // https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24509#issuecomment-382213106 - defaultValue: T, - ): Context; - - function isValidElement

(object: {} | null | undefined): object is ReactElement

; - - const Children: { - map( - children: C | readonly C[], - fn: (child: C, index: number) => T, - ): C extends null | undefined ? C : Array>; - forEach(children: C | readonly C[], fn: (child: C, index: number) => void): void; - count(children: any): number; - only(children: C): C extends any[] ? never : C; - toArray(children: ReactNode | ReactNode[]): Array>; - }; - - export interface FragmentProps { - children?: React.ReactNode; - } - /** - * Lets you group elements without a wrapper node. - * - * @see {@link https://react.dev/reference/react/Fragment React Docs} - * - * @example - * - * ```tsx - * import { Fragment } from 'react'; - * - * - * Hello - * World - * - * ``` - * - * @example - * - * ```tsx - * // Using the <> shorthand syntax: - * - * <> - * Hello - * World - * - * ``` - */ - const Fragment: ExoticComponent; - - /** - * Lets you find common bugs in your components early during development. - * - * @see {@link https://react.dev/reference/react/StrictMode React Docs} - * - * @example - * - * ```tsx - * import { StrictMode } from 'react'; - * - * - * - * - * ``` - */ - const StrictMode: ExoticComponent<{ children?: ReactNode | undefined }>; - - /** - * The props accepted by {@link Suspense}. - * - * @see {@link https://react.dev/reference/react/Suspense React Docs} - */ - interface SuspenseProps { - children?: ReactNode | undefined; - - /** A fallback react tree to show when a Suspense child (like React.lazy) suspends */ - fallback?: ReactNode; - - /** - * A name for this Suspense boundary for instrumentation purposes. - * The name will help identify this boundary in React DevTools. - */ - name?: string | undefined; - } - - /** - * Lets you display a fallback until its children have finished loading. - * - * @see {@link https://react.dev/reference/react/Suspense React Docs} - * - * @example - * - * ```tsx - * import { Suspense } from 'react'; - * - * }> - * - * - * ``` - */ - const Suspense: ExoticComponent; - const version: string; - - /** - * The callback passed to {@link ProfilerProps.onRender}. - * - * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs} - */ - type ProfilerOnRenderCallback = ( - /** - * The string id prop of the {@link Profiler} tree that has just committed. This lets - * you identify which part of the tree was committed if you are using multiple - * profilers. - * - * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs} - */ - id: string, - /** - * This lets you know whether the tree has just been mounted for the first time - * or re-rendered due to a change in props, state, or hooks. - * - * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs} - */ - phase: "mount" | "update" | "nested-update", - /** - * The number of milliseconds spent rendering the {@link Profiler} and its descendants - * for the current update. This indicates how well the subtree makes use of - * memoization (e.g. {@link memo} and {@link useMemo}). Ideally this value should decrease - * significantly after the initial mount as many of the descendants will only need to - * re-render if their specific props change. - * - * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs} - */ - actualDuration: number, - /** - * The number of milliseconds estimating how much time it would take to re-render the entire - * {@link Profiler} subtree without any optimizations. It is calculated by summing up the most - * recent render durations of each component in the tree. This value estimates a worst-case - * cost of rendering (e.g. the initial mount or a tree with no memoization). Compare - * {@link actualDuration} against it to see if memoization is working. - * - * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs} - */ - baseDuration: number, - /** - * A numeric timestamp for when React began rendering the current update. - * - * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs} - */ - startTime: number, - /** - * A numeric timestamp for when React committed the current update. This value is shared - * between all profilers in a commit, enabling them to be grouped if desirable. - * - * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs} - */ - commitTime: number, - ) => void; - - /** - * The props accepted by {@link Profiler}. - * - * @see {@link https://react.dev/reference/react/Profiler React Docs} - */ - interface ProfilerProps { - children?: ReactNode | undefined; - id: string; - onRender: ProfilerOnRenderCallback; - } - - /** - * Lets you measure rendering performance of a React tree programmatically. - * - * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs} - * - * @example - * - * ```tsx - * - * - * - * ``` - */ - const Profiler: ExoticComponent; - - // - // Component API - // ---------------------------------------------------------------------- - - type ReactInstance = Component | Element; - - // Base component for plain JS classes - interface Component

extends ComponentLifecycle {} - class Component { - /** - * If set, `this.context` will be set at runtime to the current value of the given Context. - * - * @example - * - * ```ts - * type MyContext = number - * const Ctx = React.createContext(0) - * - * class Foo extends React.Component { - * static contextType = Ctx - * context!: React.ContextType - * render () { - * return <>My context's value: {this.context}; - * } - * } - * ``` - * - * @see {@link https://react.dev/reference/react/Component#static-contexttype} - */ - static contextType?: Context | undefined; - - /** - * Ignored by React. - * @deprecated Only kept in types for backwards compatibility. Will be removed in a future major release. - */ - static propTypes?: any; - - /** - * If using React Context, re-declare this in your class to be the - * `React.ContextType` of your `static contextType`. - * Should be used with type annotation or static contextType. - * - * @example - * ```ts - * static contextType = MyContext - * // For TS pre-3.7: - * context!: React.ContextType - * // For TS 3.7 and above: - * declare context: React.ContextType - * ``` - * - * @see {@link https://react.dev/reference/react/Component#context React Docs} - */ - context: unknown; - - // Keep in sync with constructor signature of JSXElementConstructor and ComponentClass. - constructor(props: P); - /** - * @param props - * @param context value of the parent {@link https://react.dev/reference/react/Component#context Context} specified - * in `contextType`. - */ - // TODO: Ideally we'd infer the constructor signatur from `contextType`. - // Might be hard to ship without breaking existing code. - constructor(props: P, context: any); - - // We MUST keep setState() as a unified signature because it allows proper checking of the method return type. - // See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18365#issuecomment-351013257 - // Also, the ` | S` allows intellisense to not be dumbisense - setState( - state: ((prevState: Readonly, props: Readonly

) => Pick | S | null) | (Pick | S | null), - callback?: () => void, - ): void; - - forceUpdate(callback?: () => void): void; - render(): ReactNode; - - readonly props: Readonly

; - state: Readonly; - } - - class PureComponent

extends Component {} - - /** - * @deprecated Use `ClassicComponent` from `create-react-class` - * - * @see {@link https://legacy.reactjs.org/docs/react-without-es6.html Legacy React Docs} - * @see {@link https://www.npmjs.com/package/create-react-class `create-react-class` on npm} - */ - interface ClassicComponent

extends Component { - replaceState(nextState: S, callback?: () => void): void; - isMounted(): boolean; - getInitialState?(): S; - } - - // - // Class Interfaces - // ---------------------------------------------------------------------- - - /** - * Represents the type of a function component. Can optionally - * receive a type argument that represents the props the component - * receives. - * - * @template P The props the component accepts. - * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/function_components React TypeScript Cheatsheet} - * @alias for {@link FunctionComponent} - * - * @example - * - * ```tsx - * // With props: - * type Props = { name: string } - * - * const MyComponent: FC = (props) => { - * return

{props.name}
- * } - * ``` - * - * @example - * - * ```tsx - * // Without props: - * const MyComponentWithoutProps: FC = () => { - * return
MyComponentWithoutProps
- * } - * ``` - */ - type FC

= FunctionComponent

; - - /** - * Represents the type of a function component. Can optionally - * receive a type argument that represents the props the component - * accepts. - * - * @template P The props the component accepts. - * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/function_components React TypeScript Cheatsheet} - * - * @example - * - * ```tsx - * // With props: - * type Props = { name: string } - * - * const MyComponent: FunctionComponent = (props) => { - * return

{props.name}
- * } - * ``` - * - * @example - * - * ```tsx - * // Without props: - * const MyComponentWithoutProps: FunctionComponent = () => { - * return
MyComponentWithoutProps
- * } - * ``` - */ - interface FunctionComponent

{ - (props: P): ReactNode | Promise; - /** - * Ignored by React. - * @deprecated Only kept in types for backwards compatibility. Will be removed in a future major release. - */ - propTypes?: any; - /** - * Used in debugging messages. You might want to set it - * explicitly if you want to display a different name for - * debugging purposes. - * - * @see {@link https://legacy.reactjs.org/docs/react-component.html#displayname Legacy React Docs} - * - * @example - * - * ```tsx - * - * const MyComponent: FC = () => { - * return

Hello!
- * } - * - * MyComponent.displayName = 'MyAwesomeComponent' - * ``` - */ - displayName?: string | undefined; - } - - /** - * The type of the ref received by a {@link ForwardRefRenderFunction}. - * - * @see {@link ForwardRefRenderFunction} - */ - // Making T nullable is assuming the refs will be managed by React or the component impl will write it somewhere else. - // But this isn't necessarily true. We haven't heard complains about it yet and hopefully `forwardRef` is removed from React before we do. - type ForwardedRef = ((instance: T | null) => void) | RefObject | null; - - /** - * The type of the function passed to {@link forwardRef}. This is considered different - * to a normal {@link FunctionComponent} because it receives an additional argument, - * - * @param props Props passed to the component, if any. - * @param ref A ref forwarded to the component of type {@link ForwardedRef}. - * - * @template T The type of the forwarded ref. - * @template P The type of the props the component accepts. - * - * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/forward_and_create_ref/ React TypeScript Cheatsheet} - * @see {@link forwardRef} - */ - interface ForwardRefRenderFunction { - (props: P, ref: ForwardedRef): ReactNode; - /** - * Used in debugging messages. You might want to set it - * explicitly if you want to display a different name for - * debugging purposes. - * - * Will show `ForwardRef(${Component.displayName || Component.name})` - * in devtools by default, but can be given its own specific name. - * - * @see {@link https://legacy.reactjs.org/docs/react-component.html#displayname Legacy React Docs} - */ - displayName?: string | undefined; - /** - * Ignored by React. - * @deprecated Only kept in types for backwards compatibility. Will be removed in a future major release. - */ - propTypes?: any; - } - - /** - * Represents a component class in React. - * - * @template P The props the component accepts. - * @template S The internal state of the component. - */ - interface ComponentClass

extends StaticLifecycle { - // constructor signature must match React.Component - new( - props: P, - /** - * Value of the parent {@link https://react.dev/reference/react/Component#context Context} specified - * in `contextType`. - */ - context?: any, - ): Component; - /** - * Ignored by React. - * @deprecated Only kept in types for backwards compatibility. Will be removed in a future major release. - */ - propTypes?: any; - contextType?: Context | undefined; - defaultProps?: Partial

| undefined; - /** - * Used in debugging messages. You might want to set it - * explicitly if you want to display a different name for - * debugging purposes. - * - * @see {@link https://legacy.reactjs.org/docs/react-component.html#displayname Legacy React Docs} - */ - displayName?: string | undefined; - } - - /** - * @deprecated Use `ClassicComponentClass` from `create-react-class` - * - * @see {@link https://legacy.reactjs.org/docs/react-without-es6.html Legacy React Docs} - * @see {@link https://www.npmjs.com/package/create-react-class `create-react-class` on npm} - */ - interface ClassicComponentClass

extends ComponentClass

{ - new(props: P): ClassicComponent; - getDefaultProps?(): P; - } - - /** - * Used in {@link createElement} and {@link createFactory} to represent - * a class. - * - * An intersection type is used to infer multiple type parameters from - * a single argument, which is useful for many top-level API defs. - * See {@link https://github.com/Microsoft/TypeScript/issues/7234 this GitHub issue} - * for more info. - */ - type ClassType, C extends ComponentClass

> = - & C - & (new(props: P, context: any) => T); - - // - // Component Specs and Lifecycle - // ---------------------------------------------------------------------- - - // This should actually be something like `Lifecycle | DeprecatedLifecycle`, - // as React will _not_ call the deprecated lifecycle methods if any of the new lifecycle - // methods are present. - interface ComponentLifecycle extends NewLifecycle, DeprecatedLifecycle { - /** - * Called immediately after a component is mounted. Setting state here will trigger re-rendering. - */ - componentDidMount?(): void; - /** - * Called to determine whether the change in props and state should trigger a re-render. - * - * `Component` always returns true. - * `PureComponent` implements a shallow comparison on props and state and returns true if any - * props or states have changed. - * - * If false is returned, {@link Component.render}, `componentWillUpdate` - * and `componentDidUpdate` will not be called. - */ - shouldComponentUpdate?(nextProps: Readonly

, nextState: Readonly, nextContext: any): boolean; - /** - * Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as - * cancelled network requests, or cleaning up any DOM elements created in `componentDidMount`. - */ - componentWillUnmount?(): void; - /** - * Catches exceptions generated in descendant components. Unhandled exceptions will cause - * the entire component tree to unmount. - */ - componentDidCatch?(error: Error, errorInfo: ErrorInfo): void; - } - - // Unfortunately, we have no way of declaring that the component constructor must implement this - interface StaticLifecycle { - getDerivedStateFromProps?: GetDerivedStateFromProps | undefined; - getDerivedStateFromError?: GetDerivedStateFromError | undefined; - } - - type GetDerivedStateFromProps = - /** - * Returns an update to a component's state based on its new props and old state. - * - * Note: its presence prevents any of the deprecated lifecycle methods from being invoked - */ - (nextProps: Readonly

, prevState: S) => Partial | null; - - type GetDerivedStateFromError = - /** - * This lifecycle is invoked after an error has been thrown by a descendant component. - * It receives the error that was thrown as a parameter and should return a value to update state. - * - * Note: its presence prevents any of the deprecated lifecycle methods from being invoked - */ - (error: any) => Partial | null; - - // This should be "infer SS" but can't use it yet - interface NewLifecycle { - /** - * Runs before React applies the result of {@link Component.render render} to the document, and - * returns an object to be given to {@link componentDidUpdate}. Useful for saving - * things such as scroll position before {@link Component.render render} causes changes to it. - * - * Note: the presence of this method prevents any of the deprecated - * lifecycle events from running. - */ - getSnapshotBeforeUpdate?(prevProps: Readonly

, prevState: Readonly): SS | null; - /** - * Called immediately after updating occurs. Not called for the initial render. - * - * The snapshot is only present if {@link getSnapshotBeforeUpdate} is present and returns non-null. - */ - componentDidUpdate?(prevProps: Readonly

, prevState: Readonly, snapshot?: SS): void; - } - - interface DeprecatedLifecycle { - /** - * Called immediately before mounting occurs, and before {@link Component.render}. - * Avoid introducing any side-effects or subscriptions in this method. - * - * Note: the presence of {@link NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate} - * or {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} prevents - * this from being invoked. - * - * @deprecated 16.3, use {@link ComponentLifecycle.componentDidMount componentDidMount} or the constructor instead; will stop working in React 17 - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state} - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path} - */ - componentWillMount?(): void; - /** - * Called immediately before mounting occurs, and before {@link Component.render}. - * Avoid introducing any side-effects or subscriptions in this method. - * - * This method will not stop working in React 17. - * - * Note: the presence of {@link NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate} - * or {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} prevents - * this from being invoked. - * - * @deprecated 16.3, use {@link ComponentLifecycle.componentDidMount componentDidMount} or the constructor instead - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state} - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path} - */ - UNSAFE_componentWillMount?(): void; - /** - * Called when the component may be receiving new props. - * React may call this even if props have not changed, so be sure to compare new and existing - * props if you only want to handle changes. - * - * Calling {@link Component.setState} generally does not trigger this method. - * - * Note: the presence of {@link NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate} - * or {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} prevents - * this from being invoked. - * - * @deprecated 16.3, use static {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} instead; will stop working in React 17 - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props} - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path} - */ - componentWillReceiveProps?(nextProps: Readonly

, nextContext: any): void; - /** - * Called when the component may be receiving new props. - * React may call this even if props have not changed, so be sure to compare new and existing - * props if you only want to handle changes. - * - * Calling {@link Component.setState} generally does not trigger this method. - * - * This method will not stop working in React 17. - * - * Note: the presence of {@link NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate} - * or {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} prevents - * this from being invoked. - * - * @deprecated 16.3, use static {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} instead - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props} - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path} - */ - UNSAFE_componentWillReceiveProps?(nextProps: Readonly

, nextContext: any): void; - /** - * Called immediately before rendering when new props or state is received. Not called for the initial render. - * - * Note: You cannot call {@link Component.setState} here. - * - * Note: the presence of {@link NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate} - * or {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} prevents - * this from being invoked. - * - * @deprecated 16.3, use getSnapshotBeforeUpdate instead; will stop working in React 17 - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update} - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path} - */ - componentWillUpdate?(nextProps: Readonly

, nextState: Readonly, nextContext: any): void; - /** - * Called immediately before rendering when new props or state is received. Not called for the initial render. - * - * Note: You cannot call {@link Component.setState} here. - * - * This method will not stop working in React 17. - * - * Note: the presence of {@link NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate} - * or {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} prevents - * this from being invoked. - * - * @deprecated 16.3, use getSnapshotBeforeUpdate instead - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update} - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path} - */ - UNSAFE_componentWillUpdate?(nextProps: Readonly

, nextState: Readonly, nextContext: any): void; - } - - function createRef(): RefObject; - - /** - * The type of the component returned from {@link forwardRef}. - * - * @template P The props the component accepts, if any. - * - * @see {@link ExoticComponent} - */ - interface ForwardRefExoticComponent

extends NamedExoticComponent

{ - /** - * Ignored by React. - * @deprecated Only kept in types for backwards compatibility. Will be removed in a future major release. - */ - propTypes?: any; - } - - /** - * Lets your component expose a DOM node to a parent component - * using a ref. - * - * @see {@link https://react.dev/reference/react/forwardRef React Docs} - * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/forward_and_create_ref/ React TypeScript Cheatsheet} - * - * @param render See the {@link ForwardRefRenderFunction}. - * - * @template T The type of the DOM node. - * @template P The props the component accepts, if any. - * - * @example - * - * ```tsx - * interface Props { - * children?: ReactNode; - * type: "submit" | "button"; - * } - * - * export const FancyButton = forwardRef((props, ref) => ( - * - * )); - * ``` - */ - function forwardRef( - render: ForwardRefRenderFunction>, - ): ForwardRefExoticComponent & RefAttributes>; - - /** - * Omits the 'ref' attribute from the given props object. - * - * @template Props The props object type. - */ - type PropsWithoutRef = - // Omit would not be sufficient for this. We'd like to avoid unnecessary mapping and need a distributive conditional to support unions. - // see: https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#distributive-conditional-types - // https://github.com/Microsoft/TypeScript/issues/28339 - Props extends any ? ("ref" extends keyof Props ? Omit : Props) : Props; - /** - * Ensures that the props do not include string ref, which cannot be forwarded - * @deprecated Use `Props` directly. `PropsWithRef` is just an alias for `Props` - */ - type PropsWithRef = Props; - - type PropsWithChildren

= P & { children?: ReactNode | undefined }; - - /** - * Used to retrieve the props a component accepts. Can either be passed a string, - * indicating a DOM element (e.g. 'div', 'span', etc.) or the type of a React - * component. - * - * It's usually better to use {@link ComponentPropsWithRef} or {@link ComponentPropsWithoutRef} - * instead of this type, as they let you be explicit about whether or not to include - * the `ref` prop. - * - * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/react-types/componentprops/ React TypeScript Cheatsheet} - * - * @example - * - * ```tsx - * // Retrieves the props an 'input' element accepts - * type InputProps = React.ComponentProps<'input'>; - * ``` - * - * @example - * - * ```tsx - * const MyComponent = (props: { foo: number, bar: string }) =>

; - * - * // Retrieves the props 'MyComponent' accepts - * type MyComponentProps = React.ComponentProps; - * ``` - */ - type ComponentProps> = T extends - JSXElementConstructor ? Props - : T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] - : {}; - - /** - * Used to retrieve the props a component accepts with its ref. Can either be - * passed a string, indicating a DOM element (e.g. 'div', 'span', etc.) or the - * type of a React component. - * - * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/react-types/componentprops/ React TypeScript Cheatsheet} - * - * @example - * - * ```tsx - * // Retrieves the props an 'input' element accepts - * type InputProps = React.ComponentPropsWithRef<'input'>; - * ``` - * - * @example - * - * ```tsx - * const MyComponent = (props: { foo: number, bar: string }) =>
; - * - * // Retrieves the props 'MyComponent' accepts - * type MyComponentPropsWithRef = React.ComponentPropsWithRef; - * ``` - */ - type ComponentPropsWithRef = T extends JSXElementConstructor - // If it's a class i.e. newable we're dealing with a class component - ? T extends abstract new(args: any) => any ? PropsWithoutRef & RefAttributes> - : Props - : ComponentProps; - /** - * Used to retrieve the props a custom component accepts with its ref. - * - * Unlike {@link ComponentPropsWithRef}, this only works with custom - * components, i.e. components you define yourself. This is to improve - * type-checking performance. - * - * @example - * - * ```tsx - * const MyComponent = (props: { foo: number, bar: string }) =>
; - * - * // Retrieves the props 'MyComponent' accepts - * type MyComponentPropsWithRef = React.CustomComponentPropsWithRef; - * ``` - */ - type CustomComponentPropsWithRef = T extends JSXElementConstructor - // If it's a class i.e. newable we're dealing with a class component - ? T extends abstract new(args: any) => any ? PropsWithoutRef & RefAttributes> - : Props - : never; - - /** - * Used to retrieve the props a component accepts without its ref. Can either be - * passed a string, indicating a DOM element (e.g. 'div', 'span', etc.) or the - * type of a React component. - * - * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/react-types/componentprops/ React TypeScript Cheatsheet} - * - * @example - * - * ```tsx - * // Retrieves the props an 'input' element accepts - * type InputProps = React.ComponentPropsWithoutRef<'input'>; - * ``` - * - * @example - * - * ```tsx - * const MyComponent = (props: { foo: number, bar: string }) =>
; - * - * // Retrieves the props 'MyComponent' accepts - * type MyComponentPropsWithoutRef = React.ComponentPropsWithoutRef; - * ``` - */ - type ComponentPropsWithoutRef = PropsWithoutRef>; - - /** - * Retrieves the type of the 'ref' prop for a given component type or tag name. - * - * @template C The component type. - * - * @example - * - * ```tsx - * type MyComponentRef = React.ComponentRef; - * ``` - * - * @example - * - * ```tsx - * type DivRef = React.ComponentRef<'div'>; - * ``` - */ - type ComponentRef = ComponentPropsWithRef extends RefAttributes ? Method - : never; - - // will show `Memo(${Component.displayName || Component.name})` in devtools by default, - // but can be given its own specific name - type MemoExoticComponent> = NamedExoticComponent> & { - readonly type: T; - }; - - /** - * Lets you skip re-rendering a component when its props are unchanged. - * - * @see {@link https://react.dev/reference/react/memo React Docs} - * - * @param Component The component to memoize. - * @param propsAreEqual A function that will be used to determine if the props have changed. - * - * @example - * - * ```tsx - * import { memo } from 'react'; - * - * const SomeComponent = memo(function SomeComponent(props: { foo: string }) { - * // ... - * }); - * ``` - */ - function memo

( - Component: FunctionComponent

, - propsAreEqual?: (prevProps: Readonly

, nextProps: Readonly

) => boolean, - ): NamedExoticComponent

; - function memo>( - Component: T, - propsAreEqual?: (prevProps: Readonly>, nextProps: Readonly>) => boolean, - ): MemoExoticComponent; - - interface LazyExoticComponent> - extends ExoticComponent> - { - readonly _result: T; - } - - /** - * Lets you defer loading a component’s code until it is rendered for the first time. - * - * @see {@link https://react.dev/reference/react/lazy React Docs} - * - * @param load A function that returns a `Promise` or another thenable (a `Promise`-like object with a - * then method). React will not call `load` until the first time you attempt to render the returned - * component. After React first calls load, it will wait for it to resolve, and then render the - * resolved value’s `.default` as a React component. Both the returned `Promise` and the `Promise`’s - * resolved value will be cached, so React will not call load more than once. If the `Promise` rejects, - * React will throw the rejection reason for the nearest Error Boundary to handle. - * - * @example - * - * ```tsx - * import { lazy } from 'react'; - * - * const MarkdownPreview = lazy(() => import('./MarkdownPreview.js')); - * ``` - */ - function lazy>( - load: () => Promise<{ default: T }>, - ): LazyExoticComponent; - - // - // React Hooks - // ---------------------------------------------------------------------- - - /** - * The instruction passed to a {@link Dispatch} function in {@link useState} - * to tell React what the next value of the {@link useState} should be. - * - * Often found wrapped in {@link Dispatch}. - * - * @template S The type of the state. - * - * @example - * - * ```tsx - * // This return type correctly represents the type of - * // `setCount` in the example below. - * const useCustomState = (): Dispatch> => { - * const [count, setCount] = useState(0); - * - * return setCount; - * } - * ``` - */ - type SetStateAction = S | ((prevState: S) => S); - - /** - * A function that can be used to update the state of a {@link useState} - * or {@link useReducer} hook. - */ - type Dispatch = (value: A) => void; - /** - * A {@link Dispatch} function can sometimes be called without any arguments. - */ - type DispatchWithoutAction = () => void; - // Limit the reducer to accept only 0 or 1 action arguments - // eslint-disable-next-line @definitelytyped/no-single-element-tuple-type - type AnyActionArg = [] | [any]; - // Get the dispatch type from the reducer arguments (captures optional action argument correctly) - type ActionDispatch = (...args: ActionArg) => void; - // Unlike redux, the actions _can_ be anything - type Reducer = (prevState: S, action: A) => S; - // If useReducer accepts a reducer without action, dispatch may be called without any parameters. - type ReducerWithoutAction = (prevState: S) => S; - // types used to try and prevent the compiler from reducing S - // to a supertype common with the second argument to useReducer() - type ReducerState> = R extends Reducer ? S : never; - type DependencyList = readonly unknown[]; - - // NOTE: callbacks are _only_ allowed to return either void, or a destructor. - type EffectCallback = () => void | Destructor; - - /** - * @deprecated Use `RefObject` instead. - */ - interface MutableRefObject { - current: T; - } - - // This will technically work if you give a Consumer or Provider but it's deprecated and warns - /** - * Accepts a context object (the value returned from `React.createContext`) and returns the current - * context value, as given by the nearest context provider for the given context. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useContext} - */ - function useContext(context: Context /*, (not public API) observedBits?: number|boolean */): T; - /** - * Returns a stateful value, and a function to update it. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useState} - */ - function useState(initialState: S | (() => S)): [S, Dispatch>]; - // convenience overload when first argument is omitted - /** - * Returns a stateful value, and a function to update it. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useState} - */ - function useState(): [S | undefined, Dispatch>]; - /** - * An alternative to `useState`. - * - * `useReducer` is usually preferable to `useState` when you have complex state logic that involves - * multiple sub-values. It also lets you optimize performance for components that trigger deep - * updates because you can pass `dispatch` down instead of callbacks. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useReducer} - */ - function useReducer( - reducer: (prevState: S, ...args: A) => S, - initialState: S, - ): [S, ActionDispatch]; - /** - * An alternative to `useState`. - * - * `useReducer` is usually preferable to `useState` when you have complex state logic that involves - * multiple sub-values. It also lets you optimize performance for components that trigger deep - * updates because you can pass `dispatch` down instead of callbacks. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useReducer} - */ - function useReducer( - reducer: (prevState: S, ...args: A) => S, - initialArg: I, - init: (i: I) => S, - ): [S, ActionDispatch]; - /** - * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument - * (`initialValue`). The returned object will persist for the full lifetime of the component. - * - * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable - * value around similar to how you’d use instance fields in classes. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useRef} - */ - function useRef(initialValue: T): RefObject; - // convenience overload for refs given as a ref prop as they typically start with a null value - /** - * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument - * (`initialValue`). The returned object will persist for the full lifetime of the component. - * - * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable - * value around similar to how you’d use instance fields in classes. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useRef} - */ - function useRef(initialValue: T | null): RefObject; - // convenience overload for undefined initialValue - /** - * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument - * (`initialValue`). The returned object will persist for the full lifetime of the component. - * - * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable - * value around similar to how you’d use instance fields in classes. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useRef} - */ - function useRef(initialValue: T | undefined): RefObject; - /** - * The signature is identical to `useEffect`, but it fires synchronously after all DOM mutations. - * Use this to read layout from the DOM and synchronously re-render. Updates scheduled inside - * `useLayoutEffect` will be flushed synchronously, before the browser has a chance to paint. - * - * Prefer the standard `useEffect` when possible to avoid blocking visual updates. - * - * If you’re migrating code from a class component, `useLayoutEffect` fires in the same phase as - * `componentDidMount` and `componentDidUpdate`. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useLayoutEffect} - */ - function useLayoutEffect(effect: EffectCallback, deps?: DependencyList): void; - /** - * Accepts a function that contains imperative, possibly effectful code. - * - * @param effect Imperative function that can return a cleanup function - * @param deps If present, effect will only activate if the values in the list change. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useEffect} - */ - function useEffect(effect: EffectCallback, deps?: DependencyList): void; - /** - * @see {@link https://react.dev/reference/react/useEffectEvent `useEffectEvent()` documentation} - * @version 19.2.0 - */ - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - export function useEffectEvent(callback: T): T; - // NOTE: this does not accept strings, but this will have to be fixed by removing strings from type Ref - /** - * `useImperativeHandle` customizes the instance value that is exposed to parent components when using - * `ref`. As always, imperative code using refs should be avoided in most cases. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useImperativeHandle} - */ - function useImperativeHandle(ref: Ref | undefined, init: () => R, deps?: DependencyList): void; - // I made 'inputs' required here and in useMemo as there's no point to memoizing without the memoization key - // useCallback(X) is identical to just using X, useMemo(() => Y) is identical to just using Y. - /** - * `useCallback` will return a memoized version of the callback that only changes if one of the `inputs` - * has changed. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useCallback} - */ - // A specific function type would not trigger implicit any. - // See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/52873#issuecomment-845806435 for a comparison between `Function` and more specific types. - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - function useCallback(callback: T, deps: DependencyList): T; - /** - * `useMemo` will only recompute the memoized value when one of the `deps` has changed. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useMemo} - */ - // allow undefined, but don't make it optional as that is very likely a mistake - function useMemo(factory: () => T, deps: DependencyList): T; - /** - * `useDebugValue` can be used to display a label for custom hooks in React DevTools. - * - * NOTE: We don’t recommend adding debug values to every custom hook. - * It’s most valuable for custom hooks that are part of shared libraries. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useDebugValue} - */ - // the name of the custom hook is itself derived from the function name at runtime: - // it's just the function name without the "use" prefix. - function useDebugValue(value: T, format?: (value: T) => any): void; - - export type TransitionFunction = () => VoidOrUndefinedOnly | Promise; - // strange definition to allow vscode to show documentation on the invocation - export interface TransitionStartFunction { - /** - * State updates caused inside the callback are allowed to be deferred. - * - * **If some state update causes a component to suspend, that state update should be wrapped in a transition.** - * - * @param callback A function which causes state updates that can be deferred. - */ - (callback: TransitionFunction): void; - } - - /** - * Returns a deferred version of the value that may “lag behind” it. - * - * This is commonly used to keep the interface responsive when you have something that renders immediately - * based on user input and something that needs to wait for a data fetch. - * - * A good example of this is a text input. - * - * @param value The value that is going to be deferred - * @param initialValue A value to use during the initial render of a component. If this option is omitted, `useDeferredValue` will not defer during the initial render, because there’s no previous version of `value` that it can render instead. - * - * @see {@link https://react.dev/reference/react/useDeferredValue} - */ - export function useDeferredValue(value: T, initialValue?: T): T; - - /** - * Allows components to avoid undesirable loading states by waiting for content to load - * before transitioning to the next screen. It also allows components to defer slower, - * data fetching updates until subsequent renders so that more crucial updates can be - * rendered immediately. - * - * The `useTransition` hook returns two values in an array. - * - * The first is a boolean, React’s way of informing us whether we’re waiting for the transition to finish. - * The second is a function that takes a callback. We can use it to tell React which state we want to defer. - * - * **If some state update causes a component to suspend, that state update should be wrapped in a transition.** - * - * @see {@link https://react.dev/reference/react/useTransition} - */ - export function useTransition(): [boolean, TransitionStartFunction]; - - /** - * Similar to `useTransition` but allows uses where hooks are not available. - * - * @param callback A function which causes state updates that can be deferred. - */ - export function startTransition(scope: TransitionFunction): void; - - /** - * Wrap any code rendering and triggering updates to your components into `act()` calls. - * - * Ensures that the behavior in your tests matches what happens in the browser - * more closely by executing pending `useEffect`s before returning. This also - * reduces the amount of re-renders done. - * - * @param callback A synchronous, void callback that will execute as a single, complete React commit. - * - * @see https://reactjs.org/blog/2019/02/06/react-v16.8.0.html#testing-hooks - */ - // NOTES - // - the order of these signatures matters - typescript will check the signatures in source order. - // If the `() => VoidOrUndefinedOnly` signature is first, it'll erroneously match a Promise returning function for users with - // `strictNullChecks: false`. - // - VoidOrUndefinedOnly is there to forbid any non-void return values for users with `strictNullChecks: true` - // While act does always return Thenable, if a void function is passed, we pretend the return value is also void to not trigger dangling Promise lint rules. - export function act(callback: () => VoidOrUndefinedOnly): void; - export function act(callback: () => T | Promise): Promise; - - export function useId(): string; - - /** - * @param effect Imperative function that can return a cleanup function - * @param deps If present, effect will only activate if the values in the list change. - * - * @see {@link https://github.com/facebook/react/pull/21913} - */ - export function useInsertionEffect(effect: EffectCallback, deps?: DependencyList): void; - - /** - * @param subscribe - * @param getSnapshot - * - * @see {@link https://github.com/reactwg/react-18/discussions/86} - */ - // keep in sync with `useSyncExternalStore` from `use-sync-external-store` - export function useSyncExternalStore( - subscribe: (onStoreChange: () => void) => () => void, - getSnapshot: () => Snapshot, - getServerSnapshot?: () => Snapshot, - ): Snapshot; - - export function useOptimistic( - passthrough: State, - ): [State, (action: State | ((pendingState: State) => State)) => void]; - export function useOptimistic( - passthrough: State, - reducer: (state: State, action: Action) => State, - ): [State, (action: Action) => void]; - - interface UntrackedReactPromise extends PromiseLike { - status?: void; - } - - export interface PendingReactPromise extends PromiseLike { - status: "pending"; - } - - export interface FulfilledReactPromise extends PromiseLike { - status: "fulfilled"; - value: T; - } - - export interface RejectedReactPromise extends PromiseLike { - status: "rejected"; - reason: unknown; - } - - export type ReactPromise = - | UntrackedReactPromise - | PendingReactPromise - | FulfilledReactPromise - | RejectedReactPromise; - - export type Usable = ReactPromise | Context; - - export function use(usable: Usable): T; - - export function useActionState( - action: (state: Awaited) => State | Promise, - initialState: Awaited, - permalink?: string, - ): [state: Awaited, dispatch: () => void, isPending: boolean]; - export function useActionState( - action: (state: Awaited, payload: Payload) => State | Promise, - initialState: Awaited, - permalink?: string, - ): [state: Awaited, dispatch: (payload: Payload) => void, isPending: boolean]; - - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - export function cache(fn: CachedFunction): CachedFunction; - - export interface CacheSignal {} - /** - * @version 19.2.0 - */ - export function cacheSignal(): null | CacheSignal; - - export interface ActivityProps { - /** - * @default "visible" - */ - mode?: - | "hidden" - | "visible" - | undefined; - /** - * A name for this Activity boundary for instrumentation purposes. - * The name will help identify this boundary in React DevTools. - */ - name?: string | undefined; - children: ReactNode; - } - - /** - * @see {@link https://react.dev/reference/react/Activity `` documentation} - * @version 19.2.0 - */ - export const Activity: ExoticComponent; - - /** - * Warning: Only available in development builds. - * - * @see {@link https://react.dev/reference/react/captureOwnerStack Reference docs} - * @version 19.1.0 - */ - function captureOwnerStack(): string | null; - - // - // Event System - // ---------------------------------------------------------------------- - // TODO: change any to unknown when moving to TS v3 - interface BaseSyntheticEvent { - nativeEvent: E; - currentTarget: C; - target: T; - bubbles: boolean; - cancelable: boolean; - defaultPrevented: boolean; - eventPhase: number; - isTrusted: boolean; - preventDefault(): void; - isDefaultPrevented(): boolean; - stopPropagation(): void; - isPropagationStopped(): boolean; - persist(): void; - timeStamp: number; - type: string; - } - - /** - * currentTarget - a reference to the element on which the event listener is registered. - * - * target - a reference to the element from which the event was originally dispatched. - * This might be a child element to the element on which the event listener is registered. - * If you thought this should be `EventTarget & T`, see https://github.com/DefinitelyTyped/DefinitelyTyped/issues/11508#issuecomment-256045682 - */ - interface SyntheticEvent extends BaseSyntheticEvent {} - - interface ClipboardEvent extends SyntheticEvent { - clipboardData: DataTransfer; - } - - interface CompositionEvent extends SyntheticEvent { - data: string; - } - - interface DragEvent extends MouseEvent { - dataTransfer: DataTransfer; - } - - interface PointerEvent extends MouseEvent { - pointerId: number; - pressure: number; - tangentialPressure: number; - tiltX: number; - tiltY: number; - twist: number; - width: number; - height: number; - pointerType: "mouse" | "pen" | "touch"; - isPrimary: boolean; - } - - interface FocusEvent extends SyntheticEvent { - relatedTarget: (EventTarget & RelatedTarget) | null; - target: EventTarget & Target; - } - - /** - * @deprecated FormEvent doesn't actually exist. - * You probably meant to use {@link ChangeEvent}, {@link InputEvent}, {@link SubmitEvent}, or just {@link SyntheticEvent} instead - * depending on the event type. - */ - interface FormEvent extends SyntheticEvent { - } - - interface InvalidEvent extends SyntheticEvent { - } - - /** - * change events bubble in React so their target is generally unknown. - * Only for form elements we know their target type because form events can't - * be nested. - * This type exists purely to narrow `target` for form elements. It doesn't - * reflect a DOM event. Change events are just fired as standard {@link SyntheticEvent}. - */ - interface ChangeEvent extends SyntheticEvent { - // TODO: This is wrong for change event handlers on arbitrary. Should - // be EventTarget & Target, but kept for backward compatibility until React 20. - target: EventTarget & CurrentTarget; - } - - interface InputEvent extends SyntheticEvent { - data: string; - } - - export type ModifierKey = - | "Alt" - | "AltGraph" - | "CapsLock" - | "Control" - | "Fn" - | "FnLock" - | "Hyper" - | "Meta" - | "NumLock" - | "ScrollLock" - | "Shift" - | "Super" - | "Symbol" - | "SymbolLock"; - - interface KeyboardEvent extends UIEvent { - altKey: boolean; - /** @deprecated */ - charCode: number; - ctrlKey: boolean; - code: string; - /** - * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method. - */ - getModifierState(key: ModifierKey): boolean; - /** - * See the [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#named-key-attribute-values). for possible values - */ - key: string; - /** @deprecated */ - keyCode: number; - locale: string; - location: number; - metaKey: boolean; - repeat: boolean; - shiftKey: boolean; - /** @deprecated */ - which: number; - } - - interface MouseEvent extends UIEvent { - altKey: boolean; - button: number; - buttons: number; - clientX: number; - clientY: number; - ctrlKey: boolean; - /** - * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method. - */ - getModifierState(key: ModifierKey): boolean; - metaKey: boolean; - movementX: number; - movementY: number; - pageX: number; - pageY: number; - relatedTarget: EventTarget | null; - screenX: number; - screenY: number; - shiftKey: boolean; - } - - interface SubmitEvent extends SyntheticEvent { - // Currently not exposed by Reat - // submitter: HTMLElement | null; - // SubmitEvents are always targetted at HTMLFormElements. - target: EventTarget & HTMLFormElement; - } - - interface TouchEvent extends UIEvent { - altKey: boolean; - changedTouches: TouchList; - ctrlKey: boolean; - /** - * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method. - */ - getModifierState(key: ModifierKey): boolean; - metaKey: boolean; - shiftKey: boolean; - targetTouches: TouchList; - touches: TouchList; - } - - interface UIEvent extends SyntheticEvent { - detail: number; - view: AbstractView; - } - - interface WheelEvent extends MouseEvent { - deltaMode: number; - deltaX: number; - deltaY: number; - deltaZ: number; - } - - interface AnimationEvent extends SyntheticEvent { - animationName: string; - elapsedTime: number; - pseudoElement: string; - } - - interface ToggleEvent extends SyntheticEvent { - oldState: "closed" | "open"; - newState: "closed" | "open"; - } - - interface TransitionEvent extends SyntheticEvent { - elapsedTime: number; - propertyName: string; - pseudoElement: string; - } - - // - // Event Handler Types - // ---------------------------------------------------------------------- - - type EventHandler> = { bivarianceHack(event: E): void }["bivarianceHack"]; - - type ReactEventHandler = EventHandler>; - - type ClipboardEventHandler = EventHandler>; - type CompositionEventHandler = EventHandler>; - type DragEventHandler = EventHandler>; - type FocusEventHandler = EventHandler>; - /** - * @deprecated FormEventHandler doesn't actually exist. - * You probably meant to use {@link ChangeEventHandler}, {@link InputEventHandler}, {@link SubmitEventHandler}, or just {@link EventHandler} instead - * depending on the event type. - */ - type FormEventHandler = EventHandler>; - type ChangeEventHandler = EventHandler< - ChangeEvent - >; - type InputEventHandler = EventHandler>; - type KeyboardEventHandler = EventHandler>; - type MouseEventHandler = EventHandler>; - type SubmitEventHandler = EventHandler>; - type TouchEventHandler = EventHandler>; - type PointerEventHandler = EventHandler>; - type UIEventHandler = EventHandler>; - type WheelEventHandler = EventHandler>; - type AnimationEventHandler = EventHandler>; - type ToggleEventHandler = EventHandler>; - type TransitionEventHandler = EventHandler>; - - // - // Props / DOM Attributes - // ---------------------------------------------------------------------- - - interface HTMLProps extends AllHTMLAttributes, ClassAttributes { - } - - type DetailedHTMLProps, T> = ClassAttributes & E; - - interface SVGProps extends SVGAttributes, ClassAttributes { - } - - interface SVGLineElementAttributes extends SVGProps {} - interface SVGTextElementAttributes extends SVGProps {} - - interface DOMAttributes { - children?: ReactNode | undefined; - dangerouslySetInnerHTML?: { - // Should be InnerHTML['innerHTML']. - // But unfortunately we're mixing renderer-specific type declarations. - __html: string | TrustedHTML; - } | undefined; - - // Clipboard Events - onCopy?: ClipboardEventHandler | undefined; - onCopyCapture?: ClipboardEventHandler | undefined; - onCut?: ClipboardEventHandler | undefined; - onCutCapture?: ClipboardEventHandler | undefined; - onPaste?: ClipboardEventHandler | undefined; - onPasteCapture?: ClipboardEventHandler | undefined; - - // Composition Events - onCompositionEnd?: CompositionEventHandler | undefined; - onCompositionEndCapture?: CompositionEventHandler | undefined; - onCompositionStart?: CompositionEventHandler | undefined; - onCompositionStartCapture?: CompositionEventHandler | undefined; - onCompositionUpdate?: CompositionEventHandler | undefined; - onCompositionUpdateCapture?: CompositionEventHandler | undefined; - - // Focus Events - onFocus?: FocusEventHandler | undefined; - onFocusCapture?: FocusEventHandler | undefined; - onBlur?: FocusEventHandler | undefined; - onBlurCapture?: FocusEventHandler | undefined; - - // form related Events - onChange?: ChangeEventHandler | undefined; - onChangeCapture?: ChangeEventHandler | undefined; - onBeforeInput?: InputEventHandler | undefined; - onBeforeInputCapture?: InputEventHandler | undefined; - onInput?: InputEventHandler | undefined; - onInputCapture?: InputEventHandler | undefined; - onReset?: ReactEventHandler | undefined; - onResetCapture?: ReactEventHandler | undefined; - onSubmit?: SubmitEventHandler | undefined; - onSubmitCapture?: SubmitEventHandler | undefined; - onInvalid?: ReactEventHandler | undefined; - onInvalidCapture?: ReactEventHandler | undefined; - - // Image Events - onLoad?: ReactEventHandler | undefined; - onLoadCapture?: ReactEventHandler | undefined; - onError?: ReactEventHandler | undefined; // also a Media Event - onErrorCapture?: ReactEventHandler | undefined; // also a Media Event - - // Keyboard Events - onKeyDown?: KeyboardEventHandler | undefined; - onKeyDownCapture?: KeyboardEventHandler | undefined; - /** @deprecated Use `onKeyUp` or `onKeyDown` instead */ - onKeyPress?: KeyboardEventHandler | undefined; - /** @deprecated Use `onKeyUpCapture` or `onKeyDownCapture` instead */ - onKeyPressCapture?: KeyboardEventHandler | undefined; - onKeyUp?: KeyboardEventHandler | undefined; - onKeyUpCapture?: KeyboardEventHandler | undefined; - - // Media Events - onAbort?: ReactEventHandler | undefined; - onAbortCapture?: ReactEventHandler | undefined; - onCanPlay?: ReactEventHandler | undefined; - onCanPlayCapture?: ReactEventHandler | undefined; - onCanPlayThrough?: ReactEventHandler | undefined; - onCanPlayThroughCapture?: ReactEventHandler | undefined; - onDurationChange?: ReactEventHandler | undefined; - onDurationChangeCapture?: ReactEventHandler | undefined; - onEmptied?: ReactEventHandler | undefined; - onEmptiedCapture?: ReactEventHandler | undefined; - onEncrypted?: ReactEventHandler | undefined; - onEncryptedCapture?: ReactEventHandler | undefined; - onEnded?: ReactEventHandler | undefined; - onEndedCapture?: ReactEventHandler | undefined; - onLoadedData?: ReactEventHandler | undefined; - onLoadedDataCapture?: ReactEventHandler | undefined; - onLoadedMetadata?: ReactEventHandler | undefined; - onLoadedMetadataCapture?: ReactEventHandler | undefined; - onLoadStart?: ReactEventHandler | undefined; - onLoadStartCapture?: ReactEventHandler | undefined; - onPause?: ReactEventHandler | undefined; - onPauseCapture?: ReactEventHandler | undefined; - onPlay?: ReactEventHandler | undefined; - onPlayCapture?: ReactEventHandler | undefined; - onPlaying?: ReactEventHandler | undefined; - onPlayingCapture?: ReactEventHandler | undefined; - onProgress?: ReactEventHandler | undefined; - onProgressCapture?: ReactEventHandler | undefined; - onRateChange?: ReactEventHandler | undefined; - onRateChangeCapture?: ReactEventHandler | undefined; - onSeeked?: ReactEventHandler | undefined; - onSeekedCapture?: ReactEventHandler | undefined; - onSeeking?: ReactEventHandler | undefined; - onSeekingCapture?: ReactEventHandler | undefined; - onStalled?: ReactEventHandler | undefined; - onStalledCapture?: ReactEventHandler | undefined; - onSuspend?: ReactEventHandler | undefined; - onSuspendCapture?: ReactEventHandler | undefined; - onTimeUpdate?: ReactEventHandler | undefined; - onTimeUpdateCapture?: ReactEventHandler | undefined; - onVolumeChange?: ReactEventHandler | undefined; - onVolumeChangeCapture?: ReactEventHandler | undefined; - onWaiting?: ReactEventHandler | undefined; - onWaitingCapture?: ReactEventHandler | undefined; - - // MouseEvents - onAuxClick?: MouseEventHandler | undefined; - onAuxClickCapture?: MouseEventHandler | undefined; - onClick?: MouseEventHandler | undefined; - onClickCapture?: MouseEventHandler | undefined; - onContextMenu?: MouseEventHandler | undefined; - onContextMenuCapture?: MouseEventHandler | undefined; - onDoubleClick?: MouseEventHandler | undefined; - onDoubleClickCapture?: MouseEventHandler | undefined; - onDrag?: DragEventHandler | undefined; - onDragCapture?: DragEventHandler | undefined; - onDragEnd?: DragEventHandler | undefined; - onDragEndCapture?: DragEventHandler | undefined; - onDragEnter?: DragEventHandler | undefined; - onDragEnterCapture?: DragEventHandler | undefined; - onDragExit?: DragEventHandler | undefined; - onDragExitCapture?: DragEventHandler | undefined; - onDragLeave?: DragEventHandler | undefined; - onDragLeaveCapture?: DragEventHandler | undefined; - onDragOver?: DragEventHandler | undefined; - onDragOverCapture?: DragEventHandler | undefined; - onDragStart?: DragEventHandler | undefined; - onDragStartCapture?: DragEventHandler | undefined; - onDrop?: DragEventHandler | undefined; - onDropCapture?: DragEventHandler | undefined; - onMouseDown?: MouseEventHandler | undefined; - onMouseDownCapture?: MouseEventHandler | undefined; - onMouseEnter?: MouseEventHandler | undefined; - onMouseLeave?: MouseEventHandler | undefined; - onMouseMove?: MouseEventHandler | undefined; - onMouseMoveCapture?: MouseEventHandler | undefined; - onMouseOut?: MouseEventHandler | undefined; - onMouseOutCapture?: MouseEventHandler | undefined; - onMouseOver?: MouseEventHandler | undefined; - onMouseOverCapture?: MouseEventHandler | undefined; - onMouseUp?: MouseEventHandler | undefined; - onMouseUpCapture?: MouseEventHandler | undefined; - - // Selection Events - onSelect?: ReactEventHandler | undefined; - onSelectCapture?: ReactEventHandler | undefined; - - // Touch Events - onTouchCancel?: TouchEventHandler | undefined; - onTouchCancelCapture?: TouchEventHandler | undefined; - onTouchEnd?: TouchEventHandler | undefined; - onTouchEndCapture?: TouchEventHandler | undefined; - onTouchMove?: TouchEventHandler | undefined; - onTouchMoveCapture?: TouchEventHandler | undefined; - onTouchStart?: TouchEventHandler | undefined; - onTouchStartCapture?: TouchEventHandler | undefined; - - // Pointer Events - onPointerDown?: PointerEventHandler | undefined; - onPointerDownCapture?: PointerEventHandler | undefined; - onPointerMove?: PointerEventHandler | undefined; - onPointerMoveCapture?: PointerEventHandler | undefined; - onPointerUp?: PointerEventHandler | undefined; - onPointerUpCapture?: PointerEventHandler | undefined; - onPointerCancel?: PointerEventHandler | undefined; - onPointerCancelCapture?: PointerEventHandler | undefined; - onPointerEnter?: PointerEventHandler | undefined; - onPointerLeave?: PointerEventHandler | undefined; - onPointerOver?: PointerEventHandler | undefined; - onPointerOverCapture?: PointerEventHandler | undefined; - onPointerOut?: PointerEventHandler | undefined; - onPointerOutCapture?: PointerEventHandler | undefined; - onGotPointerCapture?: PointerEventHandler | undefined; - onGotPointerCaptureCapture?: PointerEventHandler | undefined; - onLostPointerCapture?: PointerEventHandler | undefined; - onLostPointerCaptureCapture?: PointerEventHandler | undefined; - - // UI Events - onScroll?: UIEventHandler | undefined; - onScrollCapture?: UIEventHandler | undefined; - onScrollEnd?: UIEventHandler | undefined; - onScrollEndCapture?: UIEventHandler | undefined; - - // Wheel Events - onWheel?: WheelEventHandler | undefined; - onWheelCapture?: WheelEventHandler | undefined; - - // Animation Events - onAnimationStart?: AnimationEventHandler | undefined; - onAnimationStartCapture?: AnimationEventHandler | undefined; - onAnimationEnd?: AnimationEventHandler | undefined; - onAnimationEndCapture?: AnimationEventHandler | undefined; - onAnimationIteration?: AnimationEventHandler | undefined; - onAnimationIterationCapture?: AnimationEventHandler | undefined; - - // Toggle Events - onToggle?: ToggleEventHandler | undefined; - onBeforeToggle?: ToggleEventHandler | undefined; - - // Transition Events - onTransitionCancel?: TransitionEventHandler | undefined; - onTransitionCancelCapture?: TransitionEventHandler | undefined; - onTransitionEnd?: TransitionEventHandler | undefined; - onTransitionEndCapture?: TransitionEventHandler | undefined; - onTransitionRun?: TransitionEventHandler | undefined; - onTransitionRunCapture?: TransitionEventHandler | undefined; - onTransitionStart?: TransitionEventHandler | undefined; - onTransitionStartCapture?: TransitionEventHandler | undefined; - } - - export interface CSSProperties extends CSS.Properties { - /** - * The index signature was removed to enable closed typing for style - * using CSSType. You're able to use type assertion or module augmentation - * to add properties or an index signature of your own. - * - * For examples and more information, visit: - * https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors - */ - } - - // All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/ - interface AriaAttributes { - /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */ - "aria-activedescendant"?: string | undefined; - /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */ - "aria-atomic"?: Booleanish | undefined; - /** - * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be - * presented if they are made. - */ - "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined; - /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */ - /** - * Defines a string value that labels the current element, which is intended to be converted into Braille. - * @see aria-label. - */ - "aria-braillelabel"?: string | undefined; - /** - * Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. - * @see aria-roledescription. - */ - "aria-brailleroledescription"?: string | undefined; - "aria-busy"?: Booleanish | undefined; - /** - * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. - * @see aria-pressed @see aria-selected. - */ - "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined; - /** - * Defines the total number of columns in a table, grid, or treegrid. - * @see aria-colindex. - */ - "aria-colcount"?: number | undefined; - /** - * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. - * @see aria-colcount @see aria-colspan. - */ - "aria-colindex"?: number | undefined; - /** - * Defines a human readable text alternative of aria-colindex. - * @see aria-rowindextext. - */ - "aria-colindextext"?: string | undefined; - /** - * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. - * @see aria-colindex @see aria-rowspan. - */ - "aria-colspan"?: number | undefined; - /** - * Identifies the element (or elements) whose contents or presence are controlled by the current element. - * @see aria-owns. - */ - "aria-controls"?: string | undefined; - /** Indicates the element that represents the current item within a container or set of related elements. */ - "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined; - /** - * Identifies the element (or elements) that describes the object. - * @see aria-labelledby - */ - "aria-describedby"?: string | undefined; - /** - * Defines a string value that describes or annotates the current element. - * @see related aria-describedby. - */ - "aria-description"?: string | undefined; - /** - * Identifies the element that provides a detailed, extended description for the object. - * @see aria-describedby. - */ - "aria-details"?: string | undefined; - /** - * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. - * @see aria-hidden @see aria-readonly. - */ - "aria-disabled"?: Booleanish | undefined; - /** - * Indicates what functions can be performed when a dragged object is released on the drop target. - * @deprecated in ARIA 1.1 - */ - "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined; - /** - * Identifies the element that provides an error message for the object. - * @see aria-invalid @see aria-describedby. - */ - "aria-errormessage"?: string | undefined; - /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */ - "aria-expanded"?: Booleanish | undefined; - /** - * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, - * allows assistive technology to override the general default of reading in document source order. - */ - "aria-flowto"?: string | undefined; - /** - * Indicates an element's "grabbed" state in a drag-and-drop operation. - * @deprecated in ARIA 1.1 - */ - "aria-grabbed"?: Booleanish | undefined; - /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */ - "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined; - /** - * Indicates whether the element is exposed to an accessibility API. - * @see aria-disabled. - */ - "aria-hidden"?: Booleanish | undefined; - /** - * Indicates the entered value does not conform to the format expected by the application. - * @see aria-errormessage. - */ - "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined; - /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */ - "aria-keyshortcuts"?: string | undefined; - /** - * Defines a string value that labels the current element. - * @see aria-labelledby. - */ - "aria-label"?: string | undefined; - /** - * Identifies the element (or elements) that labels the current element. - * @see aria-describedby. - */ - "aria-labelledby"?: string | undefined; - /** Defines the hierarchical level of an element within a structure. */ - "aria-level"?: number | undefined; - /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */ - "aria-live"?: "off" | "assertive" | "polite" | undefined; - /** Indicates whether an element is modal when displayed. */ - "aria-modal"?: Booleanish | undefined; - /** Indicates whether a text box accepts multiple lines of input or only a single line. */ - "aria-multiline"?: Booleanish | undefined; - /** Indicates that the user may select more than one item from the current selectable descendants. */ - "aria-multiselectable"?: Booleanish | undefined; - /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */ - "aria-orientation"?: "horizontal" | "vertical" | undefined; - /** - * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship - * between DOM elements where the DOM hierarchy cannot be used to represent the relationship. - * @see aria-controls. - */ - "aria-owns"?: string | undefined; - /** - * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. - * A hint could be a sample value or a brief description of the expected format. - */ - "aria-placeholder"?: string | undefined; - /** - * Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. - * @see aria-setsize. - */ - "aria-posinset"?: number | undefined; - /** - * Indicates the current "pressed" state of toggle buttons. - * @see aria-checked @see aria-selected. - */ - "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined; - /** - * Indicates that the element is not editable, but is otherwise operable. - * @see aria-disabled. - */ - "aria-readonly"?: Booleanish | undefined; - /** - * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. - * @see aria-atomic. - */ - "aria-relevant"?: - | "additions" - | "additions removals" - | "additions text" - | "all" - | "removals" - | "removals additions" - | "removals text" - | "text" - | "text additions" - | "text removals" - | undefined; - /** Indicates that user input is required on the element before a form may be submitted. */ - "aria-required"?: Booleanish | undefined; - /** Defines a human-readable, author-localized description for the role of an element. */ - "aria-roledescription"?: string | undefined; - /** - * Defines the total number of rows in a table, grid, or treegrid. - * @see aria-rowindex. - */ - "aria-rowcount"?: number | undefined; - /** - * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. - * @see aria-rowcount @see aria-rowspan. - */ - "aria-rowindex"?: number | undefined; - /** - * Defines a human readable text alternative of aria-rowindex. - * @see aria-colindextext. - */ - "aria-rowindextext"?: string | undefined; - /** - * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. - * @see aria-rowindex @see aria-colspan. - */ - "aria-rowspan"?: number | undefined; - /** - * Indicates the current "selected" state of various widgets. - * @see aria-checked @see aria-pressed. - */ - "aria-selected"?: Booleanish | undefined; - /** - * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. - * @see aria-posinset. - */ - "aria-setsize"?: number | undefined; - /** Indicates if items in a table or grid are sorted in ascending or descending order. */ - "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined; - /** Defines the maximum allowed value for a range widget. */ - "aria-valuemax"?: number | undefined; - /** Defines the minimum allowed value for a range widget. */ - "aria-valuemin"?: number | undefined; - /** - * Defines the current value for a range widget. - * @see aria-valuetext. - */ - "aria-valuenow"?: number | undefined; - /** Defines the human readable text alternative of aria-valuenow for a range widget. */ - "aria-valuetext"?: string | undefined; - } - - // All the WAI-ARIA 1.1 role attribute values from https://www.w3.org/TR/wai-aria-1.1/#role_definitions - type AriaRole = - | "alert" - | "alertdialog" - | "application" - | "article" - | "banner" - | "button" - | "cell" - | "checkbox" - | "columnheader" - | "combobox" - | "complementary" - | "contentinfo" - | "definition" - | "dialog" - | "directory" - | "document" - | "feed" - | "figure" - | "form" - | "grid" - | "gridcell" - | "group" - | "heading" - | "img" - | "link" - | "list" - | "listbox" - | "listitem" - | "log" - | "main" - | "marquee" - | "math" - | "menu" - | "menubar" - | "menuitem" - | "menuitemcheckbox" - | "menuitemradio" - | "navigation" - | "none" - | "note" - | "option" - | "presentation" - | "progressbar" - | "radio" - | "radiogroup" - | "region" - | "row" - | "rowgroup" - | "rowheader" - | "scrollbar" - | "search" - | "searchbox" - | "separator" - | "slider" - | "spinbutton" - | "status" - | "switch" - | "tab" - | "table" - | "tablist" - | "tabpanel" - | "term" - | "textbox" - | "timer" - | "toolbar" - | "tooltip" - | "tree" - | "treegrid" - | "treeitem" - | (string & {}); - - interface HTMLAttributes extends AriaAttributes, DOMAttributes { - // React-specific Attributes - defaultChecked?: boolean | undefined; - defaultValue?: string | number | readonly string[] | undefined; - suppressContentEditableWarning?: boolean | undefined; - suppressHydrationWarning?: boolean | undefined; - - // Standard HTML Attributes - accessKey?: string | undefined; - autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}); - autoFocus?: boolean | undefined; - className?: string | undefined; - contentEditable?: Booleanish | "inherit" | "plaintext-only" | undefined; - contextMenu?: string | undefined; - dir?: string | undefined; - draggable?: Booleanish | undefined; - enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined; - hidden?: boolean | undefined; - id?: string | undefined; - lang?: string | undefined; - nonce?: string | undefined; - slot?: string | undefined; - spellCheck?: Booleanish | undefined; - style?: CSSProperties | undefined; - tabIndex?: number | undefined; - title?: string | undefined; - translate?: "yes" | "no" | undefined; - - // Unknown - radioGroup?: string | undefined; // , - - // WAI-ARIA - role?: AriaRole | undefined; - - // RDFa Attributes - about?: string | undefined; - content?: string | undefined; - datatype?: string | undefined; - inlist?: any; - prefix?: string | undefined; - property?: string | undefined; - rel?: string | undefined; - resource?: string | undefined; - rev?: string | undefined; - typeof?: string | undefined; - vocab?: string | undefined; - - // Non-standard Attributes - autoCorrect?: string | undefined; - autoSave?: string | undefined; - color?: string | undefined; - itemProp?: string | undefined; - itemScope?: boolean | undefined; - itemType?: string | undefined; - itemID?: string | undefined; - itemRef?: string | undefined; - results?: number | undefined; - security?: string | undefined; - unselectable?: "on" | "off" | undefined; - - // Popover API - popover?: "" | "auto" | "manual" | "hint" | undefined; - popoverTargetAction?: "toggle" | "show" | "hide" | undefined; - popoverTarget?: string | undefined; - - // Living Standard - /** - * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert - */ - inert?: boolean | undefined; - /** - * Hints at the type of data that might be entered by the user while editing the element or its contents - * @see {@link https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute} - */ - inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined; - /** - * Specify that a standard HTML element should behave like a defined custom built-in element - * @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is} - */ - is?: string | undefined; - /** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts} - */ - exportparts?: string | undefined; - /** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part} - */ - part?: string | undefined; - } - - /** - * For internal usage only. - * Different release channels declare additional types of ReactNode this particular release channel accepts. - * App or library types should never augment this interface. - */ - interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS {} - - interface AllHTMLAttributes extends HTMLAttributes { - // Standard HTML Attributes - accept?: string | undefined; - acceptCharset?: string | undefined; - action?: - | string - | undefined - | ((formData: FormData) => void | Promise) - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS - ]; - allowFullScreen?: boolean | undefined; - allowTransparency?: boolean | undefined; - alt?: string | undefined; - as?: string | undefined; - async?: boolean | undefined; - autoComplete?: string | undefined; - autoPlay?: boolean | undefined; - capture?: boolean | "user" | "environment" | undefined; - cellPadding?: number | string | undefined; - cellSpacing?: number | string | undefined; - charSet?: string | undefined; - challenge?: string | undefined; - checked?: boolean | undefined; - cite?: string | undefined; - classID?: string | undefined; - cols?: number | undefined; - colSpan?: number | undefined; - controls?: boolean | undefined; - coords?: string | undefined; - crossOrigin?: CrossOrigin; - data?: string | undefined; - dateTime?: string | undefined; - default?: boolean | undefined; - defer?: boolean | undefined; - disabled?: boolean | undefined; - download?: any; - encType?: string | undefined; - form?: string | undefined; - formAction?: - | string - | undefined - | ((formData: FormData) => void | Promise) - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS - ]; - formEncType?: string | undefined; - formMethod?: string | undefined; - formNoValidate?: boolean | undefined; - formTarget?: string | undefined; - frameBorder?: number | string | undefined; - headers?: string | undefined; - height?: number | string | undefined; - high?: number | undefined; - href?: string | undefined; - hrefLang?: string | undefined; - htmlFor?: string | undefined; - httpEquiv?: string | undefined; - integrity?: string | undefined; - keyParams?: string | undefined; - keyType?: string | undefined; - kind?: string | undefined; - label?: string | undefined; - list?: string | undefined; - loop?: boolean | undefined; - low?: number | undefined; - manifest?: string | undefined; - marginHeight?: number | undefined; - marginWidth?: number | undefined; - max?: number | string | undefined; - maxLength?: number | undefined; - media?: string | undefined; - mediaGroup?: string | undefined; - method?: string | undefined; - min?: number | string | undefined; - minLength?: number | undefined; - multiple?: boolean | undefined; - muted?: boolean | undefined; - name?: string | undefined; - noValidate?: boolean | undefined; - open?: boolean | undefined; - optimum?: number | undefined; - pattern?: string | undefined; - placeholder?: string | undefined; - playsInline?: boolean | undefined; - poster?: string | undefined; - preload?: string | undefined; - readOnly?: boolean | undefined; - required?: boolean | undefined; - reversed?: boolean | undefined; - rows?: number | undefined; - rowSpan?: number | undefined; - sandbox?: string | undefined; - scope?: string | undefined; - scoped?: boolean | undefined; - scrolling?: string | undefined; - seamless?: boolean | undefined; - selected?: boolean | undefined; - shape?: string | undefined; - size?: number | undefined; - sizes?: string | undefined; - span?: number | undefined; - src?: string | undefined; - srcDoc?: string | undefined; - srcLang?: string | undefined; - srcSet?: string | undefined; - start?: number | undefined; - step?: number | string | undefined; - summary?: string | undefined; - target?: string | undefined; - type?: string | undefined; - useMap?: string | undefined; - value?: string | readonly string[] | number | undefined; - width?: number | string | undefined; - wmode?: string | undefined; - wrap?: string | undefined; - } - - type HTMLAttributeReferrerPolicy = - | "" - | "no-referrer" - | "no-referrer-when-downgrade" - | "origin" - | "origin-when-cross-origin" - | "same-origin" - | "strict-origin" - | "strict-origin-when-cross-origin" - | "unsafe-url"; - - type HTMLAttributeAnchorTarget = - | "_self" - | "_blank" - | "_parent" - | "_top" - | (string & {}); - - interface AnchorHTMLAttributes extends HTMLAttributes { - download?: any; - href?: string | undefined; - hrefLang?: string | undefined; - media?: string | undefined; - ping?: string | undefined; - target?: HTMLAttributeAnchorTarget | undefined; - type?: string | undefined; - referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; - } - - interface AudioHTMLAttributes extends MediaHTMLAttributes {} - - interface AreaHTMLAttributes extends HTMLAttributes { - alt?: string | undefined; - coords?: string | undefined; - download?: any; - href?: string | undefined; - hrefLang?: string | undefined; - media?: string | undefined; - referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; - shape?: string | undefined; - target?: string | undefined; - } - - interface BaseHTMLAttributes extends HTMLAttributes { - href?: string | undefined; - target?: string | undefined; - } - - interface BlockquoteHTMLAttributes extends HTMLAttributes { - cite?: string | undefined; - } - - interface ButtonHTMLAttributes extends HTMLAttributes { - disabled?: boolean | undefined; - form?: string | undefined; - formAction?: - | string - | ((formData: FormData) => void | Promise) - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS - ] - | undefined; - formEncType?: string | undefined; - formMethod?: string | undefined; - formNoValidate?: boolean | undefined; - formTarget?: string | undefined; - name?: string | undefined; - type?: "submit" | "reset" | "button" | undefined; - value?: string | readonly string[] | number | undefined; - } - - interface CanvasHTMLAttributes extends HTMLAttributes { - height?: number | string | undefined; - width?: number | string | undefined; - } - - interface ColHTMLAttributes extends HTMLAttributes { - span?: number | undefined; - width?: number | string | undefined; - } - - interface ColgroupHTMLAttributes extends HTMLAttributes { - span?: number | undefined; - } - - interface DataHTMLAttributes extends HTMLAttributes { - value?: string | readonly string[] | number | undefined; - } - - interface DetailsHTMLAttributes extends HTMLAttributes { - open?: boolean | undefined; - name?: string | undefined; - } - - interface DelHTMLAttributes extends HTMLAttributes { - cite?: string | undefined; - dateTime?: string | undefined; - } - - interface DialogHTMLAttributes extends HTMLAttributes { - closedby?: "any" | "closerequest" | "none" | undefined; - onCancel?: ReactEventHandler | undefined; - onClose?: ReactEventHandler | undefined; - open?: boolean | undefined; - } - - interface EmbedHTMLAttributes extends HTMLAttributes { - height?: number | string | undefined; - src?: string | undefined; - type?: string | undefined; - width?: number | string | undefined; - } - - interface FieldsetHTMLAttributes extends HTMLAttributes { - disabled?: boolean | undefined; - form?: string | undefined; - name?: string | undefined; - } - - interface FormHTMLAttributes extends HTMLAttributes { - acceptCharset?: string | undefined; - action?: - | string - | undefined - | ((formData: FormData) => void | Promise) - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS - ]; - autoComplete?: string | undefined; - encType?: string | undefined; - method?: string | undefined; - name?: string | undefined; - noValidate?: boolean | undefined; - target?: string | undefined; - } - - interface HtmlHTMLAttributes extends HTMLAttributes { - manifest?: string | undefined; - } - - interface IframeHTMLAttributes extends HTMLAttributes { - allow?: string | undefined; - allowFullScreen?: boolean | undefined; - allowTransparency?: boolean | undefined; - /** @deprecated */ - frameBorder?: number | string | undefined; - height?: number | string | undefined; - loading?: "eager" | "lazy" | undefined; - /** @deprecated */ - marginHeight?: number | undefined; - /** @deprecated */ - marginWidth?: number | undefined; - name?: string | undefined; - referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; - sandbox?: string | undefined; - /** @deprecated */ - scrolling?: string | undefined; - seamless?: boolean | undefined; - src?: string | undefined; - srcDoc?: string | undefined; - width?: number | string | undefined; - } - - interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES {} - - interface ImgHTMLAttributes extends HTMLAttributes { - alt?: string | undefined; - crossOrigin?: CrossOrigin; - decoding?: "async" | "auto" | "sync" | undefined; - fetchPriority?: "high" | "low" | "auto"; - height?: number | string | undefined; - loading?: "eager" | "lazy" | undefined; - referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; - sizes?: string | undefined; - src?: - | string - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES - ] - | undefined; - srcSet?: string | undefined; - useMap?: string | undefined; - width?: number | string | undefined; - } - - interface InsHTMLAttributes extends HTMLAttributes { - cite?: string | undefined; - dateTime?: string | undefined; - } - - type HTMLInputTypeAttribute = - | "button" - | "checkbox" - | "color" - | "date" - | "datetime-local" - | "email" - | "file" - | "hidden" - | "image" - | "month" - | "number" - | "password" - | "radio" - | "range" - | "reset" - | "search" - | "submit" - | "tel" - | "text" - | "time" - | "url" - | "week" - | (string & {}); - - type AutoFillAddressKind = "billing" | "shipping"; - type AutoFillBase = "" | "off" | "on"; - type AutoFillContactField = - | "email" - | "tel" - | "tel-area-code" - | "tel-country-code" - | "tel-extension" - | "tel-local" - | "tel-local-prefix" - | "tel-local-suffix" - | "tel-national"; - type AutoFillContactKind = "home" | "mobile" | "work"; - type AutoFillCredentialField = "webauthn"; - type AutoFillNormalField = - | "additional-name" - | "address-level1" - | "address-level2" - | "address-level3" - | "address-level4" - | "address-line1" - | "address-line2" - | "address-line3" - | "bday-day" - | "bday-month" - | "bday-year" - | "cc-csc" - | "cc-exp" - | "cc-exp-month" - | "cc-exp-year" - | "cc-family-name" - | "cc-given-name" - | "cc-name" - | "cc-number" - | "cc-type" - | "country" - | "country-name" - | "current-password" - | "family-name" - | "given-name" - | "honorific-prefix" - | "honorific-suffix" - | "name" - | "new-password" - | "one-time-code" - | "organization" - | "postal-code" - | "street-address" - | "transaction-amount" - | "transaction-currency" - | "username"; - type OptionalPrefixToken = `${T} ` | ""; - type OptionalPostfixToken = ` ${T}` | ""; - type AutoFillField = AutoFillNormalField | `${OptionalPrefixToken}${AutoFillContactField}`; - type AutoFillSection = `section-${string}`; - type AutoFill = - | AutoFillBase - | `${OptionalPrefixToken}${OptionalPrefixToken< - AutoFillAddressKind - >}${AutoFillField}${OptionalPostfixToken}`; - type HTMLInputAutoCompleteAttribute = AutoFill | (string & {}); - - interface InputHTMLAttributes extends HTMLAttributes { - accept?: string | undefined; - alt?: string | undefined; - autoComplete?: HTMLInputAutoCompleteAttribute | undefined; - capture?: boolean | "user" | "environment" | undefined; // https://www.w3.org/TR/html-media-capture/#the-capture-attribute - checked?: boolean | undefined; - disabled?: boolean | undefined; - form?: string | undefined; - formAction?: - | string - | ((formData: FormData) => void | Promise) - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS - ] - | undefined; - formEncType?: string | undefined; - formMethod?: string | undefined; - formNoValidate?: boolean | undefined; - formTarget?: string | undefined; - height?: number | string | undefined; - list?: string | undefined; - max?: number | string | undefined; - maxLength?: number | undefined; - min?: number | string | undefined; - minLength?: number | undefined; - multiple?: boolean | undefined; - name?: string | undefined; - pattern?: string | undefined; - placeholder?: string | undefined; - readOnly?: boolean | undefined; - required?: boolean | undefined; - size?: number | undefined; - src?: string | undefined; - step?: number | string | undefined; - type?: HTMLInputTypeAttribute | undefined; - value?: string | readonly string[] | number | undefined; - width?: number | string | undefined; - - // No other element dispatching change events can be nested in a - // so we know the target will be a HTMLInputElement. - onChange?: ChangeEventHandler | undefined; - } - - interface KeygenHTMLAttributes extends HTMLAttributes { - challenge?: string | undefined; - disabled?: boolean | undefined; - form?: string | undefined; - keyType?: string | undefined; - keyParams?: string | undefined; - name?: string | undefined; - } - - interface LabelHTMLAttributes extends HTMLAttributes { - form?: string | undefined; - htmlFor?: string | undefined; - } - - interface LiHTMLAttributes extends HTMLAttributes { - value?: string | readonly string[] | number | undefined; - } - - interface LinkHTMLAttributes extends HTMLAttributes { - as?: string | undefined; - blocking?: "render" | (string & {}) | undefined; - crossOrigin?: CrossOrigin; - fetchPriority?: "high" | "low" | "auto"; - href?: string | undefined; - hrefLang?: string | undefined; - integrity?: string | undefined; - media?: string | undefined; - imageSrcSet?: string | undefined; - imageSizes?: string | undefined; - referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; - sizes?: string | undefined; - type?: string | undefined; - charSet?: string | undefined; - - // React props - precedence?: string | undefined; - } - - interface MapHTMLAttributes extends HTMLAttributes { - name?: string | undefined; - } - - interface MenuHTMLAttributes extends HTMLAttributes { - type?: string | undefined; - } - - interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES {} - - interface MediaHTMLAttributes extends HTMLAttributes { - autoPlay?: boolean | undefined; - controls?: boolean | undefined; - controlsList?: string | undefined; - crossOrigin?: CrossOrigin; - loop?: boolean | undefined; - mediaGroup?: string | undefined; - muted?: boolean | undefined; - playsInline?: boolean | undefined; - preload?: string | undefined; - src?: - | string - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES - ] - | undefined; - } - - interface MetaHTMLAttributes extends HTMLAttributes { - charSet?: string | undefined; - content?: string | undefined; - httpEquiv?: string | undefined; - media?: string | undefined; - name?: string | undefined; - } - - interface MeterHTMLAttributes extends HTMLAttributes { - form?: string | undefined; - high?: number | undefined; - low?: number | undefined; - max?: number | string | undefined; - min?: number | string | undefined; - optimum?: number | undefined; - value?: string | readonly string[] | number | undefined; - } - - interface QuoteHTMLAttributes extends HTMLAttributes { - cite?: string | undefined; - } - - interface ObjectHTMLAttributes extends HTMLAttributes { - classID?: string | undefined; - data?: string | undefined; - form?: string | undefined; - height?: number | string | undefined; - name?: string | undefined; - type?: string | undefined; - useMap?: string | undefined; - width?: number | string | undefined; - wmode?: string | undefined; - } - - interface OlHTMLAttributes extends HTMLAttributes { - reversed?: boolean | undefined; - start?: number | undefined; - type?: "1" | "a" | "A" | "i" | "I" | undefined; - } - - interface OptgroupHTMLAttributes extends HTMLAttributes { - disabled?: boolean | undefined; - label?: string | undefined; - } - - interface OptionHTMLAttributes extends HTMLAttributes { - disabled?: boolean | undefined; - label?: string | undefined; - selected?: boolean | undefined; - value?: string | readonly string[] | number | undefined; - } - - interface OutputHTMLAttributes extends HTMLAttributes { - form?: string | undefined; - htmlFor?: string | undefined; - name?: string | undefined; - } - - interface ParamHTMLAttributes extends HTMLAttributes { - name?: string | undefined; - value?: string | readonly string[] | number | undefined; - } - - interface ProgressHTMLAttributes extends HTMLAttributes { - max?: number | string | undefined; - value?: string | readonly string[] | number | undefined; - } - - interface SlotHTMLAttributes extends HTMLAttributes { - name?: string | undefined; - } - - interface ScriptHTMLAttributes extends HTMLAttributes { - async?: boolean | undefined; - blocking?: "render" | (string & {}) | undefined; - /** @deprecated */ - charSet?: string | undefined; - crossOrigin?: CrossOrigin; - defer?: boolean | undefined; - fetchPriority?: "high" | "low" | "auto" | undefined; - integrity?: string | undefined; - noModule?: boolean | undefined; - referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; - src?: string | undefined; - type?: string | undefined; - } - - interface SelectHTMLAttributes extends HTMLAttributes { - autoComplete?: string | undefined; - disabled?: boolean | undefined; - form?: string | undefined; - multiple?: boolean | undefined; - name?: string | undefined; - required?: boolean | undefined; - size?: number | undefined; - value?: string | readonly string[] | number | undefined; - // No other element dispatching change events can be nested in a - // so we know the target will be a HTMLInputElement. - onChange?: ChangeEventHandler | undefined; - } - - interface KeygenHTMLAttributes extends HTMLAttributes { - challenge?: string | undefined; - disabled?: boolean | undefined; - form?: string | undefined; - keyType?: string | undefined; - keyParams?: string | undefined; - name?: string | undefined; - } - - interface LabelHTMLAttributes extends HTMLAttributes { - form?: string | undefined; - htmlFor?: string | undefined; - } - - interface LiHTMLAttributes extends HTMLAttributes { - value?: string | readonly string[] | number | undefined; - } - - interface LinkHTMLAttributes extends HTMLAttributes { - as?: string | undefined; - blocking?: "render" | (string & {}) | undefined; - crossOrigin?: CrossOrigin; - fetchPriority?: "high" | "low" | "auto"; - href?: string | undefined; - hrefLang?: string | undefined; - integrity?: string | undefined; - media?: string | undefined; - imageSrcSet?: string | undefined; - imageSizes?: string | undefined; - referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; - sizes?: string | undefined; - type?: string | undefined; - charSet?: string | undefined; - - // React props - precedence?: string | undefined; - } - - interface MapHTMLAttributes extends HTMLAttributes { - name?: string | undefined; - } - - interface MenuHTMLAttributes extends HTMLAttributes { - type?: string | undefined; - } - - interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES {} - - interface MediaHTMLAttributes extends HTMLAttributes { - autoPlay?: boolean | undefined; - controls?: boolean | undefined; - controlsList?: string | undefined; - crossOrigin?: CrossOrigin; - loop?: boolean | undefined; - mediaGroup?: string | undefined; - muted?: boolean | undefined; - playsInline?: boolean | undefined; - preload?: string | undefined; - src?: - | string - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES - ] - | undefined; - } - - interface MetaHTMLAttributes extends HTMLAttributes { - charSet?: string | undefined; - content?: string | undefined; - httpEquiv?: string | undefined; - media?: string | undefined; - name?: string | undefined; - } - - interface MeterHTMLAttributes extends HTMLAttributes { - form?: string | undefined; - high?: number | undefined; - low?: number | undefined; - max?: number | string | undefined; - min?: number | string | undefined; - optimum?: number | undefined; - value?: string | readonly string[] | number | undefined; - } - - interface QuoteHTMLAttributes extends HTMLAttributes { - cite?: string | undefined; - } - - interface ObjectHTMLAttributes extends HTMLAttributes { - classID?: string | undefined; - data?: string | undefined; - form?: string | undefined; - height?: number | string | undefined; - name?: string | undefined; - type?: string | undefined; - useMap?: string | undefined; - width?: number | string | undefined; - wmode?: string | undefined; - } - - interface OlHTMLAttributes extends HTMLAttributes { - reversed?: boolean | undefined; - start?: number | undefined; - type?: "1" | "a" | "A" | "i" | "I" | undefined; - } - - interface OptgroupHTMLAttributes extends HTMLAttributes { - disabled?: boolean | undefined; - label?: string | undefined; - } - - interface OptionHTMLAttributes extends HTMLAttributes { - disabled?: boolean | undefined; - label?: string | undefined; - selected?: boolean | undefined; - value?: string | readonly string[] | number | undefined; - } - - interface OutputHTMLAttributes extends HTMLAttributes { - form?: string | undefined; - htmlFor?: string | undefined; - name?: string | undefined; - } - - interface ParamHTMLAttributes extends HTMLAttributes { - name?: string | undefined; - value?: string | readonly string[] | number | undefined; - } - - interface ProgressHTMLAttributes extends HTMLAttributes { - max?: number | string | undefined; - value?: string | readonly string[] | number | undefined; - } - - interface SlotHTMLAttributes extends HTMLAttributes { - name?: string | undefined; - } - - interface ScriptHTMLAttributes extends HTMLAttributes { - async?: boolean | undefined; - blocking?: "render" | (string & {}) | undefined; - /** @deprecated */ - charSet?: string | undefined; - crossOrigin?: CrossOrigin; - defer?: boolean | undefined; - fetchPriority?: "high" | "low" | "auto" | undefined; - integrity?: string | undefined; - noModule?: boolean | undefined; - referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; - src?: string | undefined; - type?: string | undefined; - } - - interface SelectHTMLAttributes extends HTMLAttributes { - autoComplete?: string | undefined; - disabled?: boolean | undefined; - form?: string | undefined; - multiple?: boolean | undefined; - name?: string | undefined; - required?: boolean | undefined; - size?: number | undefined; - value?: string | readonly string[] | number | undefined; - // No other element dispatching change events can be nested in a