This commit is contained in:
root
2025-11-25 09:56:15 +03:00
commit 68c8f0e80d
23717 changed files with 3200521 additions and 0 deletions

View File

@ -0,0 +1 @@
export default false

View File

@ -0,0 +1 @@
export default typeof document !== 'undefined'

View File

@ -0,0 +1 @@
export default true

View File

@ -0,0 +1,21 @@
import * as React from 'react'
import isBrowser from '#is-browser'
const syncFallback = <T>(create: () => T) => create()
const useInsertionEffect = React[
('useInsertion' + 'Effect') as 'useInsertionEffect'
]
? (React[('useInsertion' + 'Effect') as 'useInsertionEffect'] as <T>(
create: () => T
) => T | undefined)
: false
export const useInsertionEffectAlwaysWithSyncFallback: <T>(
create: () => T
) => T | undefined = !isBrowser
? syncFallback
: useInsertionEffect || syncFallback
export const useInsertionEffectWithLayoutFallback: typeof React.useLayoutEffect =
useInsertionEffect || React.useLayoutEffect