decord/source/modules/stickers/native/NativeLottieView.tsx

68 lines
2.2 KiB
TypeScript
Raw Normal View History

// Module ID: 8103
// Function ID: 8104
2026-07-20 16:05:17 +00:00
// Name: NativeLottieView
// Dependencies: [19, 17, 21, 1150, 8104, 113, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 8103 (NativeLottieView)
import _mod17 from "module_17" /* 17 */;
2026-08-24 06:08:38 +00:00
import jsxProd from "jsxProd" /* 21 */;
import codegenNativeCommandsDefault from "codegenNativeCommands" /* 113 */;
import LottieNodeNativeComponentDefault from "LottieNodeNativeComponent" /* 8104 */;
import noop_mod from "module_19" /* 19 */;
import PlatformUtils from "PlatformUtils" /* 1150 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
let noop = noop_mod;
({ useEffect: closure_0, useRef: closure_1 } = noop);
let noop = noop_mod;
2026-08-24 06:08:38 +00:00
let jsx = jsxProd.jsx;
if (PlatformUtils.isAndroid()) {
let importDefaultResult = LottieNodeNativeComponentDefault;
2026-07-20 16:05:17 +00:00
} else {
importDefaultResult = _mod17.requireNativeComponent("NativeLottieNode");
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
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");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default function NativeLottieView(accessibilityLabel) {
({ width, height, opacity } = accessibilityLabel);
({ asset, url } = accessibilityLabel);
2026-07-20 16:05:17 +00:00
if (opacity === undefined) {
opacity = 1;
}
2026-07-29 08:29:29 +00:00
let LOOP = accessibilityLabel.renderMode;
2026-07-20 16:05:17 +00:00
if (LOOP === undefined) {
LOOP = obj.LOOP;
}
2026-07-29 08:29:29 +00:00
let flag = accessibilityLabel.animating;
2026-07-20 16:05:17 +00:00
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);
2026-07-20 16:05:17 +00:00
LOOP(() => {
closure_3.current = size;
2026-07-20 16:05:17 +00:00
});
const items = [LOOP];
LOOP(() => {
2026-07-29 08:29:29 +00:00
({ asset, url, width, height, animating, accessibilityLabel } = ref.current);
let tmp2 = "" !== url;
if (tmp2) {
tmp2 = 0 !== width;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp2) {
tmp2 = 0 !== height;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp2) {
closure_5.setup(ref.current, asset, url, width, height, tmp, animating, accessibilityLabel);
2026-07-20 16:05:17 +00:00
}
}, items);
obj = { ref, style: { width, height, opacity } };
2026-07-29 08:29:29 +00:00
return <closure_4 ref={ref} style={{ width, height, opacity }} />;
2026-07-20 16:05:17 +00:00
};
export { NativeLottieRenderMode };