@lynx-js/lynx-ui-swiper 3.136.0 → 3.137.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/Swiper/index.d.ts +1 -1
- package/dist/SwiperItem/index.d.ts +1 -1
- package/dist/SwiperItem/index.jsx.map +1 -1
- package/dist/hooks/useAxisLock.d.ts +1 -1
- package/dist/hooks/useBounceConfig.d.ts +3 -3
- package/dist/hooks/useBounceView.d.ts +1 -1
- package/dist/hooks/useChange.d.ts +2 -2
- package/dist/hooks/useDirection.d.ts +2 -2
- package/dist/hooks/useFirstScreenStyle.d.ts +1 -1
- package/dist/hooks/useModeConfig.d.ts +1 -1
- package/dist/hooks/useOffset.d.ts +2 -2
- package/dist/hooks/useOffsetLimit.d.ts +1 -1
- package/dist/hooks/useReset.d.ts +1 -1
- package/dist/hooks/useVelocity.d.ts +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/store/index.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.docs.d.ts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +2 -2
- package/src/SwiperItem/index.tsx +1 -1
- package/src/types/index.docs.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @lynx-js/lynx-ui-swiper
|
|
2
2
|
|
|
3
|
+
## 3.137.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Emit declaration imports with explicit ESM-compatible paths. ([#280](https://github.com/lynx-family/lynx-ui/pull/280))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`064ea4e`](https://github.com/lynx-family/lynx-ui/commit/064ea4e49cd3d0ac5754519cbee43d8ab3040024)]:
|
|
10
|
+
- @lynx-js/lynx-ui-common@3.137.0
|
|
11
|
+
|
|
3
12
|
## 3.136.0
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/Swiper/index.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export interface SwiperItemProps {
|
|
|
34
34
|
/**
|
|
35
35
|
* `overlap` attribute passed to SwiperItem's direct child.
|
|
36
36
|
* This property is used only when opacity has issues.
|
|
37
|
-
* Refer to {@link https://lynxjs.org/
|
|
37
|
+
* Refer to {@link https://lynxjs.org/api/css/properties/opacity#opacity}
|
|
38
38
|
* @Android
|
|
39
39
|
* @iOS
|
|
40
40
|
* @Harmony
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwiperItem/index.jsx","sources":["../../src/SwiperItem/index.tsx"],"sourcesContent":["// Copyright 2026 The Lynx Authors. All rights reserved.\n// Licensed under the Apache License Version 2.0 that can be found in the\n// LICENSE file in the root directory of this source tree.\n\nimport {\n memo,\n runOnMainThread,\n useContext,\n useEffect,\n useMainThreadRef,\n useMemo,\n} from '@lynx-js/react'\nimport type { ReactElement, RefObject } from '@lynx-js/react'\n\nimport type { CSSProperties, MainThread } from '@lynx-js/types'\n\nimport { SwiperContext, SwiperItemContext } from '../store'\nimport type { CompoundModeConfig, SwiperContextProps } from '../types'\n\nexport interface SwiperItemProps {\n /**\n * Index of current SwiperItem, out of Swiper's data.\n * @Android\n * @iOS\n * @Harmony\n */\n index?: number\n /**\n * Children of SwiperItem\n * @Android\n * @iOS\n * @Harmony\n */\n children: ReactElement | ReactElement[]\n /**\n * Style of SwiperItem\n * @Android\n * @iOS\n * @Harmony\n */\n style?: CSSProperties\n /**\n * Physical index of current SwiperItem.\n * Kept for compatibility with existing manual usage. This is resolved\n * automatically when SwiperItem is rendered inside Swiper's children function.\n * @Android\n * @iOS\n * @Harmony\n */\n realIndex?: number\n /**\n * `overlap` attribute passed to SwiperItem's direct child.\n * This property is used only when opacity has issues.\n * Refer to {@link https://lynxjs.org/
|
|
1
|
+
{"version":3,"file":"SwiperItem/index.jsx","sources":["../../src/SwiperItem/index.tsx"],"sourcesContent":["// Copyright 2026 The Lynx Authors. All rights reserved.\n// Licensed under the Apache License Version 2.0 that can be found in the\n// LICENSE file in the root directory of this source tree.\n\nimport {\n memo,\n runOnMainThread,\n useContext,\n useEffect,\n useMainThreadRef,\n useMemo,\n} from '@lynx-js/react'\nimport type { ReactElement, RefObject } from '@lynx-js/react'\n\nimport type { CSSProperties, MainThread } from '@lynx-js/types'\n\nimport { SwiperContext, SwiperItemContext } from '../store'\nimport type { CompoundModeConfig, SwiperContextProps } from '../types'\n\nexport interface SwiperItemProps {\n /**\n * Index of current SwiperItem, out of Swiper's data.\n * @Android\n * @iOS\n * @Harmony\n */\n index?: number\n /**\n * Children of SwiperItem\n * @Android\n * @iOS\n * @Harmony\n */\n children: ReactElement | ReactElement[]\n /**\n * Style of SwiperItem\n * @Android\n * @iOS\n * @Harmony\n */\n style?: CSSProperties\n /**\n * Physical index of current SwiperItem.\n * Kept for compatibility with existing manual usage. This is resolved\n * automatically when SwiperItem is rendered inside Swiper's children function.\n * @Android\n * @iOS\n * @Harmony\n */\n realIndex?: number\n /**\n * `overlap` attribute passed to SwiperItem's direct child.\n * This property is used only when opacity has issues.\n * Refer to {@link https://lynxjs.org/api/css/properties/opacity#opacity}\n * @Android\n * @iOS\n * @Harmony\n */\n overlap?: boolean\n}\n\ninterface IFirstScreenStyle extends\n Pick<\n SwiperContextProps,\n | 'itemWidth'\n | 'itemHeight'\n | 'initialIndex'\n | 'customAnimationFirstScreen'\n | 'RTL'\n >\n{\n itemRef: RefObject<MainThread.Element | undefined>\n spaceBetween: number\n realIndex: number\n modeConfig: CompoundModeConfig\n}\n\nfunction useFirstScreenStyle(props: IFirstScreenStyle) {\n const {\n itemWidth,\n spaceBetween,\n itemHeight,\n itemRef,\n customAnimationFirstScreen,\n realIndex,\n modeConfig,\n initialIndex,\n RTL,\n } = props\n\n const containerStyle = useMemo(() => {\n if (modeConfig.mode === 'normal') {\n let style: CSSProperties = {\n width: `${itemWidth}px`,\n height: `${itemHeight}px`,\n [RTL === true ? 'marginLeft' : 'marginRight']: `${spaceBetween}px`,\n }\n if (customAnimationFirstScreen) {\n const customStyle = customAnimationFirstScreen(\n -initialIndex + realIndex,\n realIndex,\n )\n style = {\n ...style,\n ...customStyle,\n }\n }\n\n return style\n } else if (modeConfig.mode === 'custom') {\n let style: CSSProperties = {\n width: `${itemWidth}px`,\n height: `${itemHeight}px`,\n position: 'absolute',\n }\n if (customAnimationFirstScreen) {\n const customStyle = customAnimationFirstScreen(\n -initialIndex + realIndex,\n realIndex,\n )\n style = {\n ...style,\n ...customStyle,\n }\n }\n\n return style\n }\n }, [])\n\n function updateMainThreadR(propsFromJS: {\n itemWidth: number\n itemHeight: SwiperContextProps['itemHeight']\n spaceBetween: number\n }) {\n 'main thread'\n if (itemRef.current) {\n itemRef.current.setStyleProperties({\n width: `${propsFromJS.itemWidth}px`,\n height: `${propsFromJS.itemHeight}px`,\n marginInlineEnd: `${propsFromJS.spaceBetween}px`,\n })\n }\n }\n\n useEffect(() => {\n runOnMainThread(updateMainThreadR)({\n itemWidth,\n itemHeight,\n spaceBetween,\n })\n }, [itemWidth, itemHeight, spaceBetween])\n\n return {\n containerStyle,\n }\n}\n\nconst SwiperItem = (\n { index, realIndex, children, overlap }: SwiperItemProps,\n) => {\n const {\n itemWidth,\n itemHeight,\n setChildrenRef,\n modeConfig,\n customAnimationFirstScreen,\n initialIndex = 0,\n spaceBetween,\n RTL,\n } = useContext(SwiperContext)\n const itemContext = useContext(SwiperItemContext)\n const resolvedIndex = index ?? itemContext?.index\n const resolvedRealIndex = realIndex ?? itemContext?.realIndex ?? resolvedIndex\n const hasResolvedIndex = resolvedIndex !== undefined\n const effectiveRealIndex = resolvedRealIndex ?? 0\n const swiperItemRef = useMainThreadRef<MainThread.Element>()\n\n const { containerStyle } = useFirstScreenStyle({\n itemWidth,\n itemHeight,\n spaceBetween,\n itemRef: swiperItemRef,\n modeConfig,\n realIndex: effectiveRealIndex,\n initialIndex,\n customAnimationFirstScreen,\n RTL,\n })\n\n if (!hasResolvedIndex) {\n throw new Error(\n 'SwiperItem must be rendered inside Swiper children or receive an index prop.',\n )\n }\n\n function setRef(ref: MainThread.Element) {\n 'main thread'\n swiperItemRef.current = ref\n setChildrenRef(ref, effectiveRealIndex)\n }\n\n return (\n <view\n class='lynx-ui-swiper__item'\n style={containerStyle}\n main-thread:ref={setRef}\n overlap={overlap}\n >\n {children}\n </view>\n )\n}\n\nconst MemoSwiperItem = memo(SwiperItem) as typeof SwiperItem\n\nexport { MemoSwiperItem as SwiperItem }\n"],"names":["useFirstScreenStyle","props","itemWidth","spaceBetween","itemHeight","itemRef","customAnimationFirstScreen","realIndex","modeConfig","initialIndex","RTL","containerStyle","useMemo","style","customStyle","updateMainThreadR","propsFromJS","useEffect","runOnMainThread","SwiperItem","index","children","overlap","setChildrenRef","useContext","SwiperContext","itemContext","SwiperItemContext","resolvedIndex","resolvedRealIndex","hasResolvedIndex","undefined","effectiveRealIndex","swiperItemRef","useMainThreadRef","Error","setRef","ref","view","MemoSwiperItem","memo"],"mappings":";;AA6EA,SAASA,oBAAoBC,KAAwB;IACnD,MAAM,EACJC,SAAS,EACTC,YAAY,EACZC,UAAU,EACVC,OAAO,EACPC,0BAA0B,EAC1BC,SAAS,EACTC,UAAU,EACVC,YAAY,EACZC,GAAG,EACJ,GAAGT;IAEJ,MAAMU,iBAAiBC,QAAQ;QAC7B,IAAIJ,AAAoB,aAApBA,WAAW,IAAI,EAAe;YAChC,IAAIK,QAAuB;gBACzB,OAAO,GAAGX,UAAU,EAAE,CAAC;gBACvB,QAAQ,GAAGE,WAAW,EAAE,CAAC;gBACzB,CAACM,AAAQ,SAARA,MAAe,eAAe,cAAc,EAAE,GAAGP,aAAa,EAAE,CAAC;YACpE;YACA,IAAIG,4BAA4B;gBAC9B,MAAMQ,cAAcR,2BAClB,CAACG,eAAeF,WAChBA;gBAEFM,QAAQ;oBACN,GAAGA,KAAK;oBACR,GAAGC,WAAW;gBAChB;YACF;YAEA,OAAOD;QACT;QAAO,IAAIL,AAAoB,aAApBA,WAAW,IAAI,EAAe;YACvC,IAAIK,QAAuB;gBACzB,OAAO,GAAGX,UAAU,EAAE,CAAC;gBACvB,QAAQ,GAAGE,WAAW,EAAE,CAAC;gBACzB,UAAU;YACZ;YACA,IAAIE,4BAA4B;gBAC9B,MAAMQ,cAAcR,2BAClB,CAACG,eAAeF,WAChBA;gBAEFM,QAAQ;oBACN,GAAGA,KAAK;oBACR,GAAGC,WAAW;gBAChB;YACF;YAEA,OAAOD;QACT;IACF,GAAG,EAAE;IAEL,SAASE,kBAAkBC,WAI1B;QACC;QACA,IAAIX,QAAQ,OAAO,EACjBA,QAAQ,OAAO,CAAC,kBAAkB,CAAC;YACjC,OAAO,GAAGW,YAAY,SAAS,CAAC,EAAE,CAAC;YACnC,QAAQ,GAAGA,YAAY,UAAU,CAAC,EAAE,CAAC;YACrC,iBAAiB,GAAGA,YAAY,YAAY,CAAC,EAAE,CAAC;QAClD;IAEJ;IAEAC,UAAU;QACRC,gBAAgBH,mBAAmB;YACjCb;YACAE;YACAD;QACF;IACF,GAAG;QAACD;QAAWE;QAAYD;KAAa;IAExC,OAAO;QACLQ;IACF;AACF;AAEA,MAAMQ,aAAa,CACjB,EAAEC,KAAK,EAAEb,SAAS,EAAEc,QAAQ,EAAEC,OAAO,EAAmB;IAExD,MAAM,EACJpB,SAAS,EACTE,UAAU,EACVmB,cAAc,EACdf,UAAU,EACVF,0BAA0B,EAC1BG,eAAe,CAAC,EAChBN,YAAY,EACZO,GAAG,EACJ,GAAGc,WAAWC;IACf,MAAMC,cAAcF,WAAWG;IAC/B,MAAMC,gBAAgBR,SAASM,aAAa;IAC5C,MAAMG,oBAAoBtB,aAAamB,aAAa,aAAaE;IACjE,MAAME,mBAAmBF,AAAkBG,WAAlBH;IACzB,MAAMI,qBAAqBH,qBAAqB;IAChD,MAAMI,gBAAgBC;IAEtB,MAAM,EAAEvB,cAAc,EAAE,GAAGX,oBAAoB;QAC7CE;QACAE;QACAD;QACA,SAAS8B;QACTzB;QACA,WAAWwB;QACXvB;QACAH;QACAI;IACF;IAEA,IAAI,CAACoB,kBACH,MAAM,IAAIK,MACR;IAIJ,SAASC,OAAOC,GAAuB;QACrC;QACAJ,cAAc,OAAO,GAAGI;QACxBd,eAAec,KAAKL;IACtB;IAEA,QACGM,KACC,MAAM,uBACN,OAAO3B,gBACP,YAAY,KAAKyB,QACjB,SAASd,SACV;MACC,CAACD,SAAS;IACZ,EAAEiB;AAEN;AAEA,MAAMC,iBAAiBC,KAAKrB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MainThread } from '@lynx-js/types';
|
|
2
|
-
import type { SwiperProps } from '../types';
|
|
2
|
+
import type { SwiperProps } from '../types/index.js';
|
|
3
3
|
export declare function useAxisLock({ consumeSlideEvent, experimentalHorizontalSwipeOnly, }: {
|
|
4
4
|
consumeSlideEvent: NonNullable<SwiperProps<unknown>['consumeSlideEvent']>;
|
|
5
5
|
experimentalHorizontalSwipeOnly: boolean;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { BounceConfig } from '../types';
|
|
1
|
+
import type { BounceConfig } from '../types/index.js';
|
|
2
2
|
declare function useBounceConfig(bounceConfig?: BounceConfig): {
|
|
3
3
|
enableBounce: boolean;
|
|
4
4
|
startBounceItem: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
5
5
|
endBounceItem: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
6
6
|
startBounceItemWidth: number;
|
|
7
7
|
endBounceItemWidth: number;
|
|
8
|
-
onStartBounceItemBounce: ((bounceParams: import("../types").onBounceParams) => void) | undefined;
|
|
9
|
-
onEndBounceItemBounce: ((bounceParams: import("../types").onBounceParams) => void) | undefined;
|
|
8
|
+
onStartBounceItemBounce: ((bounceParams: import("../types/index.js").onBounceParams) => void) | undefined;
|
|
9
|
+
onEndBounceItemBounce: ((bounceParams: import("../types/index.js").onBounceParams) => void) | undefined;
|
|
10
10
|
};
|
|
11
11
|
export { useBounceConfig };
|
|
12
12
|
//# sourceMappingURL=useBounceConfig.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from '@lynx-js/react';
|
|
2
|
-
import type { CompoundModeConfig, SwiperProps } from '../types';
|
|
2
|
+
import type { CompoundModeConfig, SwiperProps } from '../types/index.js';
|
|
3
3
|
declare function useBounceView({ startBounceItem, endBounceItem, RTL, itemWidth, count, containerWidth, mode, loop, }: {
|
|
4
4
|
startBounceItem?: ReactElement;
|
|
5
5
|
endBounceItem?: ReactElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SwipeDirection } from '../types';
|
|
2
|
-
import type { CompoundModeConfig, OffsetLimitResult, SwiperProps } from '../types';
|
|
1
|
+
import { SwipeDirection } from '../types/index.js';
|
|
2
|
+
import type { CompoundModeConfig, OffsetLimitResult, SwiperProps } from '../types/index.js';
|
|
3
3
|
interface UseChangeOpts extends Pick<SwiperProps<unknown>, 'containerWidth' | 'onSwipeStart' | 'onSwipeStop'> {
|
|
4
4
|
onChange?: (offset: number) => void;
|
|
5
5
|
size: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MainThread } from '@lynx-js/types';
|
|
2
|
-
import { SwipeDirection } from '../types';
|
|
3
|
-
import type { SwiperProps } from '../types';
|
|
2
|
+
import { SwipeDirection } from '../types/index.js';
|
|
3
|
+
import type { SwiperProps } from '../types/index.js';
|
|
4
4
|
export declare function useDirection({ RTL }: {
|
|
5
5
|
RTL: SwiperProps<unknown>['RTL'];
|
|
6
6
|
}): {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties } from '@lynx-js/types';
|
|
2
|
-
import type { CompoundModeConfig, OffsetLimitResult, SwiperProps } from '../types';
|
|
2
|
+
import type { CompoundModeConfig, OffsetLimitResult, SwiperProps } from '../types/index.js';
|
|
3
3
|
interface LayoutSwiperPropsType extends Pick<SwiperProps<unknown>, 'itemWidth' | 'initialIndex' | 'itemHeight' | 'trackStyle'>, Required<Pick<SwiperProps<unknown>, 'containerWidth' | 'loop' | 'loopDuplicateCount' | 'RTL' | 'swiperKey'>> {
|
|
4
4
|
spaceBetween: number;
|
|
5
5
|
dataCount: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MainThread } from '@lynx-js/types';
|
|
2
|
-
import { SwipeDirection } from '../types';
|
|
3
|
-
import type { BounceConfig, CompoundModeConfig, OffsetLimitResult, ResetOptions, SwipeToOptions, SwiperProps } from '../types';
|
|
2
|
+
import { SwipeDirection } from '../types/index.js';
|
|
3
|
+
import type { BounceConfig, CompoundModeConfig, OffsetLimitResult, ResetOptions, SwipeToOptions, SwiperProps } from '../types/index.js';
|
|
4
4
|
interface UseOffsetOpts extends Required<Pick<SwiperProps<unknown>, 'loop' | 'duration' | 'initialIndex' | 'containerWidth' | 'autoPlay' | 'autoPlayInterval' | 'consumeSlideEvent' | 'RTL'>> {
|
|
5
5
|
dataCount: number;
|
|
6
6
|
size: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CompoundModeConfig, OffsetLimitResult, SwiperProps } from '../types';
|
|
1
|
+
import type { CompoundModeConfig, OffsetLimitResult, SwiperProps } from '../types/index.js';
|
|
2
2
|
interface IOffsetLimit extends Required<Pick<SwiperProps<unknown>, 'loop' | 'itemWidth' | 'containerWidth'>> {
|
|
3
3
|
offsetLimit: SwiperProps<unknown>['offsetLimit'];
|
|
4
4
|
modeConfig: CompoundModeConfig;
|
package/dist/hooks/useReset.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NodesRef } from '@lynx-js/types';
|
|
2
|
-
import type { CompoundModeConfig, ResetOptions, SwiperProps, UpdateSwiperInnerContainerOptions } from '../types';
|
|
2
|
+
import type { CompoundModeConfig, ResetOptions, SwiperProps, UpdateSwiperInnerContainerOptions } from '../types/index.js';
|
|
3
3
|
interface UseResetOpts extends Required<Pick<SwiperProps<unknown>, 'swiperKey' | 'loop' | 'itemWidth' | 'itemHeight' | 'containerWidth' | 'initialIndex' | 'loopDuplicateCount'>> {
|
|
4
4
|
resetOnReuse: SwiperProps<unknown>['resetOnReuse'];
|
|
5
5
|
dataCount: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MainThread } from '@lynx-js/types';
|
|
2
|
-
import { SwipeDirection } from '../types';
|
|
3
|
-
import type { SwiperProps } from '../types';
|
|
2
|
+
import { SwipeDirection } from '../types/index.js';
|
|
3
|
+
import type { SwiperProps } from '../types/index.js';
|
|
4
4
|
export declare function useVelocity({ RTL }: {
|
|
5
5
|
RTL: SwiperProps<unknown>['RTL'];
|
|
6
6
|
}): {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { Swiper } from './Swiper';
|
|
2
|
-
export { SwiperItem } from './SwiperItem';
|
|
3
|
-
export type { SwiperItemProps } from './SwiperItem';
|
|
4
|
-
export type { SwiperProps, SwiperRef } from './types';
|
|
1
|
+
export { Swiper } from './Swiper/index.js';
|
|
2
|
+
export { SwiperItem } from './SwiperItem/index.js';
|
|
3
|
+
export type { SwiperItemProps } from './SwiperItem/index.js';
|
|
4
|
+
export type { SwiperProps, SwiperRef } from './types/index.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/store/index.d.ts
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties, MainThread } from '@lynx-js/types';
|
|
2
|
-
import type { BounceConfig, SwipeToOptions, SwiperPropsReal as SwiperProps, SwiperRef, onBounceParams } from './index.docs';
|
|
2
|
+
import type { BounceConfig, SwipeToOptions, SwiperPropsReal as SwiperProps, SwiperRef, onBounceParams } from './index.docs.js';
|
|
3
3
|
export interface SwiperContextProps extends Pick<SwiperProps<unknown>, 'itemWidth' | 'itemHeight' | 'customAnimationFirstScreen' | 'RTL'>, Required<Pick<SwiperProps<unknown>, 'initialIndex' | 'loop'>> {
|
|
4
4
|
setChildrenRef: (ref: MainThread.Element, index: number) => void;
|
|
5
5
|
spaceBetween: number;
|
|
@@ -235,7 +235,7 @@ export interface SwiperProps<T> {
|
|
|
235
235
|
/**
|
|
236
236
|
* Determines how swiper respond to touch in different angle.
|
|
237
237
|
* By default, swiper will only respond to horizontal touches.
|
|
238
|
-
* Refer to https://lynxjs.org/
|
|
238
|
+
* Refer to https://lynxjs.org/api/elements/built-in/view.html#consume-slide-event for more
|
|
239
239
|
* @defaultValue [[-180, -135], [-45, 45], [135, 180]]
|
|
240
240
|
* @Android
|
|
241
241
|
* @iOS
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OffsetLimitResult } from '../types';
|
|
1
|
+
import type { OffsetLimitResult } from '../types/index.js';
|
|
2
2
|
declare function easeOut(progress: number): number;
|
|
3
3
|
declare function limiter(offset: number, dataCount: number, size: number, spaceBetween: number, loop: boolean, offsetLimit: OffsetLimitResult): number;
|
|
4
4
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/lynx-ui-swiper",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.137.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/lynx-family/lynx-ui.git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@lynx-js/react-use": "0.2.2",
|
|
29
|
-
"@lynx-js/lynx-ui-common": "3.
|
|
29
|
+
"@lynx-js/lynx-ui-common": "3.137.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@lynx-js/react": "0.123.1",
|
package/src/SwiperItem/index.tsx
CHANGED
|
@@ -51,7 +51,7 @@ export interface SwiperItemProps {
|
|
|
51
51
|
/**
|
|
52
52
|
* `overlap` attribute passed to SwiperItem's direct child.
|
|
53
53
|
* This property is used only when opacity has issues.
|
|
54
|
-
* Refer to {@link https://lynxjs.org/
|
|
54
|
+
* Refer to {@link https://lynxjs.org/api/css/properties/opacity#opacity}
|
|
55
55
|
* @Android
|
|
56
56
|
* @iOS
|
|
57
57
|
* @Harmony
|
package/src/types/index.docs.ts
CHANGED
|
@@ -245,7 +245,7 @@ export interface SwiperProps<T> {
|
|
|
245
245
|
/**
|
|
246
246
|
* Determines how swiper respond to touch in different angle.
|
|
247
247
|
* By default, swiper will only respond to horizontal touches.
|
|
248
|
-
* Refer to https://lynxjs.org/
|
|
248
|
+
* Refer to https://lynxjs.org/api/elements/built-in/view.html#consume-slide-event for more
|
|
249
249
|
* @defaultValue [[-180, -135], [-45, 45], [135, 180]]
|
|
250
250
|
* @Android
|
|
251
251
|
* @iOS
|