@mpxjs/webpack-plugin 2.10.16-beta.11 → 2.10.16-beta.13
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/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.jsx +1 -1
- package/lib/runtime/components/react/dist/mpx-swiper.d.ts +10 -0
- package/lib/runtime/components/react/dist/mpx-swiper.d.ts.map +1 -1
- package/lib/runtime/components/react/dist/mpx-swiper.jsx +26 -16
- package/lib/runtime/components/react/mpx-keyboard-avoiding-view.tsx +1 -1
- package/lib/runtime/components/react/mpx-swiper.tsx +41 -15
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ const KeyboardAvoidingView = ({ children, style, contentContainerStyle }) => {
|
|
|
16
16
|
const isShow = useRef(false);
|
|
17
17
|
const animatedStyle = useAnimatedStyle(() => ({
|
|
18
18
|
// translate/position top可能会导致底部渲染区域缺失
|
|
19
|
-
|
|
19
|
+
transform: [{ translateY: -offset.value }],
|
|
20
20
|
flexBasis: basic.value
|
|
21
21
|
}));
|
|
22
22
|
const resetKeyboard = () => {
|
|
@@ -5,6 +5,11 @@ import { GestureHandler } from './utils';
|
|
|
5
5
|
/**
|
|
6
6
|
* ✔ indicator-dots
|
|
7
7
|
* ✔ indicator-color
|
|
8
|
+
* ✔ indicator-width
|
|
9
|
+
* ✔ indicator-height
|
|
10
|
+
* ✔ indicator-radius
|
|
11
|
+
* ✔ indicator-spacing
|
|
12
|
+
* ✔ indicator-margin
|
|
8
13
|
* ✔ indicator-active-color
|
|
9
14
|
* ✔ autoplay
|
|
10
15
|
* ✔ current
|
|
@@ -29,6 +34,11 @@ interface SwiperProps {
|
|
|
29
34
|
scale?: boolean;
|
|
30
35
|
'indicator-dots'?: boolean;
|
|
31
36
|
'indicator-color'?: string;
|
|
37
|
+
'indicator-width'?: number;
|
|
38
|
+
'indicator-height'?: number;
|
|
39
|
+
'indicator-spacing'?: number;
|
|
40
|
+
'indicator-radius'?: number;
|
|
41
|
+
'indicator-margin'?: number;
|
|
32
42
|
'indicator-active-color'?: string;
|
|
33
43
|
vertical?: boolean;
|
|
34
44
|
style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mpx-swiper.d.ts","sourceRoot":"","sources":["../mpx-swiper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,oBAAoB,EAAqB,MAAM,cAAc,CAAA;AAI5E,OAAO,KAAK,EAAE,EAAsC,SAAS,EAAwC,MAAM,OAAO,CAAA;AAElH,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAoF,cAAc,EAAmC,MAAM,SAAS,CAAA;AAG3J
|
|
1
|
+
{"version":3,"file":"mpx-swiper.d.ts","sourceRoot":"","sources":["../mpx-swiper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,oBAAoB,EAAqB,MAAM,cAAc,CAAA;AAI5E,OAAO,KAAK,EAAE,EAAsC,SAAS,EAAwC,MAAM,OAAO,CAAA;AAElH,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAoF,cAAc,EAAmC,MAAM,SAAS,CAAA;AAG3J;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,KAAK,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,aAAa,GAAG,cAAc,GAAG,gBAAgB,CAAA;AAUxF,UAAU,WAAW;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAA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
|
flexDirection: 'row',
|
|
20
20
|
flex: 1,
|
|
21
21
|
justifyContent: 'center',
|
|
22
|
-
alignItems: '
|
|
22
|
+
alignItems: 'flex-end'
|
|
23
23
|
},
|
|
24
24
|
pagination_y: {
|
|
25
25
|
position: 'absolute',
|
|
26
|
-
right:
|
|
26
|
+
right: 0,
|
|
27
27
|
top: 0,
|
|
28
28
|
bottom: 0,
|
|
29
29
|
flexDirection: 'column',
|
|
30
30
|
flex: 1,
|
|
31
31
|
justifyContent: 'center',
|
|
32
|
-
alignItems: '
|
|
32
|
+
alignItems: 'flex-end'
|
|
33
33
|
},
|
|
34
34
|
pagerWrapperx: {
|
|
35
35
|
position: 'absolute',
|
|
@@ -49,16 +49,6 @@ const styles = {
|
|
|
49
49
|
justifyContent: 'flex-start'
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
const dotCommonStyle = {
|
|
53
|
-
width: 8,
|
|
54
|
-
height: 8,
|
|
55
|
-
borderRadius: 4,
|
|
56
|
-
marginLeft: 3,
|
|
57
|
-
marginRight: 3,
|
|
58
|
-
marginTop: 3,
|
|
59
|
-
marginBottom: 3,
|
|
60
|
-
zIndex: 98
|
|
61
|
-
};
|
|
62
52
|
const activeDotStyle = {
|
|
63
53
|
zIndex: 99
|
|
64
54
|
};
|
|
@@ -71,7 +61,17 @@ const easeMap = {
|
|
|
71
61
|
easeInOutCubic: Easing.inOut(Easing.cubic)
|
|
72
62
|
};
|
|
73
63
|
const SwiperWrapper = forwardRef((props, ref) => {
|
|
74
|
-
const { 'indicator-dots': showPagination, 'indicator-color': dotColor = 'rgba(0, 0, 0, .3)', 'indicator-active-color': activeDotColor = '#000000', 'enable-var': enableVar = false, 'parent-font-size': parentFontSize, 'parent-width': parentWidth, 'parent-height': parentHeight, 'external-var-context': externalVarContext, 'simultaneous-handlers': originSimultaneousHandlers = [], 'wait-for': waitFor = [], style = {}, autoplay = false, circular = false, disableGesture = false, current: propCurrent, bindchange } = props;
|
|
64
|
+
const { 'indicator-dots': showPagination, 'indicator-color': dotColor = 'rgba(0, 0, 0, .3)', 'indicator-width': dotWidth = 8, 'indicator-height': dotHeight = 8, 'indicator-radius': dotRadius = 4, 'indicator-spacing': dotSpacing = 4, 'indicator-margin': paginationMargin = 10, 'indicator-active-color': activeDotColor = '#000000', 'enable-var': enableVar = false, 'parent-font-size': parentFontSize, 'parent-width': parentWidth, 'parent-height': parentHeight, 'external-var-context': externalVarContext, 'simultaneous-handlers': originSimultaneousHandlers = [], 'wait-for': waitFor = [], style = {}, autoplay = false, circular = false, disableGesture = false, current: propCurrent, bindchange } = props;
|
|
65
|
+
const dotCommonStyle = {
|
|
66
|
+
width: dotWidth,
|
|
67
|
+
height: dotHeight,
|
|
68
|
+
borderRadius: dotRadius,
|
|
69
|
+
marginLeft: dotSpacing,
|
|
70
|
+
marginRight: dotSpacing,
|
|
71
|
+
marginTop: dotSpacing,
|
|
72
|
+
marginBottom: dotSpacing,
|
|
73
|
+
zIndex: 98
|
|
74
|
+
};
|
|
75
75
|
const easeingFunc = props['easing-function'] || 'default';
|
|
76
76
|
const easeDuration = props.duration || 500;
|
|
77
77
|
const horizontal = props.vertical !== undefined ? !props.vertical : true;
|
|
@@ -193,7 +193,17 @@ const SwiperWrapper = forwardRef((props, ref) => {
|
|
|
193
193
|
for (let i = 0; i < children.length; i++) {
|
|
194
194
|
dots.push(<View style={[dotCommonStyle, { backgroundColor: unActionColor }]} key={i}></View>);
|
|
195
195
|
}
|
|
196
|
-
|
|
196
|
+
let paginationStyle = styles['pagination_' + dir];
|
|
197
|
+
if (paginationMargin) {
|
|
198
|
+
paginationStyle = {
|
|
199
|
+
...paginationStyle,
|
|
200
|
+
marginBottom: paginationMargin,
|
|
201
|
+
marginLeft: paginationMargin,
|
|
202
|
+
marginRight: paginationMargin,
|
|
203
|
+
marginTop: paginationMargin
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
return (<View pointerEvents="none" style={paginationStyle}>
|
|
197
207
|
<View style={[styles['pagerWrapper' + dir]]}>
|
|
198
208
|
<Animated.View style={[
|
|
199
209
|
dotCommonStyle,
|
|
@@ -26,7 +26,7 @@ const KeyboardAvoidingView = ({ children, style, contentContainerStyle }: Keyboa
|
|
|
26
26
|
|
|
27
27
|
const animatedStyle = useAnimatedStyle(() => ({
|
|
28
28
|
// translate/position top可能会导致底部渲染区域缺失
|
|
29
|
-
|
|
29
|
+
transform: [{ translateY: -offset.value }],
|
|
30
30
|
flexBasis: basic.value as DimensionValue
|
|
31
31
|
}))
|
|
32
32
|
|
|
@@ -11,6 +11,11 @@ import Portal from './mpx-portal'
|
|
|
11
11
|
/**
|
|
12
12
|
* ✔ indicator-dots
|
|
13
13
|
* ✔ indicator-color
|
|
14
|
+
* ✔ indicator-width
|
|
15
|
+
* ✔ indicator-height
|
|
16
|
+
* ✔ indicator-radius
|
|
17
|
+
* ✔ indicator-spacing
|
|
18
|
+
* ✔ indicator-margin
|
|
14
19
|
* ✔ indicator-active-color
|
|
15
20
|
* ✔ autoplay
|
|
16
21
|
* ✔ current
|
|
@@ -46,6 +51,11 @@ interface SwiperProps {
|
|
|
46
51
|
scale?: boolean
|
|
47
52
|
'indicator-dots'?: boolean
|
|
48
53
|
'indicator-color'?: string
|
|
54
|
+
'indicator-width'?: number
|
|
55
|
+
'indicator-height'?: number
|
|
56
|
+
'indicator-spacing'?: number
|
|
57
|
+
'indicator-radius'?: number
|
|
58
|
+
'indicator-margin'?: number
|
|
49
59
|
'indicator-active-color'?: string
|
|
50
60
|
vertical?: boolean
|
|
51
61
|
style: {
|
|
@@ -72,23 +82,23 @@ interface SwiperProps {
|
|
|
72
82
|
const styles: { [key: string]: Object } = {
|
|
73
83
|
pagination_x: {
|
|
74
84
|
position: 'absolute',
|
|
75
|
-
bottom:
|
|
85
|
+
bottom: 0,
|
|
76
86
|
left: 0,
|
|
77
87
|
right: 0,
|
|
78
88
|
flexDirection: 'row',
|
|
79
89
|
flex: 1,
|
|
80
90
|
justifyContent: 'center',
|
|
81
|
-
alignItems: '
|
|
91
|
+
alignItems: 'flex-end'
|
|
82
92
|
},
|
|
83
93
|
pagination_y: {
|
|
84
94
|
position: 'absolute',
|
|
85
|
-
right:
|
|
95
|
+
right: 0,
|
|
86
96
|
top: 0,
|
|
87
97
|
bottom: 0,
|
|
88
98
|
flexDirection: 'column',
|
|
89
99
|
flex: 1,
|
|
90
100
|
justifyContent: 'center',
|
|
91
|
-
alignItems: '
|
|
101
|
+
alignItems: 'flex-end'
|
|
92
102
|
},
|
|
93
103
|
pagerWrapperx: {
|
|
94
104
|
position: 'absolute',
|
|
@@ -109,16 +119,6 @@ const styles: { [key: string]: Object } = {
|
|
|
109
119
|
}
|
|
110
120
|
}
|
|
111
121
|
|
|
112
|
-
const dotCommonStyle = {
|
|
113
|
-
width: 8,
|
|
114
|
-
height: 8,
|
|
115
|
-
borderRadius: 4,
|
|
116
|
-
marginLeft: 3,
|
|
117
|
-
marginRight: 3,
|
|
118
|
-
marginTop: 3,
|
|
119
|
-
marginBottom: 3,
|
|
120
|
-
zIndex: 98
|
|
121
|
-
}
|
|
122
122
|
const activeDotStyle = {
|
|
123
123
|
zIndex: 99
|
|
124
124
|
}
|
|
@@ -136,6 +136,11 @@ const SwiperWrapper = forwardRef<HandlerRef<View, SwiperProps>, SwiperProps>((pr
|
|
|
136
136
|
const {
|
|
137
137
|
'indicator-dots': showPagination,
|
|
138
138
|
'indicator-color': dotColor = 'rgba(0, 0, 0, .3)',
|
|
139
|
+
'indicator-width': dotWidth = 8,
|
|
140
|
+
'indicator-height': dotHeight = 8,
|
|
141
|
+
'indicator-radius': dotRadius = 4,
|
|
142
|
+
'indicator-spacing': dotSpacing = 4,
|
|
143
|
+
'indicator-margin': paginationMargin = 10,
|
|
139
144
|
'indicator-active-color': activeDotColor = '#000000',
|
|
140
145
|
'enable-var': enableVar = false,
|
|
141
146
|
'parent-font-size': parentFontSize,
|
|
@@ -151,6 +156,17 @@ const SwiperWrapper = forwardRef<HandlerRef<View, SwiperProps>, SwiperProps>((pr
|
|
|
151
156
|
current: propCurrent,
|
|
152
157
|
bindchange
|
|
153
158
|
} = props
|
|
159
|
+
|
|
160
|
+
const dotCommonStyle = {
|
|
161
|
+
width: dotWidth,
|
|
162
|
+
height: dotHeight,
|
|
163
|
+
borderRadius: dotRadius,
|
|
164
|
+
marginLeft: dotSpacing,
|
|
165
|
+
marginRight: dotSpacing,
|
|
166
|
+
marginTop: dotSpacing,
|
|
167
|
+
marginBottom: dotSpacing,
|
|
168
|
+
zIndex: 98
|
|
169
|
+
}
|
|
154
170
|
const easeingFunc = props['easing-function'] || 'default'
|
|
155
171
|
const easeDuration = props.duration || 500
|
|
156
172
|
const horizontal = props.vertical !== undefined ? !props.vertical : true
|
|
@@ -294,8 +310,18 @@ const SwiperWrapper = forwardRef<HandlerRef<View, SwiperProps>, SwiperProps>((pr
|
|
|
294
310
|
for (let i = 0; i < children.length; i++) {
|
|
295
311
|
dots.push(<View style={[dotCommonStyle, { backgroundColor: unActionColor }]} key={i}></View>)
|
|
296
312
|
}
|
|
313
|
+
let paginationStyle = styles['pagination_' + dir]
|
|
314
|
+
if (paginationMargin) {
|
|
315
|
+
paginationStyle = {
|
|
316
|
+
...paginationStyle,
|
|
317
|
+
marginBottom: paginationMargin,
|
|
318
|
+
marginLeft: paginationMargin,
|
|
319
|
+
marginRight: paginationMargin,
|
|
320
|
+
marginTop: paginationMargin
|
|
321
|
+
}
|
|
322
|
+
}
|
|
297
323
|
return (
|
|
298
|
-
<View pointerEvents="none" style={
|
|
324
|
+
<View pointerEvents="none" style={paginationStyle}>
|
|
299
325
|
<View style={[styles['pagerWrapper' + dir]]}>
|
|
300
326
|
<Animated.View style={[
|
|
301
327
|
dotCommonStyle,
|