@momo-kits/carousel 0.92.21-rc.5 → 0.92.34

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.
Files changed (3) hide show
  1. package/index.tsx +6 -6
  2. package/package.json +1 -1
  3. package/publish.sh +1 -2
package/index.tsx CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  } from 'react-native';
13
13
  import {defaultAnimatedStyles, defaultScrollInterpolator} from './animation';
14
14
  import {CarouselProps, CarouselRef, CarouselState, Position} from './types';
15
- import {scaleSize, Spacing} from '@momo-kits/foundation';
15
+ import {Spacing} from '@momo-kits/foundation';
16
16
 
17
17
  const IS_ANDROID = Platform.OS === 'android';
18
18
  const IS_IOS = Platform.OS === 'ios';
@@ -574,9 +574,7 @@ class Carousel extends React.PureComponent<CarouselProps, CarouselState> {
574
574
  this.props.visibleItem === 1
575
575
  ? screenWidth - Spacing.M * 2
576
576
  : Math.ceil(
577
- scaleSize(
578
- (containerWidth * 0.9 - visibleItem * Spacing.S) / visibleItem
579
- )
577
+ (containerWidth * 0.9 - visibleItem * Spacing.S) / visibleItem
580
578
  );
581
579
  if (this.props.itemWidth) {
582
580
  itemWidth = this.props.itemWidth;
@@ -668,7 +666,7 @@ class Carousel extends React.PureComponent<CarouselProps, CarouselState> {
668
666
  if (full) {
669
667
  spacingStyle = {};
670
668
  }
671
- const animatedStyle = defaultAnimatedStyles(animatedValue,this.props)
669
+ const animatedStyle = defaultAnimatedStyles(animatedValue, this.props);
672
670
  return (
673
671
  <Component
674
672
  style={[
@@ -791,7 +789,9 @@ class Carousel extends React.PureComponent<CarouselProps, CarouselState> {
791
789
  {...specificProps}
792
790
  ref={c => (this._carouselRef = c)}
793
791
  overScrollMode={'never'}
794
- snapToInterval={this.props.snapToInterval ? this.props.snapToInterval : snapToInterval}
792
+ snapToInterval={
793
+ this.props.snapToInterval ? this.props.snapToInterval : snapToInterval
794
+ }
795
795
  disableIntervalMomentum={disableIntervalMomentum}
796
796
  pointerEvents={hideCarousel ? 'none' : 'auto'}
797
797
  decelerationRate={'fast'}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/carousel",
3
- "version": "0.92.21-rc.5",
3
+ "version": "0.92.34",
4
4
  "private": false,
5
5
  "main": "index.tsx",
6
6
  "peerDependencies": {
package/publish.sh CHANGED
@@ -11,8 +11,7 @@ if [ "$1" == "stable" ]; then
11
11
  npm version patch
12
12
  npm publish --tag stable --access=public
13
13
  elif [ "$1" == "latest" ]; then
14
- npm version $(npm view @momo-kits/foundation@latest version)
15
- npm version prerelease --preid=rc
14
+ npm version $(npm view @momo-kits/foundation@stable version)
16
15
  npm publish --tag latest --access=public
17
16
  else
18
17
  npm version $(npm view @momo-kits/carousel@beta version)