2025-05-09 19:05:31 +07:00
|
|
|
import { byDependencies, byName, byProps, looseDeps, preferExports } from '@revenge-mod/modules/finders/filters'
|
2025-05-18 22:24:48 +07:00
|
|
|
import { lookupModule } from '@revenge-mod/modules/finders/lookup'
|
2025-05-08 18:53:30 +07:00
|
|
|
import { proxify } from '@revenge-mod/utils/proxy'
|
|
|
|
|
|
2025-05-18 22:24:48 +07:00
|
|
|
const [, _createClassModuleId] = lookupModule(byName('_createClass'))
|
|
|
|
|
const [, _classCallCheckModuleId] = lookupModule(byName('_classCallCheck'))
|
2025-05-08 18:53:30 +07:00
|
|
|
|
|
|
|
|
export let ReactNavigationNative: typeof import('@react-navigation/native') = proxify(
|
|
|
|
|
() => {
|
2025-05-18 22:24:48 +07:00
|
|
|
const [module] = lookupModule(
|
2025-05-09 19:05:31 +07:00
|
|
|
preferExports(
|
2025-05-08 18:53:30 +07:00
|
|
|
byProps<typeof ReactNavigationNative>('useLinkTo'),
|
|
|
|
|
byDependencies(looseDeps([[], looseDeps([[_createClassModuleId, _classCallCheckModuleId]])])),
|
|
|
|
|
),
|
|
|
|
|
{
|
|
|
|
|
includeUninitialized: true,
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
|
2025-05-08 23:43:25 +07:00
|
|
|
if (module) return (ReactNavigationNative = module)
|
2025-05-08 18:53:30 +07:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
hint: 'object',
|
|
|
|
|
},
|
|
|
|
|
)!
|
|
|
|
|
|
|
|
|
|
export let ReactNavigationStack: typeof import('@react-navigation/stack') = proxify(
|
|
|
|
|
() => {
|
2025-05-18 22:24:48 +07:00
|
|
|
const [module] = lookupModule(
|
2025-05-09 19:05:31 +07:00
|
|
|
preferExports(
|
2025-05-08 18:53:30 +07:00
|
|
|
byProps<typeof ReactNavigationStack>('createStackNavigator'),
|
|
|
|
|
byDependencies(looseDeps([[], looseDeps([[_createClassModuleId, _classCallCheckModuleId]])])),
|
|
|
|
|
),
|
|
|
|
|
{
|
|
|
|
|
includeUninitialized: true,
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
|
2025-05-08 23:43:25 +07:00
|
|
|
if (module) return (ReactNavigationStack = module)
|
2025-05-08 18:53:30 +07:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
hint: 'object',
|
|
|
|
|
},
|
|
|
|
|
)!
|
|
|
|
|
|
|
|
|
|
export interface ReactNavigationParamList {
|
|
|
|
|
[Page: string]: any
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
declare global {
|
|
|
|
|
namespace ReactNavigation {
|
|
|
|
|
interface RootParamList extends ReactNavigationParamList {}
|
|
|
|
|
}
|
|
|
|
|
}
|