rm @types/react resolution from bad rebase

This commit is contained in:
Samuel Newman
2025-09-11 12:21:05 +03:00
parent a99fae861e
commit 9847f7338e
4 changed files with 452 additions and 416 deletions
+1 -2
View File
@@ -178,7 +178,7 @@
"patch-package": "^6.5.1", "patch-package": "^6.5.1",
"postinstall-postinstall": "^2.1.0", "postinstall-postinstall": "^2.1.0",
"psl": "^1.9.0", "psl": "^1.9.0",
"radix-ui": "^1.2.0", "radix-ui": "^1.4.3",
"react": "19.1.0", "react": "19.1.0",
"react-compiler-runtime": "^19.1.0-rc.1", "react-compiler-runtime": "^19.1.0-rc.1",
"react-dom": "19.1.0", "react-dom": "19.1.0",
@@ -283,7 +283,6 @@
"@expo/image-utils": "0.6.3", "@expo/image-utils": "0.6.3",
"@react-native/babel-preset": "0.81.4", "@react-native/babel-preset": "0.81.4",
"@react-native/normalize-colors": "0.81.4", "@react-native/normalize-colors": "0.81.4",
"@types/react": "^18",
"**/expo-constants": "17.0.3", "**/expo-constants": "17.0.3",
"**/expo-device": "7.1.4", "**/expo-device": "7.1.4",
"**/zod": "3.23.8", "**/zod": "3.23.8",
+3 -5
View File
@@ -2,8 +2,6 @@ import {
Children, Children,
cloneElement, cloneElement,
isValidElement, isValidElement,
type ReactElement,
type ReactNode,
useCallback, useCallback,
useEffect, useEffect,
useMemo, useMemo,
@@ -26,7 +24,7 @@ import {useA11y} from '#/state/a11y'
* screen reader support is enabled. THIS SHOULD BE USED SPARINGLY, only when * screen reader support is enabled. THIS SHOULD BE USED SPARINGLY, only when
* no better option is available. * no better option is available.
*/ */
export function FocusScope({children}: {children: ReactNode}) { export function FocusScope({children}: {children: React.ReactNode}) {
const {screenReaderEnabled} = useA11y() const {screenReaderEnabled} = useA11y()
return screenReaderEnabled ? <FocusTrap>{children}</FocusTrap> : children return screenReaderEnabled ? <FocusTrap>{children}</FocusTrap> : children
@@ -41,7 +39,7 @@ export function FocusScope({children}: {children: ReactNode}) {
* they have reached the start or end of the content and tell them how to * they have reached the start or end of the content and tell them how to
* remain within the active content section. * remain within the active content section.
*/ */
function FocusTrap({children}: {children: ReactNode}) { function FocusTrap({children}: {children: React.ReactNode}) {
const {_} = useLingui() const {_} = useLingui()
const child = useRef<View>(null) const child = useRef<View>(null)
@@ -53,7 +51,7 @@ function FocusTrap({children}: {children: ReactNode}) {
const decoratedChildren = useMemo(() => { const decoratedChildren = useMemo(() => {
return Children.toArray(children).map((node, i) => { return Children.toArray(children).map((node, i) => {
if (i === 0 && isValidElement(node)) { if (i === 0 && isValidElement(node)) {
const n = node as ReactElement<any> const n = node as React.ReactElement<any>
if (n.props.ref !== undefined) { if (n.props.ref !== undefined) {
throw new Error( throw new Error(
'FocusScope needs to override the ref on its first child.', 'FocusScope needs to override the ref on its first child.',
+1 -2
View File
@@ -1,4 +1,3 @@
import {type ReactNode} from 'react'
import {FocusScope as RadixFocusScope} from 'radix-ui/internal' import {FocusScope as RadixFocusScope} from 'radix-ui/internal'
/* /*
@@ -6,7 +5,7 @@ import {FocusScope as RadixFocusScope} from 'radix-ui/internal'
* use this in Dialogs and such already. It's here as a convenient counterpart * use this in Dialogs and such already. It's here as a convenient counterpart
* to the hacky native solution. * to the hacky native solution.
*/ */
export function FocusScope({children}: {children: ReactNode}) { export function FocusScope({children}: {children: React.ReactNode}) {
return ( return (
<RadixFocusScope.FocusScope loop asChild trapped> <RadixFocusScope.FocusScope loop asChild trapped>
{children} {children}
+447 -407
View File
File diff suppressed because it is too large Load Diff