react-native-app-onboard 0.1.8 → 0.2.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/README.md +89 -7
- package/lib/commonjs/components/CustomPages.js +31 -54
- package/lib/commonjs/components/CustomPages.js.map +1 -1
- package/lib/commonjs/components/OnboardingPages.js +59 -74
- package/lib/commonjs/components/OnboardingPages.js.map +1 -1
- package/lib/commonjs/components/Page.js +8 -3
- package/lib/commonjs/components/Page.js.map +1 -1
- package/lib/commonjs/components/Pagination.js +75 -13
- package/lib/commonjs/components/Pagination.js.map +1 -1
- package/lib/commonjs/components/Swiper.js +58 -85
- package/lib/commonjs/components/Swiper.js.map +1 -1
- package/lib/commonjs/components/button.js +3 -1
- package/lib/commonjs/components/button.js.map +1 -1
- package/lib/commonjs/context/OnboardingContext.js +101 -21
- package/lib/commonjs/context/OnboardingContext.js.map +1 -1
- package/lib/commonjs/hooks/useOnboarding.js +1 -1
- package/lib/commonjs/hooks/useOnboarding.js.map +1 -1
- package/lib/commonjs/index.js +33 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/persistence.js +51 -0
- package/lib/commonjs/utils/persistence.js.map +1 -0
- package/lib/module/components/CustomPages.js +31 -54
- package/lib/module/components/CustomPages.js.map +1 -1
- package/lib/module/components/OnboardingPages.js +60 -75
- package/lib/module/components/OnboardingPages.js.map +1 -1
- package/lib/module/components/Page.js +8 -3
- package/lib/module/components/Page.js.map +1 -1
- package/lib/module/components/Pagination.js +76 -14
- package/lib/module/components/Pagination.js.map +1 -1
- package/lib/module/components/Swiper.js +59 -86
- package/lib/module/components/Swiper.js.map +1 -1
- package/lib/module/components/button.js +3 -1
- package/lib/module/components/button.js.map +1 -1
- package/lib/module/context/OnboardingContext.js +102 -22
- package/lib/module/context/OnboardingContext.js.map +1 -1
- package/lib/module/hooks/useOnboarding.js +1 -1
- package/lib/module/hooks/useOnboarding.js.map +1 -1
- package/lib/module/index.js +8 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/persistence.js +42 -0
- package/lib/module/utils/persistence.js.map +1 -0
- package/lib/typescript/src/components/CustomPages.d.ts +6 -2
- package/lib/typescript/src/components/CustomPages.d.ts.map +1 -1
- package/lib/typescript/src/components/OnboardingPages.d.ts +6 -2
- package/lib/typescript/src/components/OnboardingPages.d.ts.map +1 -1
- package/lib/typescript/src/components/Page.d.ts +2 -0
- package/lib/typescript/src/components/Page.d.ts.map +1 -1
- package/lib/typescript/src/components/Pagination.d.ts +9 -0
- package/lib/typescript/src/components/Pagination.d.ts.map +1 -1
- package/lib/typescript/src/components/Swiper.d.ts.map +1 -1
- package/lib/typescript/src/components/button.d.ts.map +1 -1
- package/lib/typescript/src/context/OnboardingContext.d.ts +9 -0
- package/lib/typescript/src/context/OnboardingContext.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useOnboarding.d.ts +3 -0
- package/lib/typescript/src/hooks/useOnboarding.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +13 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/persistence.d.ts +31 -0
- package/lib/typescript/src/utils/persistence.d.ts.map +1 -0
- package/package.json +25 -4
- package/src/components/CustomPages.tsx +63 -69
- package/src/components/OnboardingPages.tsx +79 -82
- package/src/components/Page.tsx +8 -2
- package/src/components/Pagination.tsx +121 -29
- package/src/components/Swiper.tsx +65 -87
- package/src/components/button.tsx +6 -1
- package/src/context/OnboardingContext.tsx +145 -26
- package/src/hooks/useOnboarding.tsx +1 -3
- package/src/index.tsx +16 -1
- package/src/types/index.ts +13 -0
- package/src/utils/persistence.ts +58 -0
|
@@ -4,12 +4,12 @@ const {
|
|
|
4
4
|
width,
|
|
5
5
|
height
|
|
6
6
|
} = Dimensions.get('window');
|
|
7
|
-
const
|
|
7
|
+
const portrait = height > width;
|
|
8
8
|
export function OnboardingPage(props) {
|
|
9
9
|
return /*#__PURE__*/React.createElement(View, {
|
|
10
10
|
style: [styles.container, {
|
|
11
11
|
width: props.width
|
|
12
|
-
}, props.containerStyle, props.swap && styles.swapStyle]
|
|
12
|
+
}, props.containerStyle, props.swap && styles.swapStyle, props.mirror && styles.mirror]
|
|
13
13
|
}, /*#__PURE__*/React.createElement(View, {
|
|
14
14
|
style: [styles.imageContainer, props.imageContainerStyle]
|
|
15
15
|
}, props.image), /*#__PURE__*/React.createElement(View, {
|
|
@@ -43,7 +43,7 @@ const styles = StyleSheet.create({
|
|
|
43
43
|
},
|
|
44
44
|
imageContainer: {
|
|
45
45
|
flex: 0,
|
|
46
|
-
paddingBottom:
|
|
46
|
+
paddingBottom: portrait ? 60 : 10,
|
|
47
47
|
alignItems: 'center',
|
|
48
48
|
width: '100%'
|
|
49
49
|
},
|
|
@@ -52,6 +52,11 @@ const styles = StyleSheet.create({
|
|
|
52
52
|
},
|
|
53
53
|
swapStyle: {
|
|
54
54
|
flexDirection: 'column-reverse'
|
|
55
|
+
},
|
|
56
|
+
mirror: {
|
|
57
|
+
transform: [{
|
|
58
|
+
scaleX: -1
|
|
59
|
+
}]
|
|
55
60
|
}
|
|
56
61
|
});
|
|
57
62
|
//# sourceMappingURL=Page.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","Text","StyleSheet","Dimensions","React","width","height","get","
|
|
1
|
+
{"version":3,"names":["View","Text","StyleSheet","Dimensions","React","width","height","get","portrait","OnboardingPage","props","createElement","style","styles","container","containerStyle","swap","swapStyle","mirror","imageContainer","imageContainerStyle","image","titleContainer","titleContainerStyle","title","color","titleStyle","subtitle","subtitleStyle","create","flex","justifyContent","alignItems","flexDirection","fontSize","fontWeight","paddingBottom","textAlign","marginHorizontal","transform","scaleX"],"sourceRoot":"../../../src","sources":["components/Page.tsx"],"mappings":"AAAA,SACEA,IAAI,EACJC,IAAI,EACJC,UAAU,EACVC,UAAU,QAIL,cAAc;AACrB,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,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE;EACjB,CAAC;EACDT,KAAK,EAAE;IACLU,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBC,aAAa,EAAE,EAAE;IACjBC,SAAS,EAAE;EACb,CAAC;EACDV,QAAQ,EAAE;IACRO,QAAQ,EAAE,EAAE;IACZG,SAAS,EAAE;EACb,CAAC;EACDlB,cAAc,EAAE;IACdW,IAAI,EAAE,CAAC;IACPM,aAAa,EAAE5B,QAAQ,GAAG,EAAE,GAAG,EAAE;IACjCwB,UAAU,EAAE,QAAQ;IACpB3B,KAAK,EAAE;EACT,CAAC;EACDiB,cAAc,EAAE;IACdgB,gBAAgB,EAAE;EACpB,CAAC;EACDrB,SAAS,EAAE;IACTgB,aAAa,EAAE;EACjB,CAAC;EACDf,MAAM,EAAE;IACNqB,SAAS,EAAE,CAAC;MAAEC,MAAM,EAAE,CAAC;IAAE,CAAC;EAC5B;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,28 +1,61 @@
|
|
|
1
|
-
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
import { View, Pressable, Animated, StyleSheet } from 'react-native';
|
|
2
3
|
import React from 'react';
|
|
4
|
+
import tinycolor from 'tinycolor2';
|
|
3
5
|
import { useOnboarding } from '../hooks/useOnboarding';
|
|
4
6
|
import { Button } from './button';
|
|
5
7
|
export function Pagination(props) {
|
|
6
8
|
const {
|
|
7
|
-
isDone
|
|
9
|
+
isDone,
|
|
10
|
+
currentPage,
|
|
11
|
+
progress,
|
|
12
|
+
scrollTo,
|
|
13
|
+
previousPage
|
|
8
14
|
} = useOnboarding();
|
|
9
15
|
const dots = Array.from({
|
|
10
16
|
length: props.numberOfScreens
|
|
11
17
|
}, (_, i) => i);
|
|
12
18
|
const width = props.width;
|
|
19
|
+
const showPrevious = props.showPrevious && currentPage > 0;
|
|
13
20
|
return /*#__PURE__*/React.createElement(View, {
|
|
14
21
|
style: [styles.pagination, {
|
|
15
22
|
backgroundColor: props.backgroundColor
|
|
16
23
|
}, props.paginationContainerStyle]
|
|
17
24
|
}, /*#__PURE__*/React.createElement(View, {
|
|
18
25
|
style: [styles.buttons, styles.leftButton, props.buttonLeftContainerStyle]
|
|
19
|
-
},
|
|
26
|
+
}, showPrevious && /*#__PURE__*/React.createElement(Button, {
|
|
27
|
+
onPress: () => previousPage(),
|
|
28
|
+
buttonTextStyle: props.previousLabelStyle,
|
|
29
|
+
buttonStyle: props.previousButtonContainerStyle,
|
|
30
|
+
label: props.previousLabel || 'Back'
|
|
31
|
+
}), !showPrevious && props.showSkip && !props.hasSkipPosition && /*#__PURE__*/React.createElement(Button, {
|
|
20
32
|
onPress: props.onSkip,
|
|
21
33
|
buttonTextStyle: props.skipLabelStyle,
|
|
22
34
|
buttonStyle: props.skipButtonContainerStyle,
|
|
23
35
|
label: props.skipLabel || 'Skip'
|
|
24
|
-
})), /*#__PURE__*/React.createElement(View, {
|
|
25
|
-
|
|
36
|
+
})), props.paginationStyle === 'progress' ? /*#__PURE__*/React.createElement(View, {
|
|
37
|
+
accessible: true,
|
|
38
|
+
accessibilityRole: "progressbar",
|
|
39
|
+
accessibilityValue: {
|
|
40
|
+
min: 0,
|
|
41
|
+
max: 100,
|
|
42
|
+
now: progress
|
|
43
|
+
},
|
|
44
|
+
style: [styles.progressTrack,
|
|
45
|
+
// Derive a faint track from the (background-aware) fill color so it
|
|
46
|
+
// stays visible on both light and dark pages.
|
|
47
|
+
{
|
|
48
|
+
backgroundColor: tinycolor(props.color).setAlpha(0.25).toRgbString()
|
|
49
|
+
},
|
|
50
|
+
// Mirror the fill direction so it grows from the trailing edge.
|
|
51
|
+
props.mirror && styles.mirror, props.progressBarStyle]
|
|
52
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
53
|
+
style: [styles.progressFill, {
|
|
54
|
+
backgroundColor: props.color,
|
|
55
|
+
width: `${progress}%`
|
|
56
|
+
}, props.progressBarFillStyle]
|
|
57
|
+
})) : /*#__PURE__*/React.createElement(View, {
|
|
58
|
+
style: [styles.dotsContainer, props.mirror && styles.mirror, props.dotsContainerStyle]
|
|
26
59
|
}, dots.map((_, i) => {
|
|
27
60
|
const inputRange = [(i - 1) * width, i * width, (i + 1) * width];
|
|
28
61
|
const dotOpacity = props.animatedValue.interpolate({
|
|
@@ -30,13 +63,27 @@ export function Pagination(props) {
|
|
|
30
63
|
outputRange: [0.3, 1, 0.3],
|
|
31
64
|
extrapolate: 'clamp'
|
|
32
65
|
});
|
|
33
|
-
|
|
66
|
+
const dotProps = {
|
|
67
|
+
accessibilityRole: props.dotsAreTappable ? 'button' : 'image',
|
|
68
|
+
accessibilityLabel: `Page ${i + 1} of ${props.numberOfScreens}`,
|
|
69
|
+
accessibilityState: {
|
|
70
|
+
selected: i === currentPage
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
const dot = /*#__PURE__*/React.createElement(Animated.View, {
|
|
34
74
|
key: i,
|
|
35
75
|
style: [styles.dot, {
|
|
36
76
|
backgroundColor: props.color,
|
|
37
77
|
opacity: dotOpacity
|
|
38
|
-
}
|
|
78
|
+
}]
|
|
39
79
|
});
|
|
80
|
+
return props.dotsAreTappable ? /*#__PURE__*/React.createElement(Pressable, _extends({
|
|
81
|
+
key: i,
|
|
82
|
+
onPress: () => scrollTo(i),
|
|
83
|
+
hitSlop: 8
|
|
84
|
+
}, dotProps), dot) : /*#__PURE__*/React.createElement(View, _extends({
|
|
85
|
+
key: i
|
|
86
|
+
}, dotProps), dot);
|
|
40
87
|
})), /*#__PURE__*/React.createElement(View, {
|
|
41
88
|
style: [styles.buttons, styles.rightButton, props.buttonRightContainerStyle]
|
|
42
89
|
}, !isDone && props.showNext && /*#__PURE__*/React.createElement(Button, {
|
|
@@ -69,22 +116,37 @@ const styles = StyleSheet.create({
|
|
|
69
116
|
},
|
|
70
117
|
dotsContainer: {
|
|
71
118
|
flexDirection: 'row',
|
|
72
|
-
flex:
|
|
73
|
-
justifyContent: 'center'
|
|
119
|
+
flex: 2,
|
|
120
|
+
justifyContent: 'center',
|
|
121
|
+
alignItems: 'center'
|
|
122
|
+
},
|
|
123
|
+
progressTrack: {
|
|
124
|
+
flex: 2,
|
|
125
|
+
height: 6,
|
|
126
|
+
borderRadius: 3,
|
|
127
|
+
marginHorizontal: 16,
|
|
128
|
+
overflow: 'hidden'
|
|
129
|
+
},
|
|
130
|
+
progressFill: {
|
|
131
|
+
height: '100%',
|
|
132
|
+
borderRadius: 3
|
|
74
133
|
},
|
|
75
134
|
text: {
|
|
76
135
|
fontSize: 16
|
|
77
136
|
},
|
|
78
137
|
buttons: {
|
|
79
|
-
|
|
138
|
+
flex: 1
|
|
80
139
|
},
|
|
81
140
|
rightButton: {
|
|
82
|
-
alignItems: 'flex-end'
|
|
83
|
-
paddingRight: 30
|
|
141
|
+
alignItems: 'flex-end'
|
|
84
142
|
},
|
|
85
143
|
leftButton: {
|
|
86
|
-
alignItems: 'flex-start'
|
|
87
|
-
|
|
144
|
+
alignItems: 'flex-start'
|
|
145
|
+
},
|
|
146
|
+
mirror: {
|
|
147
|
+
transform: [{
|
|
148
|
+
scaleX: -1
|
|
149
|
+
}]
|
|
88
150
|
}
|
|
89
151
|
});
|
|
90
152
|
//# sourceMappingURL=Pagination.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","Animated","StyleSheet","React","useOnboarding","Button","Pagination","props","isDone","dots","Array","from","length","numberOfScreens","_","i","width","createElement","style","styles","pagination","backgroundColor","paginationContainerStyle","buttons","leftButton","buttonLeftContainerStyle","showSkip","hasSkipPosition","
|
|
1
|
+
{"version":3,"names":["View","Pressable","Animated","StyleSheet","React","tinycolor","useOnboarding","Button","Pagination","props","isDone","currentPage","progress","scrollTo","previousPage","dots","Array","from","length","numberOfScreens","_","i","width","showPrevious","createElement","style","styles","pagination","backgroundColor","paginationContainerStyle","buttons","leftButton","buttonLeftContainerStyle","onPress","buttonTextStyle","previousLabelStyle","buttonStyle","previousButtonContainerStyle","label","previousLabel","showSkip","hasSkipPosition","onSkip","skipLabelStyle","skipButtonContainerStyle","skipLabel","paginationStyle","accessible","accessibilityRole","accessibilityValue","min","max","now","progressTrack","color","setAlpha","toRgbString","mirror","progressBarStyle","progressFill","progressBarFillStyle","dotsContainer","dotsContainerStyle","map","inputRange","dotOpacity","animatedValue","interpolate","outputRange","extrapolate","dotProps","dotsAreTappable","accessibilityLabel","accessibilityState","selected","dot","key","opacity","_extends","hitSlop","rightButton","buttonRightContainerStyle","showNext","onNext","nextLabel","nextLabelStyle","nextButtonContainerStyle","showDone","onDone","doneLabel","doneLabelStyle","doneButtonContainerStyle","create","flexDirection","justifyContent","alignItems","height","paddingVertical","paddingHorizontal","borderRadius","marginHorizontal","flex","overflow","text","fontSize","transform","scaleX"],"sourceRoot":"../../../src","sources":["components/Pagination.tsx"],"mappings":";AAAA,SACEA,IAAI,EACJC,SAAS,EACTC,QAAQ,EACRC,UAAU,QAIL,cAAc;AACrB,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,MAAM,QAAQ,UAAU;AAwCjC,OAAO,SAASC,UAAUA,CAACC,KAAkB,EAAE;EAC7C,MAAM;IAAEC,MAAM;IAAEC,WAAW;IAAEC,QAAQ;IAAEC,QAAQ;IAAEC;EAAa,CAAC,GAC7DR,aAAa,CAAC,CAAC;EACjB,MAAMS,IAAI,GAAGC,KAAK,CAACC,IAAI,CAAC;IAAEC,MAAM,EAAET,KAAK,CAACU;EAAgB,CAAC,EAAE,CAACC,CAAC,EAAEC,CAAC,KAAKA,CAAC,CAAC;EACvE,MAAMC,KAAK,GAAGb,KAAK,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AAC;EAC5B;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,101 +1,74 @@
|
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { OnboardingPages } from './OnboardingPages';
|
|
3
4
|
import { CustomPages } from './CustomPages';
|
|
4
|
-
import { Animated } from 'react-native';
|
|
5
|
+
import { Animated, I18nManager } from 'react-native';
|
|
5
6
|
import { useOnboarding } from '../hooks/useOnboarding';
|
|
6
7
|
export const Swiper = props => {
|
|
7
|
-
|
|
8
|
+
// `scrollX` is always JS-driven because the background-color interpolation
|
|
9
|
+
// cannot run on the native thread. When `useNativeDriver` is enabled we also
|
|
10
|
+
// keep `nativeScrollX`, driven natively, for transform/opacity animations
|
|
11
|
+
// (the pagination dots), and mirror its offset onto `scrollX` via a JS
|
|
12
|
+
// listener so the color interpolation keeps working.
|
|
13
|
+
const scrollX = React.useMemo(() => new Animated.Value(0), []);
|
|
14
|
+
const nativeScrollX = React.useMemo(() => new Animated.Value(0), []);
|
|
15
|
+
const nativeDriverEnabled = props.useNativeDriver ?? false;
|
|
16
|
+
const dotsAnimatedValue = nativeDriverEnabled ? nativeScrollX : scrollX;
|
|
17
|
+
|
|
18
|
+
// Direction handling: default to the device direction. We only mirror
|
|
19
|
+
// manually (via scaleX) when the requested direction differs from the
|
|
20
|
+
// device's — when they match, React Native already lays the row out
|
|
21
|
+
// correctly and an extra flip would double-invert it.
|
|
22
|
+
const rtl = props.rtl ?? I18nManager.isRTL;
|
|
23
|
+
const mirror = rtl !== I18nManager.isRTL;
|
|
8
24
|
const {
|
|
9
|
-
|
|
25
|
+
setFlatListRef,
|
|
10
26
|
setCurrentPage,
|
|
11
27
|
currentPage,
|
|
12
28
|
numberOfScreens,
|
|
13
29
|
nextPage,
|
|
14
|
-
scrollEnabled
|
|
30
|
+
scrollEnabled,
|
|
31
|
+
pauseAutoPlay
|
|
15
32
|
} = useOnboarding();
|
|
33
|
+
const onScroll = React.useMemo(() => nativeDriverEnabled ? Animated.event([{
|
|
34
|
+
nativeEvent: {
|
|
35
|
+
contentOffset: {
|
|
36
|
+
x: nativeScrollX
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}], {
|
|
40
|
+
useNativeDriver: true,
|
|
41
|
+
listener: event => scrollX.setValue(event.nativeEvent.contentOffset.x)
|
|
42
|
+
}) : Animated.event([{
|
|
43
|
+
nativeEvent: {
|
|
44
|
+
contentOffset: {
|
|
45
|
+
x: scrollX
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}], {
|
|
49
|
+
useNativeDriver: false
|
|
50
|
+
}), [nativeDriverEnabled, nativeScrollX, scrollX]);
|
|
51
|
+
|
|
52
|
+
// Stop autoplay as soon as the user takes manual control of the slider.
|
|
53
|
+
const onScrollBeginDrag = React.useCallback(() => pauseAutoPlay(), [pauseAutoPlay]);
|
|
54
|
+
const shared = {
|
|
55
|
+
setFlatListRef,
|
|
56
|
+
scrollX,
|
|
57
|
+
dotsAnimatedValue,
|
|
58
|
+
onScroll,
|
|
59
|
+
onScrollBeginDrag,
|
|
60
|
+
setPage: setCurrentPage,
|
|
61
|
+
currentPage,
|
|
62
|
+
numberOfScreens,
|
|
63
|
+
nextPage,
|
|
64
|
+
scrollEnabled,
|
|
65
|
+
mirror
|
|
66
|
+
};
|
|
16
67
|
if (props.children) {
|
|
17
|
-
return /*#__PURE__*/React.createElement(CustomPages, {
|
|
18
|
-
customFooter: props.customFooter,
|
|
19
|
-
showPagination: props.showPagination,
|
|
20
|
-
flatListRef: flatListRef,
|
|
21
|
-
scrollX: scrollX,
|
|
22
|
-
setPage: setCurrentPage,
|
|
23
|
-
scrollEnabled: scrollEnabled,
|
|
24
|
-
currentPage: currentPage,
|
|
25
|
-
numberOfScreens: numberOfScreens,
|
|
26
|
-
nextPage: nextPage,
|
|
27
|
-
showDone: props.showDone,
|
|
28
|
-
showNext: props.showNext,
|
|
29
|
-
onDone: props.onDone,
|
|
30
|
-
skipButtonContainerStyle: props.skipButtonContainerStyle,
|
|
31
|
-
nextButtonContainerStyle: props.nextButtonContainerStyle,
|
|
32
|
-
doneButtonContainerStyle: props.doneButtonContainerStyle,
|
|
33
|
-
skipButtonPosition: props.skipButtonPosition,
|
|
34
|
-
paginationContainerStyle: props.paginationContainerStyle,
|
|
35
|
-
paginationPosition: props.paginationPosition,
|
|
36
|
-
nextLabel: props.nextLabel,
|
|
37
|
-
skipLabel: props.skipLabel,
|
|
38
|
-
doneLabel: props.doneLabel,
|
|
39
|
-
showSkip: props.showSkip,
|
|
40
|
-
onSkip: props.onSkip,
|
|
41
|
-
scrollAnimationDuration: props.scrollAnimationDuration,
|
|
42
|
-
buttonLeftContainerStyle: props.buttonLeftContainerStyle,
|
|
43
|
-
buttonRightContainerStyle: props.buttonRightContainerStyle,
|
|
44
|
-
dotsContainerStyle: props.dotsContainerStyle,
|
|
45
|
-
doneLabelStyle: props.doneLabelStyle,
|
|
46
|
-
skipLabelStyle: props.skipLabelStyle,
|
|
47
|
-
nextLabelStyle: props.nextLabelStyle,
|
|
48
|
-
width: props.width,
|
|
49
|
-
color: props.color,
|
|
50
|
-
useNativeDriver: props.useNativeDriver,
|
|
51
|
-
imageContainerStyle: props.imageContainerStyle,
|
|
52
|
-
containerStyle: props.containerStyle,
|
|
53
|
-
titleContainerStyle: props.titleContainerStyle,
|
|
54
|
-
titleStyle: props.titleStyle,
|
|
55
|
-
subtitleStyle: props.subtitleStyle,
|
|
56
|
-
swap: props.swap
|
|
57
|
-
}, props.children);
|
|
68
|
+
return /*#__PURE__*/React.createElement(CustomPages, _extends({}, props, shared), props.children);
|
|
58
69
|
}
|
|
59
|
-
return /*#__PURE__*/React.createElement(OnboardingPages, {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
flatListRef: flatListRef,
|
|
63
|
-
scrollX: scrollX,
|
|
64
|
-
setPage: setCurrentPage,
|
|
65
|
-
currentPage: currentPage,
|
|
66
|
-
paginationPosition: props.paginationPosition,
|
|
67
|
-
nextPage: nextPage,
|
|
68
|
-
showSkip: props.showSkip,
|
|
69
|
-
onDone: props.onDone,
|
|
70
|
-
pages: props.pages || [],
|
|
71
|
-
width: props.width,
|
|
72
|
-
showNext: props.showNext,
|
|
73
|
-
skipButtonContainerStyle: props.skipButtonContainerStyle,
|
|
74
|
-
nextButtonContainerStyle: props.nextButtonContainerStyle,
|
|
75
|
-
doneButtonContainerStyle: props.doneButtonContainerStyle,
|
|
76
|
-
skipLabelStyle: props.skipLabelStyle,
|
|
77
|
-
skipButtonPosition: props.skipButtonPosition,
|
|
78
|
-
showPagination: props.showPagination,
|
|
79
|
-
color: props.color,
|
|
80
|
-
onSkip: props.onSkip,
|
|
81
|
-
swap: props.swap,
|
|
82
|
-
scrollEnabled: scrollEnabled,
|
|
83
|
-
nextLabel: props.nextLabel,
|
|
84
|
-
skipLabel: props.skipLabel,
|
|
85
|
-
doneLabel: props.doneLabel,
|
|
86
|
-
scrollAnimationDuration: props.scrollAnimationDuration,
|
|
87
|
-
buttonLeftContainerStyle: props.buttonLeftContainerStyle,
|
|
88
|
-
buttonRightContainerStyle: props.buttonRightContainerStyle,
|
|
89
|
-
dotsContainerStyle: props.dotsContainerStyle,
|
|
90
|
-
doneLabelStyle: props.doneLabelStyle,
|
|
91
|
-
nextLabelStyle: props.nextLabelStyle,
|
|
92
|
-
useNativeDriver: props.useNativeDriver,
|
|
93
|
-
imageContainerStyle: props.imageContainerStyle,
|
|
94
|
-
containerStyle: props.containerStyle,
|
|
95
|
-
titleContainerStyle: props.titleContainerStyle,
|
|
96
|
-
titleStyle: props.titleStyle,
|
|
97
|
-
subtitleStyle: props.subtitleStyle,
|
|
98
|
-
paginationContainerStyle: props.paginationContainerStyle
|
|
99
|
-
});
|
|
70
|
+
return /*#__PURE__*/React.createElement(OnboardingPages, _extends({}, props, shared, {
|
|
71
|
+
pages: props.pages || []
|
|
72
|
+
}));
|
|
100
73
|
};
|
|
101
74
|
//# sourceMappingURL=Swiper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","OnboardingPages","CustomPages","Animated","useOnboarding","Swiper","props","scrollX","
|
|
1
|
+
{"version":3,"names":["React","OnboardingPages","CustomPages","Animated","I18nManager","useOnboarding","Swiper","props","scrollX","useMemo","Value","nativeScrollX","nativeDriverEnabled","useNativeDriver","dotsAnimatedValue","rtl","isRTL","mirror","setFlatListRef","setCurrentPage","currentPage","numberOfScreens","nextPage","scrollEnabled","pauseAutoPlay","onScroll","event","nativeEvent","contentOffset","x","listener","setValue","onScrollBeginDrag","useCallback","shared","setPage","children","createElement","_extends","pages"],"sourceRoot":"../../../src","sources":["components/Swiper.tsx"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,WAAW,QAAQ,eAAe;AAC3C,SACEC,QAAQ,EACRC,WAAW,QAGN,cAAc;AACrB,SAASC,aAAa,QAAQ,wBAAwB;AAGtD,OAAO,MAAMC,MAAiC,GAAIC,KAAK,IAAK;EAC1D;EACA;EACA;EACA;EACA;EACA,MAAMC,OAAO,GAAGR,KAAK,CAACS,OAAO,CAAC,MAAM,IAAIN,QAAQ,CAACO,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;EAC9D,MAAMC,aAAa,GAAGX,KAAK,CAACS,OAAO,CAAC,MAAM,IAAIN,QAAQ,CAACO,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;EACpE,MAAME,mBAAmB,GAAGL,KAAK,CAACM,eAAe,IAAI,KAAK;EAC1D,MAAMC,iBAAiB,GAAGF,mBAAmB,GAAGD,aAAa,GAAGH,OAAO;;EAEvE;EACA;EACA;EACA;EACA,MAAMO,GAAG,GAAGR,KAAK,CAACQ,GAAG,IAAIX,WAAW,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AAK,CAAC6B,QACI,CAAC;EAElB;EAEA,oBAAOpC,KAAA,CAAAqC,aAAA,CAACpC,eAAe,EAAAqC,QAAA,KAAK/B,KAAK,EAAM2B,MAAM;IAAEK,KAAK,EAAEhC,KAAK,CAACgC,KAAK,IAAI;EAAG,EAAE,CAAC;AAC7E,CAAC","ignoreList":[]}
|
|
@@ -3,7 +3,9 @@ import React from 'react';
|
|
|
3
3
|
export const Button = props => {
|
|
4
4
|
return typeof props.label === 'string' ? /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
5
5
|
onPress: props.onPress,
|
|
6
|
-
style: props.buttonStyle
|
|
6
|
+
style: props.buttonStyle,
|
|
7
|
+
accessibilityRole: "button",
|
|
8
|
+
accessibilityLabel: props.label
|
|
7
9
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
8
10
|
style: [styles.text, {
|
|
9
11
|
color: props.color || 'white'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","Text","TouchableOpacity","React","Button","props","label","createElement","onPress","style","buttonStyle","styles","text","color","buttonTextStyle","SkipButton","top","left","position","undefined","right","skipButton","create","pagination","flexDirection","justifyContent","alignItems","height","paddingVertical","paddingHorizontal","dot","width","borderRadius","backgroundColor","marginHorizontal","dotsContainer","flex","fontSize","buttons","minWidth","rightButton","paddingRight","leftButton","paddingLeft","zIndex"],"sourceRoot":"../../../src","sources":["components/button.tsx"],"mappings":"AAAA,SACEA,UAAU,EACVC,IAAI,EACJC,gBAAgB,QAIX,cAAc;AACrB,OAAOC,KAAK,MAAM,OAAO;AAUzB,OAAO,MAAMC,MAAM,GAAIC,KAAkB,IAAK;EAC5C,OAAO,OAAOA,KAAK,CAACC,KAAK,KAAK,QAAQ,gBACpCH,KAAA,CAAAI,aAAA,CAACL,gBAAgB;
|
|
1
|
+
{"version":3,"names":["StyleSheet","Text","TouchableOpacity","React","Button","props","label","createElement","onPress","style","buttonStyle","accessibilityRole","accessibilityLabel","styles","text","color","buttonTextStyle","SkipButton","top","left","position","undefined","right","skipButton","create","pagination","flexDirection","justifyContent","alignItems","height","paddingVertical","paddingHorizontal","dot","width","borderRadius","backgroundColor","marginHorizontal","dotsContainer","flex","fontSize","buttons","minWidth","rightButton","paddingRight","leftButton","paddingLeft","zIndex"],"sourceRoot":"../../../src","sources":["components/button.tsx"],"mappings":"AAAA,SACEA,UAAU,EACVC,IAAI,EACJC,gBAAgB,QAIX,cAAc;AACrB,OAAOC,KAAK,MAAM,OAAO;AAUzB,OAAO,MAAMC,MAAM,GAAIC,KAAkB,IAAK;EAC5C,OAAO,OAAOA,KAAK,CAACC,KAAK,KAAK,QAAQ,gBACpCH,KAAA,CAAAI,aAAA,CAACL,gBAAgB;IACfM,OAAO,EAAEH,KAAK,CAACG,OAAQ;IACvBC,KAAK,EAAEJ,KAAK,CAACK,WAAY;IACzBC,iBAAiB,EAAC,QAAQ;IAC1BC,kBAAkB,EAAEP,KAAK,CAACC;EAAM,gBAEhCH,KAAA,CAAAI,aAAA,CAACN,IAAI;IACHQ,KAAK,EAAE,CACLI,MAAM,CAACC,IAAI,EACX;MACEC,KAAK,EAAEV,KAAK,CAACU,KAAK,IAAI;IACxB,CAAC,EACDV,KAAK,CAACW,eAAe;EACrB,GAEDX,KAAK,CAACC,KACH,CACU,CAAC,GAEnBD,KAAK,CAACC,KACP;AACH,CAAC;AAED,OAAO,MAAMW,UAAU,GACrBZ,KAEC,IACE;EACH,MAAMK,WAAW,GAAG;IAClBQ,GAAG,EAAE,EAAE;IACPC,IAAI,EAAEd,KAAK,CAACe,QAAQ,KAAK,UAAU,GAAG,EAAE,GAAGC,SAAS;IACpDC,KAAK,EAAEjB,KAAK,CAACe,QAAQ,KAAK,WAAW,GAAG,EAAE,GAAGC;EAC/C,CAAC;EAED,oBACElB,KAAA,CAAAI,aAAA,CAACH,MAAM;IACLE,KAAK,EAAED,KAAK,CAACC,KAAK,IAAI,MAAO;IAC7BE,OAAO,EAAEH,KAAK,CAACG,OAAQ;IACvBE,WAAW,EAAE,CAACG,MAAM,CAACU,UAAU,EAAEb,WAAW,EAAEL,KAAK,CAACK,WAAW,CAAE;IACjEM,eAAe,EAAEX,KAAK,CAACW,eAAgB;IACvCD,KAAK,EAAEV,KAAK,CAACU;EAAM,CACpB,CAAC;AAEN,CAAC;AAED,MAAMF,MAAM,GAAGb,UAAU,CAACwB,MAAM,CAAC;EAC/BC,UAAU,EAAE;IACVC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,eAAe;IAC/BC,UAAU,EAAE,QAAQ;IACpBC,MAAM,EAAE,EAAE;IACVC,eAAe,EAAE,EAAE;IACnBC,iBAAiB,EAAE;EACrB,CAAC;EACDC,GAAG,EAAE;IACHH,MAAM,EAAE,EAAE;IACVI,KAAK,EAAE,EAAE;IACTC,YAAY,EAAE,CAAC;IACfC,eAAe,EAAE,MAAM;IACvBC,gBAAgB,EAAE;EACpB,CAAC;EACDC,aAAa,EAAE;IACbX,aAAa,EAAE,KAAK;IACpBY,IAAI,EAAE,CAAC;IACPX,cAAc,EAAE;EAClB,CAAC;EACDb,IAAI,EAAE;IACJyB,QAAQ,EAAE;EACZ,CAAC;EACDC,OAAO,EAAE;IACPC,QAAQ,EAAE;EACZ,CAAC;EACDC,WAAW,EAAE;IACXd,UAAU,EAAE,UAAU;IACtBe,YAAY,EAAE;EAChB,CAAC;EACDC,UAAU,EAAE;IACVhB,UAAU,EAAE,YAAY;IACxBiB,WAAW,EAAE;EACf,CAAC;EACDtB,UAAU,EAAE;IACVH,QAAQ,EAAE,UAAU;IACpB0B,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Dimensions } from 'react-native';
|
|
2
|
+
import { AccessibilityInfo, Animated, Dimensions } from 'react-native';
|
|
3
3
|
export const OnboardingContext = /*#__PURE__*/React.createContext(undefined);
|
|
4
4
|
export const OnboardingProvider = ({
|
|
5
5
|
children,
|
|
6
|
-
width
|
|
6
|
+
width: widthProp,
|
|
7
7
|
numberOfScreens,
|
|
8
|
-
scrollEnabled
|
|
8
|
+
scrollEnabled,
|
|
9
|
+
onPageChange,
|
|
10
|
+
scrollAnimationDuration,
|
|
11
|
+
autoPlay = false,
|
|
12
|
+
autoPlayInterval = 3000,
|
|
13
|
+
loop = false
|
|
9
14
|
}) => {
|
|
15
|
+
const width = widthProp ?? Dimensions.get('window').width;
|
|
10
16
|
const getProgress = page => {
|
|
11
17
|
return Math.round((page + 1) / numberOfScreens * 100);
|
|
12
18
|
};
|
|
@@ -15,40 +21,114 @@ export const OnboardingProvider = ({
|
|
|
15
21
|
const [isDone, setIsDone] = React.useState(false);
|
|
16
22
|
const [enableScroll, setEnableScroll] = React.useState(scrollEnabled);
|
|
17
23
|
const flatListRef = React.useRef(null);
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
const setFlatListRef = React.useCallback(node => {
|
|
25
|
+
flatListRef.current = node;
|
|
26
|
+
}, []);
|
|
27
|
+
// Tracks the latest page so timers/animations read a fresh value without
|
|
28
|
+
// needing to be recreated on every page change.
|
|
29
|
+
const currentPageRef = React.useRef(0);
|
|
30
|
+
const [isAutoPlaying, setIsAutoPlaying] = React.useState(autoPlay);
|
|
31
|
+
|
|
32
|
+
// Keep autoplay in sync if the `autoPlay` prop is toggled after mount.
|
|
33
|
+
React.useEffect(() => {
|
|
34
|
+
setIsAutoPlaying(autoPlay);
|
|
35
|
+
}, [autoPlay]);
|
|
36
|
+
|
|
37
|
+
// Dedicated value used to honor a custom scrollAnimationDuration. FlatList's
|
|
38
|
+
// own animated scroll has a fixed, platform-controlled duration, so when a
|
|
39
|
+
// duration is requested we drive the offset manually via this value.
|
|
40
|
+
const scrollAnim = React.useMemo(() => new Animated.Value(0), []);
|
|
41
|
+
React.useEffect(() => {
|
|
42
|
+
const id = scrollAnim.addListener(({
|
|
43
|
+
value
|
|
44
|
+
}) => {
|
|
45
|
+
var _flatListRef$current;
|
|
46
|
+
(_flatListRef$current = flatListRef.current) === null || _flatListRef$current === void 0 || _flatListRef$current.scrollToOffset({
|
|
47
|
+
offset: value,
|
|
48
|
+
animated: false
|
|
28
49
|
});
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
32
|
-
const
|
|
33
|
-
if (flatListRef.current
|
|
50
|
+
});
|
|
51
|
+
return () => scrollAnim.removeListener(id);
|
|
52
|
+
}, [scrollAnim]);
|
|
53
|
+
const animateToOffset = React.useCallback((offset, animated) => {
|
|
54
|
+
if (!flatListRef.current) return;
|
|
55
|
+
if (animated && scrollAnimationDuration) {
|
|
56
|
+
scrollAnim.stopAnimation();
|
|
57
|
+
scrollAnim.setValue(width * currentPageRef.current);
|
|
58
|
+
Animated.timing(scrollAnim, {
|
|
59
|
+
toValue: offset,
|
|
60
|
+
duration: scrollAnimationDuration,
|
|
61
|
+
useNativeDriver: false
|
|
62
|
+
}).start();
|
|
63
|
+
} else {
|
|
34
64
|
flatListRef.current.scrollToOffset({
|
|
35
|
-
offset
|
|
36
|
-
animated
|
|
65
|
+
offset,
|
|
66
|
+
animated
|
|
37
67
|
});
|
|
68
|
+
}
|
|
69
|
+
}, [scrollAnim, scrollAnimationDuration, width]);
|
|
70
|
+
const setCurrentPage = React.useCallback(index => {
|
|
71
|
+
setPage(index);
|
|
72
|
+
currentPageRef.current = index;
|
|
73
|
+
setProgress(Math.round((index + 1) / numberOfScreens * 100));
|
|
74
|
+
setIsDone(index === numberOfScreens - 1);
|
|
75
|
+
onPageChange === null || onPageChange === void 0 || onPageChange(index);
|
|
76
|
+
// No-op when no screen reader is active; announces the page otherwise.
|
|
77
|
+
AccessibilityInfo.announceForAccessibility(`Page ${index + 1} of ${numberOfScreens}`);
|
|
78
|
+
}, [numberOfScreens, onPageChange]);
|
|
79
|
+
const nextPage = React.useCallback((animated = true) => {
|
|
80
|
+
const current = currentPageRef.current;
|
|
81
|
+
if (current < numberOfScreens - 1) {
|
|
82
|
+
animateToOffset(width * (current + 1), animated);
|
|
83
|
+
setCurrentPage(current + 1);
|
|
84
|
+
} else if (loop) {
|
|
85
|
+
animateToOffset(0, animated);
|
|
86
|
+
setCurrentPage(0);
|
|
87
|
+
}
|
|
88
|
+
}, [numberOfScreens, loop, width, animateToOffset, setCurrentPage]);
|
|
89
|
+
const previousPage = React.useCallback((animated = true) => {
|
|
90
|
+
const current = currentPageRef.current;
|
|
91
|
+
if (current > 0) {
|
|
92
|
+
animateToOffset(width * (current - 1), animated);
|
|
93
|
+
setCurrentPage(current - 1);
|
|
94
|
+
} else if (loop) {
|
|
95
|
+
animateToOffset(width * (numberOfScreens - 1), animated);
|
|
96
|
+
setCurrentPage(numberOfScreens - 1);
|
|
97
|
+
}
|
|
98
|
+
}, [numberOfScreens, loop, width, animateToOffset, setCurrentPage]);
|
|
99
|
+
const scrollTo = React.useCallback((index, animated = true) => {
|
|
100
|
+
if (index >= 0 && index < numberOfScreens) {
|
|
101
|
+
animateToOffset(index * width, animated);
|
|
38
102
|
setCurrentPage(index);
|
|
39
103
|
}
|
|
40
|
-
};
|
|
104
|
+
}, [numberOfScreens, width, animateToOffset, setCurrentPage]);
|
|
105
|
+
const pauseAutoPlay = React.useCallback(() => setIsAutoPlaying(false), []);
|
|
106
|
+
const resumeAutoPlay = React.useCallback(() => setIsAutoPlaying(autoPlay), [autoPlay]);
|
|
107
|
+
|
|
108
|
+
// Autoplay timer. Recreated whenever the page changes so it always advances
|
|
109
|
+
// from the current position; pauses when the user interacts with the slider.
|
|
110
|
+
React.useEffect(() => {
|
|
111
|
+
if (!isAutoPlaying || numberOfScreens <= 1) return;
|
|
112
|
+
if (!loop && currentPage >= numberOfScreens - 1) return;
|
|
113
|
+
const timer = setTimeout(() => nextPage(true), autoPlayInterval);
|
|
114
|
+
return () => clearTimeout(timer);
|
|
115
|
+
}, [isAutoPlaying, currentPage, numberOfScreens, autoPlayInterval, loop, nextPage]);
|
|
41
116
|
const contextValue = {
|
|
42
117
|
scrollEnabled: enableScroll,
|
|
43
118
|
enableScroll: setEnableScroll,
|
|
119
|
+
width,
|
|
44
120
|
currentPage,
|
|
45
121
|
numberOfScreens,
|
|
46
122
|
nextPage,
|
|
123
|
+
previousPage,
|
|
47
124
|
setCurrentPage,
|
|
48
125
|
flatListRef,
|
|
126
|
+
setFlatListRef,
|
|
49
127
|
scrollTo,
|
|
50
128
|
progress,
|
|
51
|
-
isDone
|
|
129
|
+
isDone,
|
|
130
|
+
pauseAutoPlay,
|
|
131
|
+
resumeAutoPlay
|
|
52
132
|
};
|
|
53
133
|
return /*#__PURE__*/React.createElement(OnboardingContext.Provider, {
|
|
54
134
|
value: contextValue
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Dimensions","OnboardingContext","createContext","undefined","OnboardingProvider","children","width","
|
|
1
|
+
{"version":3,"names":["React","AccessibilityInfo","Animated","Dimensions","OnboardingContext","createContext","undefined","OnboardingProvider","children","width","widthProp","numberOfScreens","scrollEnabled","onPageChange","scrollAnimationDuration","autoPlay","autoPlayInterval","loop","get","getProgress","page","Math","round","currentPage","setPage","useState","progress","setProgress","isDone","setIsDone","enableScroll","setEnableScroll","flatListRef","useRef","setFlatListRef","useCallback","node","current","currentPageRef","isAutoPlaying","setIsAutoPlaying","useEffect","scrollAnim","useMemo","Value","id","addListener","value","_flatListRef$current","scrollToOffset","offset","animated","removeListener","animateToOffset","stopAnimation","setValue","timing","toValue","duration","useNativeDriver","start","setCurrentPage","index","announceForAccessibility","nextPage","previousPage","scrollTo","pauseAutoPlay","resumeAutoPlay","timer","setTimeout","clearTimeout","contextValue","createElement","Provider"],"sourceRoot":"../../../src","sources":["context/OnboardingContext.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,iBAAiB,EACjBC,QAAQ,EACRC,UAAU,QAEL,cAAc;AAwCrB,OAAO,M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