2025-05-01 12:11:33 +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'
|
|
|
|
|
|
|
|
|
|
const { jsx: _jsx, jsxs: _jsxs, Fragment } = ReactJsxRuntime
|
|
|
|
|
|
|
|
|
|
const jsx = ((type, ...args) =>
|
2025-06-03 16:24:58 +07:00
|
|
|
_jsx(
|
|
|
|
|
isProxified(type as object)
|
|
|
|
|
? (unproxify(type as object) as ElementType)
|
|
|
|
|
: type,
|
|
|
|
|
...args,
|
|
|
|
|
)) as typeof _jsx
|
2025-05-01 12:11:33 +07:00
|
|
|
const jsxs = ((type, ...args) =>
|
2025-06-03 16:24:58 +07:00
|
|
|
_jsxs(
|
|
|
|
|
isProxified(type as object)
|
|
|
|
|
? (unproxify(type as object) as ElementType)
|
|
|
|
|
: type,
|
|
|
|
|
...args,
|
|
|
|
|
)) as typeof _jsxs
|
2025-05-01 12:11:33 +07:00
|
|
|
|
2025-06-08 19:01:33 +07:00
|
|
|
module.exports = { jsx, jsxs, Fragment }
|