import { type SharedValue, type Define } from '@sigx/lynx'; import type { PrimitiveSignal } from '@sigx/reactivity'; export type SwiperProps = /** * The items to render — one page per item. Switched from slot-based * children because horizontal `` children need explicit * pixel widths (Lynx doesn't resolve `width: 100%` against the viewport * in a horizontal scroller), so the Swiper has to own the page wrapper. */ Define.Prop<'items', readonly T[], true> /** Per-item renderer. Output is wrapped in a page-width sized ``. */ & Define.Prop<'renderItem', (item: T, index: number) => unknown, true> /** Optional key extractor — defaults to the item's array index. */ & Define.Prop<'keyExtractor', (item: T, index: number) => string | number, false> /** * Page width in CSS pixels. Defaults to the Swiper's own measured * container width via `useElementLayout`, falling back to * `lynx.SystemInfo.pixelWidth / pixelRatio` before the first layout * pass. */ & Define.Prop<'width', number, false> /** Page height in CSS pixels — applied to each page wrapper. */ & Define.Prop<'height', number | string, false> /** * Externally-observable current page (whole units). Updated from * `bindscroll` as the user pans. Writes from outside (e.g. * `idx.value = 2`) glide the swiper to that page via the native * `.scrollTo` UI method. */ & Define.Prop<'index', PrimitiveSignal, false> /** Page to render first (uncontrolled-initial). */ & Define.Prop<'initialIndex', number, false> /** * MT-thread live pixel offset, updated every scroll frame from the * native scroll-view's `scrollLeft`. */ & Define.Prop<'offset', SharedValue, false> & Define.Prop<'class', string, false> & Define.Prop<'style', Record, false> /** Emitted (BG) when the page-rounded `scrollLeft / width` changes. */ & Define.Event<'pageChange', { index: number; }>; /** * Paged horizontal carousel built on Lynx's native `` — native snap, no MTS pan handling required for the * happy path. Items are rendered into page-sized `` wrappers (the * Swiper owns the sizing so Lynx's horizontal scroller has explicit * widths to lay out against; `width: 100%` does NOT resolve to the * viewport for `` children). * * @example * ```tsx * const idx = signal(0); * const offset = useSharedValue(0); * ( * * )} * /> * ``` */ export declare const Swiper: (props: SwiperProps) => unknown; //# sourceMappingURL=Swiper.d.ts.map