decord/source/components_native/common/ImageWithPlaceholder.tsx

49 lines
1.9 KiB
TypeScript
Raw Normal View History

// Module ID: 8848
// Function ID: 8849
// Name: ImageWithPlaceholder
// Dependencies: [17, 21, 1115, 8849, 5639, 2]
2026-07-20 16:05:17 +00:00
// Exports: ImageWithPlaceholder
// Module 8848 (ImageWithPlaceholder)
2026-08-24 06:08:38 +00:00
import jsxProd from "jsxProd" /* 21 */;
import FastImageDefault from "FastImage" /* 5639 */;
import ImageWithThumbhashPlaceholderNativeComponentDefault from "ImageWithThumbhashPlaceholderNativeComponent" /* 8849 */;
import get_ActivityIndicator from "module_17" /* 17 */;
import PlatformUtils from "PlatformUtils" /* 1115 */;
import size from "module_2" /* 2 */;
2026-07-20 16:05:17 +00:00
({ View: c2, requireNativeComponent } = get_ActivityIndicator);
2026-08-24 06:08:38 +00:00
const jsx = jsxProd.jsx;
const style = { flex: 1 };
const ImagePlaceholderVersions = { THUMBHASH: 1, [1]: "THUMBHASH" };
if (PlatformUtils.isAndroid()) {
let importDefaultResult = ImageWithThumbhashPlaceholderNativeComponentDefault;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
importDefaultResult = requireNativeComponent("DCDImageWithThumbhashPlaceholderView");
2026-07-20 16:05:17 +00:00
}
const metroRequire = importDefaultResult;
const result = size.fileFinishedImporting("components_native/common/ImageWithPlaceholder.tsx");
2026-07-20 16:05:17 +00:00
export { ImagePlaceholderVersions };
2026-07-20 16:05:17 +00:00
export const ImageWithPlaceholder = function ImageWithPlaceholder(arg0) {
({ uri, placeholder, placeholderVersion, alt, style } = arg0);
const merged = Object.assign(arg0, Object.assign({ uri: 0, placeholder: 0, placeholderVersion: 0, alt: 0, style: 0 }));
2026-07-20 16:05:17 +00:00
if (null != placeholder) {
if (placeholderVersion === obj.THUMBHASH) {
const obj2 = {};
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(merged);
obj2.style = style;
obj2.uri = uri;
obj2.placeholder = placeholder;
obj2.placeholderVersion = placeholderVersion;
obj2.alt = alt;
let tmp4 = <importDefaultResult />;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp4;
2026-07-20 16:05:17 +00:00
}
obj = { style };
const merged2 = Object.assign(merged);
obj.children = jsx(FastImageDefault, { style, resizeMode: "cover", source: { uri }, alt });
tmp4 = <React2 style={style} />;
2026-07-20 16:05:17 +00:00
};