2025-07-10 21:23:39 +07:00
|
|
|
import { ReactJSXRuntime } from '@revenge-mod/react'
|
2025-05-10 18:14:05 +07:00
|
|
|
import { isProxified, unproxify } from '@revenge-mod/utils/proxy'
|
2025-05-01 12:11:33 +07:00
|
|
|
import type { ElementType } from 'react'
|
|
|
|
|
|
2025-07-10 21:23:39 +07:00
|
|
|
const { jsx: _jsx, jsxs: _jsxs, Fragment } = ReactJSXRuntime
|
2025-05-01 12:11:33 +07:00
|
|
|
|
2025-07-11 15:31:53 +07:00
|
|
|
const jsx: typeof _jsx = (type, props, key) => _jsx(unproxy(type), props, key)
|
|
|
|
|
const jsxs: typeof _jsxs = (type, props, key) =>
|
|
|
|
|
_jsxs(unproxy(type), props, key)
|
2025-06-10 22:15:19 +07:00
|
|
|
|
2025-07-11 15:31:53 +07:00
|
|
|
function unproxy(type: any): ElementType {
|
|
|
|
|
return isProxified(type) ? unproxify(type) : type
|
2025-06-10 22:15:19 +07:00
|
|
|
}
|
2025-05-01 12:11:33 +07:00
|
|
|
|
2025-06-08 19:01:33 +07:00
|
|
|
module.exports = { jsx, jsxs, Fragment }
|