decord/source/modules/stickers/native/NativeLottieView.tsx
github-actions 8d58bae3b2 chore: update source for alpha 347.4
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4907.js (118.4 MB)
2026-09-18 06:58:00 +00:00

67 lines
2.2 KiB
TypeScript

// Module ID: 8218
// Function ID: 8219
// Name: NativeLottieView
// Dependencies: [19, 17, 21, 1364, 8219, 113, 2]
// Exports: default
// Module 8218 (NativeLottieView)
import _mod17 from "module_17" /* 17 */;
import jsxProd from "jsxProd" /* 21 */;
import codegenNativeCommandsDefault from "codegenNativeCommands" /* 113 */;
import LottieNodeNativeComponentDefault from "LottieNodeNativeComponent" /* 8219 */;
import noop_mod from "module_19" /* 19 */;
import PlatformUtils from "PlatformUtils" /* 1364 */;
import size from "module_2" /* 2 */;
let noop = noop_mod;
({ useEffect: closure_0, useRef: closure_1 } = noop);
let noop = noop_mod;
let jsx = jsxProd.jsx;
if (PlatformUtils.isAndroid()) {
let importDefaultResult = LottieNodeNativeComponentDefault;
} else {
importDefaultResult = _mod17.requireNativeComponent("NativeLottieNode");
}
let closure_5 = codegenNativeCommandsDefault({ supportedCommands: ["setup"] });
const NativeLottieRenderMode = { LOOP: 0, [0]: "LOOP", STILL: 1, [1]: "STILL", ONCE: 2, [2]: "ONCE" };
const result = size.fileFinishedImporting("modules/stickers/native/NativeLottieView.tsx");
export default function NativeLottieView(accessibilityLabel) {
({ width, height, opacity } = accessibilityLabel);
({ asset, url } = accessibilityLabel);
if (opacity === undefined) {
opacity = 1;
}
let LOOP = accessibilityLabel.renderMode;
if (LOOP === undefined) {
LOOP = obj.LOOP;
}
let flag = accessibilityLabel.animating;
if (flag === undefined) {
flag = true;
}
let size;
const ref = size.useRef(null);
size = { asset, url, width, height, animating: flag, accessibilityLabel: accessibilityLabel.accessibilityLabel };
jsx = ref(size);
LOOP(() => {
closure_3.current = size;
});
const items = [LOOP];
LOOP(() => {
({ asset, url, width, height, animating, accessibilityLabel } = ref.current);
let tmp2 = "" !== url;
if (tmp2) {
tmp2 = 0 !== width;
}
if (tmp2) {
tmp2 = 0 !== height;
}
if (tmp2) {
closure_5.setup(ref.current, asset, url, width, height, tmp, animating, accessibilityLabel);
}
}, items);
obj = { ref, style: { width, height, opacity } };
return <closure_4 ref={ref} style={{ width, height, opacity }} />;
};
export { NativeLottieRenderMode };