decord/source/design/components/Graphic/native/Graphic.native.tsx

69 lines
2.3 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 8058
// Function ID: 8059
2026-07-20 16:05:17 +00:00
// Name: ImageGraphic
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 17, 21, 4668, 5454, 4107, 4197, 2]
2026-07-20 16:05:17 +00:00
// Exports: Graphic
2026-08-24 06:08:38 +00:00
// Module 8058 (ImageGraphic)
import preloadDefault from "preload" /* 5454 */;
import closure_3 from "noop" /* 19 */;
import { View } from "get ActivityIndicator" /* 17 */;
import { jsx } from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
function ImageGraphic(source) {
const tmp = callback();
2026-08-24 06:08:38 +00:00
return jsx(preloadDefault, { source: source.src, style: callback().image, resizeMode: "contain", accessibilityElementsHidden: true });
2026-07-20 16:05:17 +00:00
}
function RiveGraphic(riveProps) {
riveProps = riveProps.riveProps;
if (riveProps === undefined) {
riveProps = {};
}
const tmp = callback();
2026-07-29 08:29:29 +00:00
let obj = { style: tmp.image, children: null };
2026-07-20 16:05:17 +00:00
obj = {};
const merged = Object.assign(riveProps);
2026-07-29 08:29:29 +00:00
obj.style = tmp.image;
obj[1] = jsx(riveProps.rive, {});
2026-07-23 10:11:24 +00:00
return <View />;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let closure_6 = { "21/9": 2.3333333333333335, "16/9": 1.7777777777777777, "6/4": 1.5, "2/1": 2, "1/1": 1 };
2026-07-29 08:29:29 +00:00
let closure_7 = createCacheKey.createStyles({ container: { width: "100%", justifyContent: "center", alignItems: "center", overflow: "hidden" }, image: { width: "100%", height: "100%" } });
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("design/components/Graphic/native/Graphic.native.tsx");
2026-07-20 16:05:17 +00:00
export const Graphic = function Graphic(aspectRatio) {
let str = aspectRatio.aspectRatio;
if (str === undefined) {
str = "16/9";
}
2026-07-29 08:29:29 +00:00
let merged = Object.assign(aspectRatio, Object.create(null));
2026-07-20 16:05:17 +00:00
const items = [merged];
2026-07-29 08:29:29 +00:00
let obj = {
2026-07-20 16:05:17 +00:00
style: items1,
children: React.useMemo(() => {
2026-08-24 06:08:38 +00:00
let obj = merged(closure_1_2[5]);
2026-07-20 16:05:17 +00:00
if (obj.isImage(merged)) {
obj = {};
2026-07-29 08:29:29 +00:00
merged = Object.assign(tmp3);
2026-08-24 06:08:38 +00:00
let tmp4 = closure_1_5(closure_1_8, obj);
2026-07-20 16:05:17 +00:00
} else {
tmp4 = null;
2026-07-29 08:29:29 +00:00
if (tmpResult.isRive(tmp3)) {
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-29 08:29:29 +00:00
const merged1 = Object.assign(tmp3);
2026-08-24 06:08:38 +00:00
tmp4 = closure_1_5(closure_1_9, obj);
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
tmpResult = merged(closure_1_2[6]);
2026-07-20 16:05:17 +00:00
}
return tmp4;
}, items)
};
2026-07-23 10:11:24 +00:00
items1 = [callback().container, , ];
obj = { aspectRatio: table[str] };
2026-07-20 16:05:17 +00:00
items1[1] = obj;
items1[2] = aspectRatio.style;
2026-07-23 10:11:24 +00:00
return <View aspectRatio={table[str]} />;
2026-07-20 16:05:17 +00:00
};