@momo-kits/swipe 0.89.4 → 0.89.6-rc.1
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/SwipeView.tsx +4 -4
- package/index.tsx +2 -2
- package/package.json +2 -2
- package/publish.sh +21 -23
- package/types.ts +0 -3
package/SwipeView.tsx
CHANGED
|
@@ -15,7 +15,7 @@ const ACTION_WIDTH = 56;
|
|
|
15
15
|
|
|
16
16
|
export const Swipe: ForwardRefRenderFunction<SwipeableRef, SwipeProps> = (
|
|
17
17
|
{children, leftActions, rightActions, ...props},
|
|
18
|
-
ref
|
|
18
|
+
ref
|
|
19
19
|
) => {
|
|
20
20
|
const {theme} = useContext(ApplicationContext);
|
|
21
21
|
const screenWidth = Dimensions.get('window').width;
|
|
@@ -26,7 +26,7 @@ export const Swipe: ForwardRefRenderFunction<SwipeableRef, SwipeProps> = (
|
|
|
26
26
|
index: number,
|
|
27
27
|
length: number,
|
|
28
28
|
direction: 'left' | 'right',
|
|
29
|
-
dragX: Animated.AnimatedInterpolation
|
|
29
|
+
dragX: Animated.AnimatedInterpolation
|
|
30
30
|
) => {
|
|
31
31
|
const {
|
|
32
32
|
label,
|
|
@@ -83,7 +83,7 @@ export const Swipe: ForwardRefRenderFunction<SwipeableRef, SwipeProps> = (
|
|
|
83
83
|
const renderActions = (
|
|
84
84
|
actions: SwipeAction[] = [],
|
|
85
85
|
direction: 'left' | 'right',
|
|
86
|
-
dragX: Animated.AnimatedInterpolation
|
|
86
|
+
dragX: Animated.AnimatedInterpolation
|
|
87
87
|
) => {
|
|
88
88
|
let overlayPosition: {[key: string]: number} = {left: 0};
|
|
89
89
|
if (direction === 'right') {
|
|
@@ -111,7 +111,7 @@ export const Swipe: ForwardRefRenderFunction<SwipeableRef, SwipeProps> = (
|
|
|
111
111
|
index,
|
|
112
112
|
actions?.length,
|
|
113
113
|
direction,
|
|
114
|
-
dragX
|
|
114
|
+
dragX
|
|
115
115
|
);
|
|
116
116
|
}
|
|
117
117
|
})}
|
package/index.tsx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import Swipe from
|
|
1
|
+
import Swipe from './SwipeView';
|
|
2
2
|
|
|
3
|
-
export {Swipe}
|
|
3
|
+
export {Swipe};
|
package/package.json
CHANGED
package/publish.sh
CHANGED
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Prepare dist files
|
|
2
4
|
rm -rf dist
|
|
3
5
|
mkdir dist
|
|
4
|
-
|
|
5
|
-
cp . ./dist
|
|
6
|
-
|
|
7
|
-
# GET VERSION from mck_package.json
|
|
8
|
-
VERSIONSTRING=( v$(jq .version package.json) )
|
|
9
|
-
VERSION=(${VERSIONSTRING//[\"]/})
|
|
10
|
-
echo VERSION: $VERSION
|
|
11
|
-
|
|
12
|
-
rsync -r --verbose --exclude '*.mdx' --exclude '*Demo.js' --exclude 'props-type.js' --exclude 'prop-types.js' ./* dist
|
|
13
|
-
|
|
14
|
-
# #babel component to dist
|
|
15
|
-
#babel ./dist -d dist --copy-files
|
|
16
|
-
|
|
17
|
-
#copy option
|
|
18
|
-
#cp -r ./src/ dist
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
#npm login
|
|
22
|
-
#publish dist to npm
|
|
6
|
+
rsync -r --exclude=/dist ./* dist
|
|
23
7
|
cd dist
|
|
24
|
-
|
|
8
|
+
|
|
9
|
+
if [ "$1" == "stable" ]; then
|
|
10
|
+
npm version $(npm view @momo-kits/foundation@stable version)
|
|
11
|
+
npm version patch
|
|
12
|
+
npm publish --tag stable --access=public
|
|
13
|
+
elif [ "$1" == "latest" ]; then
|
|
14
|
+
npm version $(npm view @momo-kits/foundation@latest version)
|
|
15
|
+
npm publish --tag latest --access=public
|
|
16
|
+
else
|
|
17
|
+
npm version $(npm view @momo-kits/swipe@beta version)
|
|
18
|
+
npm version prerelease --preid=beta
|
|
19
|
+
npm publish --tag beta --access=public
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
PACKAGE_NAME=$(npm pkg get name)
|
|
23
|
+
NEW_PACKAGE_VERSION=$(npm pkg get version)
|
|
24
|
+
|
|
25
|
+
# Clean up
|
|
25
26
|
cd ..
|
|
26
27
|
rm -rf dist
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
##curl -X POST -H 'Content-Type: application/json' 'https://chat.googleapis.com/v1/spaces/AAAAbP8987c/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=UGSFRvk_oYb9uGsAgs31bVvMm6jDkmD8zihGm3eyaQA%3D&threadKey=JoaXTEYaNNkl' -d '{"text": "@momo-kits/swipe new version release: '*"$VERSION"*' https://www.npmjs.com/package/@momo-kits/swipe"}'
|