67 lines
2.5 KiB
JavaScript
67 lines
2.5 KiB
JavaScript
// Metro module 1705 (f1706).
|
|
import * as _Module1609 from "./Module1609";
|
|
import { PropsAllowlists } from "./Module1619";
|
|
import { ReanimatedError } from "./Module1617";
|
|
import { jsiConfigureProps, executeOnUIRuntimeSync } from "./Module1650";
|
|
import { updateLoggerConfig } from "./Module1610";
|
|
let shouldBeUseWeb, c1350_4;
|
|
const configureProps = function configureProps() {
|
|
const NATIVE_THREAD_PROPS_WHITELIST = PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST;
|
|
for (const key in NATIVE_THREAD_PROPS_WHITELIST) {
|
|
if (key in PropsAllowlists.UI_THREAD_PROPS_WHITELIST) {
|
|
throw new ReanimatedError(`Property \`${key}\` was whitelisted both as UI and native prop. Please remove it from one of the lists.`);
|
|
}
|
|
}
|
|
jsiConfigureProps(Object.keys(PropsAllowlists.UI_THREAD_PROPS_WHITELIST), Object.keys(PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST));
|
|
};
|
|
shouldBeUseWeb = _Module1609.shouldBeUseWeb();
|
|
c1350_4 = new Set();
|
|
configureProps();
|
|
export { configureProps };
|
|
export function addWhitelistedNativeProps(a0) {
|
|
const length = Object.keys(PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST).length;
|
|
PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST = {
|
|
...PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST,
|
|
...a0
|
|
};
|
|
if (length !== Object.keys(PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST).length) {
|
|
configureProps();
|
|
}
|
|
}
|
|
export function addWhitelistedUIProps(a0) {
|
|
const length = Object.keys(PropsAllowlists.UI_THREAD_PROPS_WHITELIST).length;
|
|
PropsAllowlists.UI_THREAD_PROPS_WHITELIST = {
|
|
...PropsAllowlists.UI_THREAD_PROPS_WHITELIST,
|
|
...a0
|
|
};
|
|
if (length !== Object.keys(PropsAllowlists.UI_THREAD_PROPS_WHITELIST).length) {
|
|
configureProps();
|
|
}
|
|
}
|
|
export function configureReanimatedLogger(a0) {
|
|
updateLoggerConfig(a0);
|
|
if (!shouldBeUseWeb) {
|
|
executeOnUIRuntimeSync(updateLoggerConfig)(a0);
|
|
}
|
|
}
|
|
export function adaptViewConfig({ uiViewClassName, validAttributes }) {
|
|
if (!c1350_4.has(uiViewClassName)) {
|
|
const r10 = {};
|
|
let c13172_0 = r10;
|
|
Object.keys(validAttributes).forEach((item) => {
|
|
if (!(item in PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST || item in PropsAllowlists.UI_THREAD_PROPS_WHITELIST)) {
|
|
c13172_0[item] = true;
|
|
}
|
|
});
|
|
const length = Object.keys(PropsAllowlists.UI_THREAD_PROPS_WHITELIST).length;
|
|
PropsAllowlists.UI_THREAD_PROPS_WHITELIST = {
|
|
...PropsAllowlists.UI_THREAD_PROPS_WHITELIST,
|
|
...r10
|
|
};
|
|
if (length !== Object.keys(PropsAllowlists.UI_THREAD_PROPS_WHITELIST).length) {
|
|
configureProps();
|
|
}
|
|
c1350_4.add(uiViewClassName);
|
|
}
|
|
}
|