decord/source/design/void/CarouselPagination/native/CarouselPagination.tsx

69 lines
3.5 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 13156
// Function ID: 101313
2026-07-20 16:05:17 +00:00
// Name: CarouselPagination
2026-07-27 11:26:19 +00:00
// Dependencies: [31, 27, 33, 4131, 689, 3992, 4132, 13096, 13157, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-27 11:26:19 +00:00
// Module 13156 (CarouselPagination)
2026-07-23 10:11:24 +00:00
import { View } from "get ActivityIndicator";
import { jsx } from "jsxProd";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
import importAllResult from "result";
const require = arg1;
let obj = { container: { position: "relative", top: -16, marginBottom: -16 } };
obj = { width: 8, height: 8, borderRadius: require("_createForOfIteratorHelperLoose").radii.xs, marginHorizontal: 4, backgroundColor: require("_createForOfIteratorHelperLoose").colors.ICON_STRONG };
2026-07-20 16:05:17 +00:00
obj.dot = obj;
2026-07-23 10:11:24 +00:00
let closure_5 = _createForOfIteratorHelperLoose.createStyles(obj);
2026-07-20 16:05:17 +00:00
let closure_6 = { code: "function CarouselPaginationTsx1(){const{withTiming,active,STANDARD_EASING}=this.__closure;return withTiming(active?1:0,{duration:250,easing:STANDARD_EASING},'animate-always');}" };
let closure_7 = { code: "function CarouselPaginationTsx2(){const{interpolate,progress,interpolateColor,backgroundColor,brand500}=this.__closure;return{width:interpolate(progress.get(),[0,1],[8,16]),backgroundColor:interpolateColor(progress.get(),[0,1],[backgroundColor,brand500]),opacity:interpolate(progress.get(),[0,1],[0.3,1])};}" };
2026-07-23 10:11:24 +00:00
let closure_8 = require("result").memo((active) => {
2026-07-20 16:05:17 +00:00
active = active.active;
const tmp = callback();
2026-07-23 10:11:24 +00:00
let obj = active(BRAND_500[5]);
2026-07-20 16:05:17 +00:00
const fn = function o() {
let obj = active(BRAND_500[6]);
let num = 0;
if (active) {
num = 1;
}
obj = { duration: 250, easing: active(BRAND_500[7]).STANDARD_EASING };
return obj.withTiming(num, obj, "animate-always");
};
2026-07-23 10:11:24 +00:00
obj = { withTiming: active(BRAND_500[6]).withTiming, active, STANDARD_EASING: active(BRAND_500[7]).STANDARD_EASING };
2026-07-20 16:05:17 +00:00
fn.__closure = obj;
fn.__workletHash = 5885711729227;
fn.__initData = closure_6;
const derivedValue = obj.useDerivedValue(fn);
2026-07-23 10:11:24 +00:00
BRAND_500 = derivedValue(BRAND_500[4]).unsafe_rawColors.BRAND_500;
2026-07-20 16:05:17 +00:00
const backgroundColor = tmp.dot.backgroundColor;
const fn2 = function c() {
2026-07-23 10:11:24 +00:00
const obj = { width: active(BRAND_500[5]).interpolate(derivedValue.get(), [0, 1], [8, 16]) };
2026-07-20 16:05:17 +00:00
const obj2 = active(BRAND_500[5]);
const items = [backgroundColor, BRAND_500];
2026-07-23 10:11:24 +00:00
obj.backgroundColor = active(BRAND_500[5]).interpolateColor(derivedValue.get(), [0, 1], items);
2026-07-20 16:05:17 +00:00
const obj3 = active(BRAND_500[5]);
2026-07-23 10:11:24 +00:00
obj.opacity = active(BRAND_500[5]).interpolate(derivedValue.get(), [0, 1], [0.3, 1]);
2026-07-20 16:05:17 +00:00
return obj;
};
2026-07-23 10:11:24 +00:00
obj = { interpolate: active(BRAND_500[5]).interpolate, progress: derivedValue, interpolateColor: active(BRAND_500[5]).interpolateColor, backgroundColor, brand500: BRAND_500 };
2026-07-20 16:05:17 +00:00
fn2.__closure = obj;
fn2.__workletHash = 7804335337011;
fn2.__initData = closure_7;
2026-07-23 10:11:24 +00:00
const animatedStyle = active(BRAND_500[5]).useAnimatedStyle(fn2);
2026-07-20 16:05:17 +00:00
const style = [tmp.dot, animatedStyle];
2026-07-23 10:11:24 +00:00
return jsx(derivedValue(BRAND_500[5]).View, { style });
2026-07-20 16:05:17 +00:00
});
2026-07-23 10:11:24 +00:00
const result = require("jsxProd").fileFinishedImporting("design/void/CarouselPagination/native/CarouselPagination.tsx");
2026-07-20 16:05:17 +00:00
export default function CarouselPagination(arg0) {
let containerStyle;
let currentIndex;
let numberOfItems;
({ numberOfItems, currentIndex, containerStyle } = arg0);
const tmp2 = <closure_8 />;
const tmp = callback();
const items = [tmp.container, containerStyle];
2026-07-27 11:26:19 +00:00
return <View style={items}>{jsx(require(13157) /* Pagination */.Pagination, { dotElement: tmp2, inactiveDotElement: tmp2, dotsLength: numberOfItems, activeDotIndex: currentIndex })}</View>;
2026-07-20 16:05:17 +00:00
};