@jamadd/react-native-template-ui 0.8.5 → 0.8.7
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/module/components/button/AnimatedThemedPressable.js +13 -3
- package/lib/module/components/button/AnimatedThemedPressable.js.map +1 -1
- package/lib/module/components/button/ThemedButton.js +84 -23
- package/lib/module/components/button/ThemedButton.js.map +1 -1
- package/lib/module/components/button/ThemedIconButton.js +62 -16
- package/lib/module/components/button/ThemedIconButton.js.map +1 -1
- package/lib/module/components/button/ThemedIconTextButton.js +118 -29
- package/lib/module/components/button/ThemedIconTextButton.js.map +1 -1
- package/lib/module/components/button/ThemedPressable.js +13 -3
- package/lib/module/components/button/ThemedPressable.js.map +1 -1
- package/lib/module/components/icon/ThemedIcon.js +56 -15
- package/lib/module/components/icon/ThemedIcon.js.map +1 -1
- package/lib/module/components/list/List.js +131 -39
- package/lib/module/components/list/List.js.map +1 -1
- package/lib/module/components/loading/ThemedLoading.js +50 -13
- package/lib/module/components/loading/ThemedLoading.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheet.js +64 -19
- package/lib/module/components/overlay/actionSheet/ActionSheet.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheet.web.js +76 -0
- package/lib/module/components/overlay/actionSheet/ActionSheet.web.js.map +1 -0
- package/lib/module/components/overlay/actionSheet/ActionSheetContentGesture.js +19 -8
- package/lib/module/components/overlay/actionSheet/ActionSheetContentGesture.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetHeader.js +87 -31
- package/lib/module/components/overlay/actionSheet/ActionSheetHeader.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetHeader.web.js +113 -0
- package/lib/module/components/overlay/actionSheet/ActionSheetHeader.web.js.map +1 -0
- package/lib/module/components/overlay/actionSheet/ActionSheetListView.js +69 -28
- package/lib/module/components/overlay/actionSheet/ActionSheetListView.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetListViewContent.js +39 -14
- package/lib/module/components/overlay/actionSheet/ActionSheetListViewContent.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetOptionList.js +58 -25
- package/lib/module/components/overlay/actionSheet/ActionSheetOptionList.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetOptionListItem.js +45 -21
- package/lib/module/components/overlay/actionSheet/ActionSheetOptionListItem.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetOptions.js +75 -32
- package/lib/module/components/overlay/actionSheet/ActionSheetOptions.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetScrollView.js +72 -30
- package/lib/module/components/overlay/actionSheet/ActionSheetScrollView.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetScrollViewContent.js +45 -18
- package/lib/module/components/overlay/actionSheet/ActionSheetScrollViewContent.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetWrap.js +152 -36
- package/lib/module/components/overlay/actionSheet/ActionSheetWrap.js.map +1 -1
- package/lib/module/components/overlay/alert/Alert.js +142 -51
- package/lib/module/components/overlay/alert/Alert.js.map +1 -1
- package/lib/module/components/overlay/alert/AlertButton.js +62 -26
- package/lib/module/components/overlay/alert/AlertButton.js.map +1 -1
- package/lib/module/components/overlay/alert/AlertButtons.js +58 -23
- package/lib/module/components/overlay/alert/AlertButtons.js.map +1 -1
- package/lib/module/components/overlay/alert/AlertContent.js +76 -17
- package/lib/module/components/overlay/alert/AlertContent.js.map +1 -1
- package/lib/module/components/overlay/alert/AlertWrap.js +125 -43
- package/lib/module/components/overlay/alert/AlertWrap.js.map +1 -1
- package/lib/module/components/overlay/modal/ThemedLoadingModal.js +96 -21
- package/lib/module/components/overlay/modal/ThemedLoadingModal.js.map +1 -1
- package/lib/module/components/overlay/modal/ThemedModal.js +76 -23
- package/lib/module/components/overlay/modal/ThemedModal.js.map +1 -1
- package/lib/module/components/overlay/toast/ThemedToast.js +339 -90
- package/lib/module/components/overlay/toast/ThemedToast.js.map +1 -1
- package/lib/module/components/provider/GestureProvider.js +15 -3
- package/lib/module/components/provider/GestureProvider.js.map +1 -1
- package/lib/module/components/provider/InsetsProvider.js +15 -3
- package/lib/module/components/provider/InsetsProvider.js.map +1 -1
- package/lib/module/components/provider/ReactNativeTemplateProviders.js +23 -11
- package/lib/module/components/provider/ReactNativeTemplateProviders.js.map +1 -1
- package/lib/module/components/provider/ThemeProvider.js +15 -3
- package/lib/module/components/provider/ThemeProvider.js.map +1 -1
- package/lib/module/components/separator/ThemedSeparator.js +53 -14
- package/lib/module/components/separator/ThemedSeparator.js.map +1 -1
- package/lib/module/components/slider/Slider.js +625 -137
- package/lib/module/components/slider/Slider.js.map +1 -1
- package/lib/module/components/slider/ThemedSlider.js +178 -54
- package/lib/module/components/slider/ThemedSlider.js.map +1 -1
- package/lib/module/components/slider/ThemedSlider.web.js +206 -0
- package/lib/module/components/slider/ThemedSlider.web.js.map +1 -0
- package/lib/module/components/slider/ThemedSliderStepIndicator.js +40 -15
- package/lib/module/components/slider/ThemedSliderStepIndicator.js.map +1 -1
- package/lib/module/components/switch/ThemedSwitch.js +81 -21
- package/lib/module/components/switch/ThemedSwitch.js.map +1 -1
- package/lib/module/components/text/ThemedIconText.js +124 -35
- package/lib/module/components/text/ThemedIconText.js.map +1 -1
- package/lib/module/components/text/ThemedText.js +15 -3
- package/lib/module/components/text/ThemedText.js.map +1 -1
- package/lib/module/components/view/AnimatedThemedView.js +42 -11
- package/lib/module/components/view/AnimatedThemedView.js.map +1 -1
- package/lib/module/components/view/ThemedScreenWrap.js +144 -39
- package/lib/module/components/view/ThemedScreenWrap.js.map +1 -1
- package/lib/module/components/view/ThemedScreenWrap.web.js +111 -32
- package/lib/module/components/view/ThemedScreenWrap.web.js.map +1 -1
- package/lib/module/components/view/ThemedScrollView.js +126 -38
- package/lib/module/components/view/ThemedScrollView.js.map +1 -1
- package/lib/module/components/view/ThemedView.js +33 -10
- package/lib/module/components/view/ThemedView.js.map +1 -1
- package/lib/module/hooks/button.js +263 -84
- package/lib/module/hooks/button.js.map +1 -1
- package/lib/module/hooks/list.js +50 -10
- package/lib/module/hooks/list.js.map +1 -1
- package/lib/module/hooks/overlay.js +575 -187
- package/lib/module/hooks/overlay.js.map +1 -1
- package/lib/module/hooks/react.js +90 -27
- package/lib/module/hooks/react.js.map +1 -1
- package/lib/module/hooks/reanimated.js.map +1 -1
- package/lib/module/hooks/style.js +43 -18
- package/lib/module/hooks/style.js.map +1 -1
- package/lib/module/hooks/switch.js +182 -43
- package/lib/module/hooks/switch.js.map +1 -1
- package/lib/module/hooks/theme.js +17 -8
- package/lib/module/hooks/theme.js.map +1 -1
- package/lib/module/hooks/view.js +56 -14
- package/lib/module/hooks/view.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/reanimated/func.js +60 -10
- package/lib/module/utils/reanimated/func.js.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheet.web.d.ts +5 -0
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheet.web.d.ts.map +1 -0
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetContentGesture.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetContentGesture.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetHeader.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetHeader.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetHeader.web.d.ts +4 -0
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetHeader.web.d.ts.map +1 -0
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetListView.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetListView.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetListViewContent.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetListViewContent.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetOptionList.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetOptionList.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetOptionListItem.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetOptionListItem.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetOptions.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetOptions.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetScrollView.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetScrollView.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetScrollViewContent.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetScrollViewContent.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetWrap.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetWrap.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/Slider.d.ts +3 -2
- package/lib/typescript/src/components/slider/Slider.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/ThemedSlider.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/ThemedSlider.web.d.ts +5 -0
- package/lib/typescript/src/components/slider/ThemedSlider.web.d.ts.map +1 -0
- package/lib/typescript/src/components/slider/ThemedSliderStepIndicator.d.ts +3 -2
- package/lib/typescript/src/components/slider/ThemedSliderStepIndicator.d.ts.map +1 -1
- package/lib/typescript/src/components/view/AnimatedView.d.ts +0 -2
- package/lib/typescript/src/components/view/AnimatedView.d.ts.map +1 -1
- package/lib/typescript/src/hooks/overlay.d.ts +0 -27
- package/lib/typescript/src/hooks/overlay.d.ts.map +1 -1
- package/lib/typescript/src/hooks/switch.d.ts +1 -20
- package/lib/typescript/src/hooks/switch.d.ts.map +1 -1
- package/lib/typescript/src/types/list.d.ts +1 -10
- package/lib/typescript/src/types/list.d.ts.map +1 -1
- package/lib/typescript/src/types/overlay.d.ts +1 -31
- package/lib/typescript/src/types/overlay.d.ts.map +1 -1
- package/lib/typescript/src/utils/overlay/const.d.ts +0 -33
- package/lib/typescript/src/utils/overlay/const.d.ts.map +1 -1
- package/lib/typescript/src/utils/reanimated/func.d.ts +1 -5
- package/lib/typescript/src/utils/reanimated/func.d.ts.map +1 -1
- package/lib/typescript/src/utils/switch/const.d.ts +1 -2
- package/lib/typescript/src/utils/switch/const.d.ts.map +1 -1
- package/package.json +14 -15
- package/src/components/button/AnimatedPressable.tsx +0 -7
- package/src/components/button/AnimatedThemedPressable.tsx +0 -12
- package/src/components/button/ThemedButton.tsx +0 -45
- package/src/components/button/ThemedIconButton.tsx +0 -33
- package/src/components/button/ThemedIconTextButton.tsx +0 -56
- package/src/components/button/ThemedPressable.tsx +0 -12
- package/src/components/icon/ThemedIcon.tsx +0 -31
- package/src/components/list/List.tsx +0 -55
- package/src/components/loading/ThemedLoading.tsx +0 -29
- package/src/components/overlay/actionSheet/ActionSheet.tsx +0 -31
- package/src/components/overlay/actionSheet/ActionSheetContentGesture.tsx +0 -15
- package/src/components/overlay/actionSheet/ActionSheetHeader.tsx +0 -72
- package/src/components/overlay/actionSheet/ActionSheetListView.tsx +0 -54
- package/src/components/overlay/actionSheet/ActionSheetListViewContent.tsx +0 -32
- package/src/components/overlay/actionSheet/ActionSheetOptionList.tsx +0 -51
- package/src/components/overlay/actionSheet/ActionSheetOptionListItem.tsx +0 -43
- package/src/components/overlay/actionSheet/ActionSheetOptions.tsx +0 -61
- package/src/components/overlay/actionSheet/ActionSheetScrollView.tsx +0 -57
- package/src/components/overlay/actionSheet/ActionSheetScrollViewContent.tsx +0 -38
- package/src/components/overlay/actionSheet/ActionSheetWrap.tsx +0 -75
- package/src/components/overlay/alert/Alert.tsx +0 -86
- package/src/components/overlay/alert/AlertButton.tsx +0 -41
- package/src/components/overlay/alert/AlertButtons.tsx +0 -32
- package/src/components/overlay/alert/AlertContent.tsx +0 -60
- package/src/components/overlay/alert/AlertWrap.tsx +0 -93
- package/src/components/overlay/modal/ThemedLoadingModal.tsx +0 -47
- package/src/components/overlay/modal/ThemedModal.tsx +0 -42
- package/src/components/overlay/toast/ThemedToast.tsx +0 -160
- package/src/components/provider/GestureProvider.tsx +0 -9
- package/src/components/provider/InsetsProvider.tsx +0 -11
- package/src/components/provider/ReactNativeTemplateProviders.tsx +0 -20
- package/src/components/provider/ThemeProvider.tsx +0 -8
- package/src/components/separator/ThemedSeparator.tsx +0 -24
- package/src/components/slider/Slider.tsx +0 -229
- package/src/components/slider/ThemedSlider.tsx +0 -103
- package/src/components/slider/ThemedSliderStepIndicator.tsx +0 -24
- package/src/components/switch/ThemedSwitch.tsx +0 -49
- package/src/components/text/Text.tsx +0 -7
- package/src/components/text/ThemedIconText.tsx +0 -58
- package/src/components/text/ThemedText.tsx +0 -7
- package/src/components/view/AnimatedThemedView.tsx +0 -18
- package/src/components/view/AnimatedView.tsx +0 -7
- package/src/components/view/Box.tsx +0 -7
- package/src/components/view/ThemedScreenWrap.tsx +0 -48
- package/src/components/view/ThemedScreenWrap.web.tsx +0 -41
- package/src/components/view/ThemedScrollView.tsx +0 -54
- package/src/components/view/ThemedView.tsx +0 -19
- package/src/hooks/button.ts +0 -152
- package/src/hooks/list.ts +0 -42
- package/src/hooks/overlay.ts +0 -471
- package/src/hooks/react.ts +0 -34
- package/src/hooks/reanimated.ts +0 -6
- package/src/hooks/separator.ts +0 -29
- package/src/hooks/style.ts +0 -79
- package/src/hooks/switch.ts +0 -119
- package/src/hooks/theme.ts +0 -65
- package/src/hooks/view.ts +0 -28
- package/src/index.ts +0 -59
- package/src/test/utils/const.ts +0 -9
- package/src/test/utils/func.ts +0 -55
- package/src/test/utils/testingLib.tsx +0 -17
- package/src/types/button.ts +0 -50
- package/src/types/global.d.ts +0 -5
- package/src/types/icon.ts +0 -21
- package/src/types/list.ts +0 -61
- package/src/types/loading.ts +0 -14
- package/src/types/overlay.ts +0 -216
- package/src/types/provider.ts +0 -6
- package/src/types/react.ts +0 -8
- package/src/types/reanimated.ts +0 -11
- package/src/types/separator.ts +0 -28
- package/src/types/slider.ts +0 -59
- package/src/types/style.ts +0 -26
- package/src/types/switch.ts +0 -31
- package/src/types/text.ts +0 -25
- package/src/types/theme.ts +0 -39
- package/src/types/view.ts +0 -58
- package/src/utils/button/const.ts +0 -10
- package/src/utils/overlay/const.ts +0 -77
- package/src/utils/overlay/func.ts +0 -107
- package/src/utils/reanimated/func.ts +0 -39
- package/src/utils/slider/const.ts +0 -23
- package/src/utils/style/const.ts +0 -4
- package/src/utils/style/func.ts +0 -37
- package/src/utils/switch/const.ts +0 -2
- package/src/utils/theme/const.ts +0 -189
- package/src/utils/theme/restyle.ts +0 -87
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
4
|
import { useMappingHelper } from '@shopify/flash-list';
|
|
4
|
-
import {
|
|
5
|
+
import { useLayoutEffect, useMemo, useState } from 'react';
|
|
5
6
|
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
6
7
|
import { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
7
8
|
import { scheduleOnRN } from 'react-native-worklets';
|
|
@@ -12,40 +13,116 @@ import AnimatedThemedView from "../view/AnimatedThemedView.js";
|
|
|
12
13
|
import ThemedView from "../view/ThemedView.js";
|
|
13
14
|
import ThemedSliderStepIndicator from "./ThemedSliderStepIndicator.js";
|
|
14
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
16
|
+
const _worklet_1107268610089_init_data = {
|
|
17
|
+
code: "function SliderTsx1(){const{xSharedVal}=this.__closure;return{transform:[{translateX:xSharedVal.get()}]};}",
|
|
18
|
+
location: "/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx",
|
|
19
|
+
sourceMap: "{\"version\":3,\"names\":[\"SliderTsx1\",\"xSharedVal\",\"__closure\",\"transform\",\"translateX\",\"get\"],\"sources\":[\"/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx\"],\"mappings\":\"AA0EI,SAAAA,WAAA,QAAAC,UAAA,OAAAC,SAAA,OAAO,CAAAC,SAAA,CAAa,CAAC,CAAAC,UAAA,CAAcH,UAAU,CAAAI,GAAI,CAAC,CAAE,CAAC,CAAE,CAAC\",\"ignoreList\":[]}"
|
|
20
|
+
};
|
|
21
|
+
const _worklet_9813808913419_init_data = {
|
|
22
|
+
code: "function SliderTsx2(){const{xSharedVal,thumbSizeHalf}=this.__closure;return{transform:[{translateX:xSharedVal.get()-thumbSizeHalf}]};}",
|
|
23
|
+
location: "/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx",
|
|
24
|
+
sourceMap: "{\"version\":3,\"names\":[\"SliderTsx2\",\"xSharedVal\",\"thumbSizeHalf\",\"__closure\",\"transform\",\"translateX\",\"get\"],\"sources\":[\"/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx\"],\"mappings\":\"AA8EI,SAAAA,WAAA,QAAAC,UAAA,CAAAC,aAAA,OAAAC,SAAA,OAAO,CAAAC,SAAA,CAAa,CAAC,CAAAC,UAAA,CAAcJ,UAAU,CAAAK,GAAI,CAAC,CAAC,CAAGJ,aAAc,CAAC,CAAE,CAAC\",\"ignoreList\":[]}"
|
|
25
|
+
};
|
|
26
|
+
const _worklet_5842193172883_init_data = {
|
|
27
|
+
code: "function SliderTsx3(x_0,t13){const{trackWidth,xSharedVal,withTiming,scheduleOnRN,updateSelectedVal}=this.__closure;var _trackWidth;const animated=t13===undefined?false:t13;const tempX=Math.min(0,Math.max(x_0,-((_trackWidth=trackWidth)!==null&&_trackWidth!==void 0?_trackWidth:0)));xSharedVal.set(animated?withTiming(tempX):tempX);scheduleOnRN(updateSelectedVal,Math.abs(tempX));}",
|
|
28
|
+
location: "/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx",
|
|
29
|
+
sourceMap: "{\"version\":3,\"names\":[\"SliderTsx3\",\"x_0\",\"t13\",\"trackWidth\",\"xSharedVal\",\"withTiming\",\"scheduleOnRN\",\"updateSelectedVal\",\"__closure\",\"_trackWidth\",\"animated\",\"undefined\",\"tempX\",\"Math\",\"min\",\"max\",\"set\",\"abs\"],\"sources\":[\"/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx\"],\"mappings\":\"AAwG6B,SAAAA,WAAAC,GAAA,CAAAC,GAAA,QAAAC,UAAA,CAAAC,UAAA,CAAAC,UAAA,CAAAC,YAAA,CAAAC,iBAAA,OAAAC,SAAA,KAAAC,WAAA,CAAY,MAAAC,QAAA,CAAAR,GAAgB,GAAhBS,SAAgB,CAAhB,KAAgB,CAAhBT,GAAgB,CAEnD,MAAAU,KAAA,CAAcC,IAAI,CAAAC,GAAI,CAAC,CAAC,CAAED,IAAI,CAAAE,GAAI,CAACd,GAAC,CAAE,GAAAQ,WAAA,CAAEN,UAAe,UAAAM,WAAA,UAAAA,WAAA,CAAf,CAAe,CAAC,CAAC,CAAC,CAC1DL,UAAU,CAAAY,GAAI,CAACN,QAAQ,CAAGL,UAAU,CAACO,KAAa,CAAC,CAApCA,KAAoC,CAAC,CACpDN,YAAY,CAACC,iBAAiB,CAAEM,IAAI,CAAAI,GAAI,CAACL,KAAK,CAAC,CAAC\",\"ignoreList\":[]}"
|
|
30
|
+
};
|
|
31
|
+
const _worklet_15465333809693_init_data = {
|
|
32
|
+
code: "function SliderTsx4(t16){const{sliderWidth,stepWidth,thumbSize,thumbSizeHalf,updateXSharedVal,snapToStepAnimated}=this.__closure;const{x:x_2}=t16;if(sliderWidth&&stepWidth){const nearestStep=Math.round(-(sliderWidth-(x_2+thumbSize+thumbSizeHalf))/stepWidth);updateXSharedVal(nearestStep*stepWidth,snapToStepAnimated);}}",
|
|
33
|
+
location: "/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx",
|
|
34
|
+
sourceMap: "{\"version\":3,\"names\":[\"SliderTsx4\",\"t16\",\"sliderWidth\",\"stepWidth\",\"thumbSize\",\"thumbSizeHalf\",\"updateXSharedVal\",\"snapToStepAnimated\",\"__closure\",\"x\",\"x_2\",\"nearestStep\",\"Math\",\"round\"],\"sources\":[\"/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx\"],\"mappings\":\"AAyHe,SAAAA,WAAAC,GAAA,QAAAC,WAAA,CAAAC,SAAA,CAAAC,SAAA,CAAAC,aAAA,CAAAC,gBAAA,CAAAC,kBAAA,OAAAC,SAAA,CAAC,MAAAC,CAAA,CAAAC,GAAA,EAAAT,GAAK,CACX,GAAIC,WAAwB,EAAxBC,SAAwB,EAC1B,MAAAQ,WAAA,CAAoBC,IAAI,CAAAC,KAAM,CAC5B,EAAEX,WAAW,EAAIQ,GAAC,CAAGN,SAAS,CAAGC,aAAa,CAAC,CAAC,CAAGF,SACrD,CAAC,CACDG,gBAAgB,CAACK,WAAW,CAAGR,SAAS,CAAEI,kBAAkB,CAAC,EAC9D\",\"ignoreList\":[]}"
|
|
35
|
+
};
|
|
36
|
+
const _worklet_8878459337931_init_data = {
|
|
37
|
+
code: "function SliderTsx5(t15){const{sliderWidth,updateXSharedVal,thumbSize,thumbSizeHalf}=this.__closure;const{x:x_1}=t15;if(sliderWidth){updateXSharedVal(-(sliderWidth-(x_1+thumbSize+thumbSizeHalf)));}}",
|
|
38
|
+
location: "/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx",
|
|
39
|
+
sourceMap: "{\"version\":3,\"names\":[\"SliderTsx5\",\"t15\",\"sliderWidth\",\"updateXSharedVal\",\"thumbSize\",\"thumbSizeHalf\",\"__closure\",\"x\",\"x_1\"],\"sources\":[\"/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx\"],\"mappings\":\"AAoHiB,SAAAA,WAAAC,GAAA,QAAAC,WAAA,CAAAC,gBAAA,CAAAC,SAAA,CAAAC,aAAA,OAAAC,SAAA,CAAC,MAAAC,CAAA,CAAAC,GAAA,EAAAP,GAAK,CACb,GAAIC,WAAW,EACbC,gBAAgB,CAAC,EAAED,WAAW,EAAIM,GAAC,CAAGJ,SAAS,CAAGC,aAAa,CAAC,CAAC,CAAC,EACnE\",\"ignoreList\":[]}"
|
|
40
|
+
};
|
|
41
|
+
const _worklet_3836629690946_init_data = {
|
|
42
|
+
code: "function SliderTsx6(){const{stepWidth,xSharedVal,updateXSharedVal,snapToStepAnimated}=this.__closure;if(stepWidth){const nearestStep_0=Math.round(xSharedVal.get()/stepWidth);updateXSharedVal(nearestStep_0*stepWidth,snapToStepAnimated);}}",
|
|
43
|
+
location: "/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx",
|
|
44
|
+
sourceMap: "{\"version\":3,\"names\":[\"SliderTsx6\",\"stepWidth\",\"xSharedVal\",\"updateXSharedVal\",\"snapToStepAnimated\",\"__closure\",\"nearestStep_0\",\"Math\",\"round\",\"get\"],\"sources\":[\"/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx\"],\"mappings\":\"AAkJe,SAAAA,WAAA,QAAAC,SAAA,CAAAC,UAAA,CAAAC,gBAAA,CAAAC,kBAAA,OAAAC,SAAA,CACL,GAAIJ,SAAS,EACX,MAAAK,aAAA,CAAoBC,IAAI,CAAAC,KAAM,CAACN,UAAU,CAAAO,GAAI,CAAC,CAAC,CAAGR,SAAS,CAAC,CAC5DE,gBAAgB,CAACG,aAAW,CAAGL,SAAS,CAAEG,kBAAkB,CAAC,EAC9D\",\"ignoreList\":[]}"
|
|
45
|
+
};
|
|
46
|
+
const _worklet_9150691278550_init_data = {
|
|
47
|
+
code: "function SliderTsx7(t19){const{updateXSharedVal,xSharedVal}=this.__closure;const{changeX:changeX}=t19;updateXSharedVal(xSharedVal.get()+changeX);}",
|
|
48
|
+
location: "/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx",
|
|
49
|
+
sourceMap: "{\"version\":3,\"names\":[\"SliderTsx7\",\"t19\",\"updateXSharedVal\",\"xSharedVal\",\"__closure\",\"changeX\",\"get\"],\"sources\":[\"/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx\"],\"mappings\":\"AA+IkB,SAAAA,WAAAC,GAAA,QAAAC,gBAAA,CAAAC,UAAA,OAAAC,SAAA,CAAC,MAAAC,OAAA,CAAAA,OAAA,EAAAJ,GAAW,CACpBC,gBAAgB,CAACC,UAAU,CAAAG,GAAI,CAAC,CAAC,CAAGD,OAAO,CAAC\",\"ignoreList\":[]}"
|
|
50
|
+
};
|
|
51
|
+
const _worklet_3439681045957_init_data = {
|
|
52
|
+
code: "function SliderTsx8(t18,state){const{touchStart,gestureActivateDuration}=this.__closure;const timeToCheck=Date.now()-touchStart.get();if(timeToCheck>=gestureActivateDuration){state.activate();}else{state.fail();}}",
|
|
53
|
+
location: "/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx",
|
|
54
|
+
sourceMap: "{\"version\":3,\"names\":[\"SliderTsx8\",\"t18\",\"state\",\"touchStart\",\"gestureActivateDuration\",\"__closure\",\"timeToCheck\",\"Date\",\"now\",\"get\",\"activate\",\"fail\"],\"sources\":[\"/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx\"],\"mappings\":\"AAuIuB,SAAAA,WAAAC,GAAA,CAAAC,KAAA,QAAAC,UAAA,CAAAC,uBAAA,OAAAC,SAAA,CACb,MAAAC,WAAA,CAAoBC,IAAI,CAAAC,GAAI,CAAC,CAAC,CAAGL,UAAU,CAAAM,GAAI,CAAC,CAAC,CACjD,GAAIH,WAAW,EAAIF,uBAAuB,EACxCF,KAAK,CAAAQ,QAAS,CAAC,CAAC,OAEhBR,KAAK,CAAAS,IAAK,CAAC,CAAC,EACb\",\"ignoreList\":[]}"
|
|
55
|
+
};
|
|
56
|
+
const _worklet_7305647671238_init_data = {
|
|
57
|
+
code: "function SliderTsx9(){const{touchStart}=this.__closure;touchStart.set(Date.now());}",
|
|
58
|
+
location: "/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx",
|
|
59
|
+
sourceMap: "{\"version\":3,\"names\":[\"SliderTsx9\",\"touchStart\",\"__closure\",\"set\",\"Date\",\"now\"],\"sources\":[\"/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx\"],\"mappings\":\"AAoIiB,SAAAA,WAAA,QAAAC,UAAA,OAAAC,SAAA,CACPD,UAAU,CAAAE,GAAI,CAACC,IAAI,CAAAC,GAAI,CAAC,CAAC,CAAC\",\"ignoreList\":[]}"
|
|
60
|
+
};
|
|
61
|
+
const Slider = t0 => {
|
|
62
|
+
const $ = _c(104);
|
|
63
|
+
const {
|
|
64
|
+
range,
|
|
65
|
+
steps: t1,
|
|
66
|
+
stepIndicator,
|
|
67
|
+
stepIndicatorProps,
|
|
68
|
+
snapToStepAnimated: t2,
|
|
69
|
+
onValueChange,
|
|
70
|
+
sliderWrapProps,
|
|
71
|
+
trackSize: t3,
|
|
72
|
+
trackActiveColor: t4,
|
|
73
|
+
trackActiveProps,
|
|
74
|
+
trackInactiveColor: t5,
|
|
75
|
+
trackInactiveProps,
|
|
76
|
+
thumbSize: t6,
|
|
77
|
+
thumbColor: t7,
|
|
78
|
+
thumbProps,
|
|
79
|
+
gestureActivateDuration: t8,
|
|
80
|
+
setSelectedVal,
|
|
81
|
+
selectedValSharedVal
|
|
82
|
+
} = t0;
|
|
83
|
+
const steps = t1 === undefined ? 1 : t1;
|
|
84
|
+
const snapToStepAnimated = t2 === undefined ? true : t2;
|
|
85
|
+
const trackSize = t3 === undefined ? SliderTrackSize.M : t3;
|
|
86
|
+
const trackActiveColor = t4 === undefined ? "themePri" : t4;
|
|
87
|
+
const trackInactiveColor = t5 === undefined ? "separator" : t5;
|
|
88
|
+
const thumbSize = t6 === undefined ? sliderThumbDefaultSize : t6;
|
|
89
|
+
const thumbColor = t7 === undefined ? "themePri" : t7;
|
|
90
|
+
const gestureActivateDuration = t8 === undefined ? 40 : t8;
|
|
35
91
|
const windowWidth = useWindowDimensionsWidth();
|
|
36
|
-
const isNumRange = typeof range[0] ===
|
|
37
|
-
|
|
92
|
+
const isNumRange = typeof range[0] === "number";
|
|
93
|
+
let t9;
|
|
94
|
+
if ($[0] !== isNumRange || $[1] !== range) {
|
|
95
|
+
t9 = isNumRange ? range.sort() : range;
|
|
96
|
+
$[0] = isNumRange;
|
|
97
|
+
$[1] = range;
|
|
98
|
+
$[2] = t9;
|
|
99
|
+
} else {
|
|
100
|
+
t9 = $[2];
|
|
101
|
+
}
|
|
102
|
+
const processedRange = t9;
|
|
38
103
|
const totalSteps = isNumRange ? Math.abs(processedRange[1] - processedRange[0]) / steps : processedRange.length - 1;
|
|
39
|
-
|
|
104
|
+
let t10;
|
|
105
|
+
bb0: {
|
|
40
106
|
if (!isNumRange || Number.isInteger(steps)) {
|
|
41
|
-
|
|
107
|
+
t10 = 0;
|
|
108
|
+
break bb0;
|
|
42
109
|
}
|
|
43
|
-
|
|
110
|
+
let t11;
|
|
111
|
+
if ($[3] !== steps) {
|
|
112
|
+
t11 = steps.toString().split(".");
|
|
113
|
+
$[3] = steps;
|
|
114
|
+
$[4] = t11;
|
|
115
|
+
} else {
|
|
116
|
+
t11 = $[4];
|
|
117
|
+
}
|
|
118
|
+
const stepsStrSplit = t11;
|
|
44
119
|
if (stepsStrSplit.length < 2) {
|
|
45
|
-
|
|
120
|
+
t10 = 0;
|
|
121
|
+
break bb0;
|
|
46
122
|
}
|
|
47
|
-
|
|
48
|
-
}
|
|
123
|
+
t10 = stepsStrSplit[1]?.length ?? 0;
|
|
124
|
+
}
|
|
125
|
+
const stepsFractionDigits = t10;
|
|
49
126
|
const thumbSizeHalf = thumbSize / 2;
|
|
50
127
|
const {
|
|
51
128
|
getMappingKey
|
|
@@ -55,132 +132,543 @@ const Slider = ({
|
|
|
55
132
|
const [trackWidth, setTrackWidth] = useState();
|
|
56
133
|
const [stepWidth, setStepWidth] = useState();
|
|
57
134
|
const xSharedVal = useSharedValue(-(trackWidth ?? 0));
|
|
58
|
-
const trackAnimatedStyle = useAnimatedStyle(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
135
|
+
const trackAnimatedStyle = useAnimatedStyle(function SliderTsx1Factory({
|
|
136
|
+
_worklet_1107268610089_init_data,
|
|
137
|
+
xSharedVal
|
|
138
|
+
}) {
|
|
139
|
+
const _e = [new global.Error(), -2, -27];
|
|
140
|
+
const SliderTsx1 = () => ({
|
|
141
|
+
transform: [{
|
|
142
|
+
translateX: xSharedVal.get()
|
|
143
|
+
}]
|
|
144
|
+
});
|
|
145
|
+
SliderTsx1.__closure = {
|
|
146
|
+
xSharedVal
|
|
147
|
+
};
|
|
148
|
+
SliderTsx1.__workletHash = 1107268610089;
|
|
149
|
+
SliderTsx1.__pluginVersion = "0.8.3";
|
|
150
|
+
SliderTsx1.__initData = _worklet_1107268610089_init_data;
|
|
151
|
+
SliderTsx1.__stackDetails = _e;
|
|
152
|
+
return SliderTsx1;
|
|
153
|
+
}({
|
|
154
|
+
_worklet_1107268610089_init_data,
|
|
155
|
+
xSharedVal
|
|
62
156
|
}), [trackWidth]);
|
|
63
|
-
const thumbAnimatedStyle = useAnimatedStyle(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
157
|
+
const thumbAnimatedStyle = useAnimatedStyle(function SliderTsx2Factory({
|
|
158
|
+
_worklet_9813808913419_init_data,
|
|
159
|
+
xSharedVal,
|
|
160
|
+
thumbSizeHalf
|
|
161
|
+
}) {
|
|
162
|
+
const _e = [new global.Error(), -3, -27];
|
|
163
|
+
const SliderTsx2 = () => ({
|
|
164
|
+
transform: [{
|
|
165
|
+
translateX: xSharedVal.get() - thumbSizeHalf
|
|
166
|
+
}]
|
|
167
|
+
});
|
|
168
|
+
SliderTsx2.__closure = {
|
|
169
|
+
xSharedVal,
|
|
170
|
+
thumbSizeHalf
|
|
171
|
+
};
|
|
172
|
+
SliderTsx2.__workletHash = 9813808913419;
|
|
173
|
+
SliderTsx2.__pluginVersion = "0.8.3";
|
|
174
|
+
SliderTsx2.__initData = _worklet_9813808913419_init_data;
|
|
175
|
+
SliderTsx2.__stackDetails = _e;
|
|
176
|
+
return SliderTsx2;
|
|
177
|
+
}({
|
|
178
|
+
_worklet_9813808913419_init_data,
|
|
179
|
+
xSharedVal,
|
|
180
|
+
thumbSizeHalf
|
|
67
181
|
}), [thumbSizeHalf]);
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
let index = 0;
|
|
182
|
+
const touchStart = useSharedValue(0);
|
|
183
|
+
let t11;
|
|
184
|
+
if ($[5] !== isNumRange || $[6] !== onValueChange || $[7] !== processedRange || $[8] !== setSelectedVal || $[9] !== stepWidth || $[10] !== steps || $[11] !== stepsFractionDigits || $[12] !== totalSteps) {
|
|
185
|
+
t11 = x => {
|
|
186
|
+
if (!stepWidth) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
76
189
|
if (isNumRange) {
|
|
77
190
|
const numRange = processedRange;
|
|
78
|
-
const
|
|
79
|
-
|
|
191
|
+
const numIndex = Math.round(x / stepWidth);
|
|
192
|
+
const tempSelectedVal = Number((numRange[1] - numIndex * steps).toFixed(stepsFractionDigits));
|
|
193
|
+
setSelectedVal?.(tempSelectedVal);
|
|
194
|
+
onValueChange(tempSelectedVal);
|
|
80
195
|
} else {
|
|
81
196
|
const strRange = processedRange;
|
|
82
|
-
const
|
|
83
|
-
|
|
197
|
+
const strIndex = Math.round(x / stepWidth);
|
|
198
|
+
const tempSelectedVal_0 = strRange[totalSteps - strIndex];
|
|
199
|
+
setSelectedVal?.(tempSelectedVal_0);
|
|
200
|
+
onValueChange(tempSelectedVal_0);
|
|
84
201
|
}
|
|
85
|
-
|
|
202
|
+
};
|
|
203
|
+
$[5] = isNumRange;
|
|
204
|
+
$[6] = onValueChange;
|
|
205
|
+
$[7] = processedRange;
|
|
206
|
+
$[8] = setSelectedVal;
|
|
207
|
+
$[9] = stepWidth;
|
|
208
|
+
$[10] = steps;
|
|
209
|
+
$[11] = stepsFractionDigits;
|
|
210
|
+
$[12] = totalSteps;
|
|
211
|
+
$[13] = t11;
|
|
212
|
+
} else {
|
|
213
|
+
t11 = $[13];
|
|
214
|
+
}
|
|
215
|
+
const updateSelectedVal = t11;
|
|
216
|
+
let t12;
|
|
217
|
+
if ($[14] !== trackWidth || $[15] !== updateSelectedVal || $[16] !== xSharedVal) {
|
|
218
|
+
t12 = function SliderTsx3Factory({
|
|
219
|
+
_worklet_5842193172883_init_data,
|
|
220
|
+
trackWidth,
|
|
221
|
+
xSharedVal,
|
|
222
|
+
withTiming,
|
|
223
|
+
scheduleOnRN,
|
|
224
|
+
updateSelectedVal
|
|
225
|
+
}) {
|
|
226
|
+
const _e = [new global.Error(), -6, -27];
|
|
227
|
+
const SliderTsx3 = function (x_0, t13) {
|
|
228
|
+
const animated = t13 === undefined ? false : t13;
|
|
229
|
+
const tempX = Math.min(0, Math.max(x_0, -(trackWidth ?? 0)));
|
|
230
|
+
xSharedVal.set(animated ? withTiming(tempX) : tempX);
|
|
231
|
+
scheduleOnRN(updateSelectedVal, Math.abs(tempX));
|
|
232
|
+
};
|
|
233
|
+
SliderTsx3.__closure = {
|
|
234
|
+
trackWidth,
|
|
235
|
+
xSharedVal,
|
|
236
|
+
withTiming,
|
|
237
|
+
scheduleOnRN,
|
|
238
|
+
updateSelectedVal
|
|
239
|
+
};
|
|
240
|
+
SliderTsx3.__workletHash = 5842193172883;
|
|
241
|
+
SliderTsx3.__pluginVersion = "0.8.3";
|
|
242
|
+
SliderTsx3.__initData = _worklet_5842193172883_init_data;
|
|
243
|
+
SliderTsx3.__stackDetails = _e;
|
|
244
|
+
return SliderTsx3;
|
|
245
|
+
}({
|
|
246
|
+
_worklet_5842193172883_init_data,
|
|
247
|
+
trackWidth,
|
|
248
|
+
xSharedVal,
|
|
249
|
+
withTiming,
|
|
250
|
+
scheduleOnRN,
|
|
251
|
+
updateSelectedVal
|
|
86
252
|
});
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
253
|
+
$[14] = trackWidth;
|
|
254
|
+
$[15] = updateSelectedVal;
|
|
255
|
+
$[16] = xSharedVal;
|
|
256
|
+
$[17] = t12;
|
|
257
|
+
} else {
|
|
258
|
+
t12 = $[17];
|
|
259
|
+
}
|
|
260
|
+
const updateXSharedVal = t12;
|
|
261
|
+
let t13;
|
|
262
|
+
if ($[18] !== gestureActivateDuration || $[19] !== sliderWidth || $[20] !== snapToStepAnimated || $[21] !== stepWidth || $[22] !== thumbSize || $[23] !== thumbSizeHalf || $[24] !== touchStart || $[25] !== updateXSharedVal || $[26] !== windowWidth || $[27] !== xSharedVal) {
|
|
263
|
+
let t14;
|
|
264
|
+
if ($[29] !== sliderWidth || $[30] !== thumbSize || $[31] !== thumbSizeHalf || $[32] !== updateXSharedVal) {
|
|
265
|
+
t14 = function SliderTsx5Factory({
|
|
266
|
+
_worklet_8878459337931_init_data,
|
|
267
|
+
sliderWidth,
|
|
268
|
+
updateXSharedVal,
|
|
269
|
+
thumbSize,
|
|
270
|
+
thumbSizeHalf
|
|
271
|
+
}) {
|
|
272
|
+
const _e = [new global.Error(), -5, -27];
|
|
273
|
+
const SliderTsx5 = function (t15) {
|
|
274
|
+
const {
|
|
275
|
+
x: x_1
|
|
276
|
+
} = t15;
|
|
277
|
+
if (sliderWidth) {
|
|
278
|
+
updateXSharedVal(-(sliderWidth - (x_1 + thumbSize + thumbSizeHalf)));
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
SliderTsx5.__closure = {
|
|
282
|
+
sliderWidth,
|
|
283
|
+
updateXSharedVal,
|
|
284
|
+
thumbSize,
|
|
285
|
+
thumbSizeHalf
|
|
286
|
+
};
|
|
287
|
+
SliderTsx5.__workletHash = 8878459337931;
|
|
288
|
+
SliderTsx5.__pluginVersion = "0.8.3";
|
|
289
|
+
SliderTsx5.__initData = _worklet_8878459337931_init_data;
|
|
290
|
+
SliderTsx5.__stackDetails = _e;
|
|
291
|
+
return SliderTsx5;
|
|
292
|
+
}({
|
|
293
|
+
_worklet_8878459337931_init_data,
|
|
294
|
+
sliderWidth,
|
|
295
|
+
updateXSharedVal,
|
|
296
|
+
thumbSize,
|
|
297
|
+
thumbSizeHalf
|
|
298
|
+
});
|
|
299
|
+
$[29] = sliderWidth;
|
|
300
|
+
$[30] = thumbSize;
|
|
301
|
+
$[31] = thumbSizeHalf;
|
|
302
|
+
$[32] = updateXSharedVal;
|
|
303
|
+
$[33] = t14;
|
|
304
|
+
} else {
|
|
305
|
+
t14 = $[33];
|
|
91
306
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
307
|
+
let t15;
|
|
308
|
+
if ($[34] !== sliderWidth || $[35] !== snapToStepAnimated || $[36] !== stepWidth || $[37] !== thumbSize || $[38] !== thumbSizeHalf || $[39] !== updateXSharedVal) {
|
|
309
|
+
t15 = function SliderTsx4Factory({
|
|
310
|
+
_worklet_15465333809693_init_data,
|
|
311
|
+
sliderWidth,
|
|
312
|
+
stepWidth,
|
|
313
|
+
thumbSize,
|
|
314
|
+
thumbSizeHalf,
|
|
315
|
+
updateXSharedVal,
|
|
316
|
+
snapToStepAnimated
|
|
317
|
+
}) {
|
|
318
|
+
const _e = [new global.Error(), -7, -27];
|
|
319
|
+
const SliderTsx4 = function (t16) {
|
|
320
|
+
const {
|
|
321
|
+
x: x_2
|
|
322
|
+
} = t16;
|
|
323
|
+
if (sliderWidth && stepWidth) {
|
|
324
|
+
const nearestStep = Math.round(-(sliderWidth - (x_2 + thumbSize + thumbSizeHalf)) / stepWidth);
|
|
325
|
+
updateXSharedVal(nearestStep * stepWidth, snapToStepAnimated);
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
SliderTsx4.__closure = {
|
|
329
|
+
sliderWidth,
|
|
330
|
+
stepWidth,
|
|
331
|
+
thumbSize,
|
|
332
|
+
thumbSizeHalf,
|
|
333
|
+
updateXSharedVal,
|
|
334
|
+
snapToStepAnimated
|
|
335
|
+
};
|
|
336
|
+
SliderTsx4.__workletHash = 15465333809693;
|
|
337
|
+
SliderTsx4.__pluginVersion = "0.8.3";
|
|
338
|
+
SliderTsx4.__initData = _worklet_15465333809693_init_data;
|
|
339
|
+
SliderTsx4.__stackDetails = _e;
|
|
340
|
+
return SliderTsx4;
|
|
341
|
+
}({
|
|
342
|
+
_worklet_15465333809693_init_data,
|
|
343
|
+
sliderWidth,
|
|
344
|
+
stepWidth,
|
|
345
|
+
thumbSize,
|
|
346
|
+
thumbSizeHalf,
|
|
347
|
+
updateXSharedVal,
|
|
348
|
+
snapToStepAnimated
|
|
349
|
+
});
|
|
350
|
+
$[34] = sliderWidth;
|
|
351
|
+
$[35] = snapToStepAnimated;
|
|
352
|
+
$[36] = stepWidth;
|
|
353
|
+
$[37] = thumbSize;
|
|
354
|
+
$[38] = thumbSizeHalf;
|
|
355
|
+
$[39] = updateXSharedVal;
|
|
356
|
+
$[40] = t15;
|
|
98
357
|
} else {
|
|
99
|
-
|
|
100
|
-
const strIndex = Math.round(x / stepWidth);
|
|
101
|
-
const tempSelectedVal = strRange[totalSteps - strIndex];
|
|
102
|
-
setSelectedVal?.(tempSelectedVal);
|
|
103
|
-
onValueChange(tempSelectedVal);
|
|
358
|
+
t15 = $[40];
|
|
104
359
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
360
|
+
let t16;
|
|
361
|
+
if ($[41] !== touchStart) {
|
|
362
|
+
t16 = function SliderTsx9Factory({
|
|
363
|
+
_worklet_7305647671238_init_data,
|
|
364
|
+
touchStart
|
|
365
|
+
}) {
|
|
366
|
+
const _e = [new global.Error(), -2, -27];
|
|
367
|
+
const SliderTsx9 = function () {
|
|
368
|
+
touchStart.set(Date.now());
|
|
369
|
+
};
|
|
370
|
+
SliderTsx9.__closure = {
|
|
371
|
+
touchStart
|
|
372
|
+
};
|
|
373
|
+
SliderTsx9.__workletHash = 7305647671238;
|
|
374
|
+
SliderTsx9.__pluginVersion = "0.8.3";
|
|
375
|
+
SliderTsx9.__initData = _worklet_7305647671238_init_data;
|
|
376
|
+
SliderTsx9.__stackDetails = _e;
|
|
377
|
+
return SliderTsx9;
|
|
378
|
+
}({
|
|
379
|
+
_worklet_7305647671238_init_data,
|
|
380
|
+
touchStart
|
|
381
|
+
});
|
|
382
|
+
$[41] = touchStart;
|
|
383
|
+
$[42] = t16;
|
|
384
|
+
} else {
|
|
385
|
+
t16 = $[42];
|
|
119
386
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
387
|
+
let t17;
|
|
388
|
+
if ($[43] !== gestureActivateDuration || $[44] !== touchStart) {
|
|
389
|
+
t17 = function SliderTsx8Factory({
|
|
390
|
+
_worklet_3439681045957_init_data,
|
|
391
|
+
touchStart,
|
|
392
|
+
gestureActivateDuration
|
|
393
|
+
}) {
|
|
394
|
+
const _e = [new global.Error(), -3, -27];
|
|
395
|
+
const SliderTsx8 = function (t18, state) {
|
|
396
|
+
const timeToCheck = Date.now() - touchStart.get();
|
|
397
|
+
if (timeToCheck >= gestureActivateDuration) {
|
|
398
|
+
state.activate();
|
|
399
|
+
} else {
|
|
400
|
+
state.fail();
|
|
401
|
+
}
|
|
402
|
+
};
|
|
403
|
+
SliderTsx8.__closure = {
|
|
404
|
+
touchStart,
|
|
405
|
+
gestureActivateDuration
|
|
406
|
+
};
|
|
407
|
+
SliderTsx8.__workletHash = 3439681045957;
|
|
408
|
+
SliderTsx8.__pluginVersion = "0.8.3";
|
|
409
|
+
SliderTsx8.__initData = _worklet_3439681045957_init_data;
|
|
410
|
+
SliderTsx8.__stackDetails = _e;
|
|
411
|
+
return SliderTsx8;
|
|
412
|
+
}({
|
|
413
|
+
_worklet_3439681045957_init_data,
|
|
414
|
+
touchStart,
|
|
415
|
+
gestureActivateDuration
|
|
416
|
+
});
|
|
417
|
+
$[43] = gestureActivateDuration;
|
|
418
|
+
$[44] = touchStart;
|
|
419
|
+
$[45] = t17;
|
|
420
|
+
} else {
|
|
421
|
+
t17 = $[45];
|
|
126
422
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
423
|
+
let t18;
|
|
424
|
+
if ($[46] !== updateXSharedVal || $[47] !== xSharedVal) {
|
|
425
|
+
t18 = function SliderTsx7Factory({
|
|
426
|
+
_worklet_9150691278550_init_data,
|
|
427
|
+
updateXSharedVal,
|
|
428
|
+
xSharedVal
|
|
429
|
+
}) {
|
|
430
|
+
const _e = [new global.Error(), -3, -27];
|
|
431
|
+
const SliderTsx7 = function (t19) {
|
|
432
|
+
const {
|
|
433
|
+
changeX
|
|
434
|
+
} = t19;
|
|
435
|
+
updateXSharedVal(xSharedVal.get() + changeX);
|
|
436
|
+
};
|
|
437
|
+
SliderTsx7.__closure = {
|
|
438
|
+
updateXSharedVal,
|
|
439
|
+
xSharedVal
|
|
440
|
+
};
|
|
441
|
+
SliderTsx7.__workletHash = 9150691278550;
|
|
442
|
+
SliderTsx7.__pluginVersion = "0.8.3";
|
|
443
|
+
SliderTsx7.__initData = _worklet_9150691278550_init_data;
|
|
444
|
+
SliderTsx7.__stackDetails = _e;
|
|
445
|
+
return SliderTsx7;
|
|
446
|
+
}({
|
|
447
|
+
_worklet_9150691278550_init_data,
|
|
448
|
+
updateXSharedVal,
|
|
449
|
+
xSharedVal
|
|
450
|
+
});
|
|
451
|
+
$[46] = updateXSharedVal;
|
|
452
|
+
$[47] = xSharedVal;
|
|
453
|
+
$[48] = t18;
|
|
133
454
|
} else {
|
|
134
|
-
|
|
455
|
+
t18 = $[48];
|
|
135
456
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
457
|
+
let t19;
|
|
458
|
+
if ($[49] !== snapToStepAnimated || $[50] !== stepWidth || $[51] !== updateXSharedVal || $[52] !== xSharedVal) {
|
|
459
|
+
t19 = function SliderTsx6Factory({
|
|
460
|
+
_worklet_3836629690946_init_data,
|
|
461
|
+
stepWidth,
|
|
462
|
+
xSharedVal,
|
|
463
|
+
updateXSharedVal,
|
|
464
|
+
snapToStepAnimated
|
|
465
|
+
}) {
|
|
466
|
+
const _e = [new global.Error(), -5, -27];
|
|
467
|
+
const SliderTsx6 = function () {
|
|
468
|
+
if (stepWidth) {
|
|
469
|
+
const nearestStep_0 = Math.round(xSharedVal.get() / stepWidth);
|
|
470
|
+
updateXSharedVal(nearestStep_0 * stepWidth, snapToStepAnimated);
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
SliderTsx6.__closure = {
|
|
474
|
+
stepWidth,
|
|
475
|
+
xSharedVal,
|
|
476
|
+
updateXSharedVal,
|
|
477
|
+
snapToStepAnimated
|
|
478
|
+
};
|
|
479
|
+
SliderTsx6.__workletHash = 3836629690946;
|
|
480
|
+
SliderTsx6.__pluginVersion = "0.8.3";
|
|
481
|
+
SliderTsx6.__initData = _worklet_3836629690946_init_data;
|
|
482
|
+
SliderTsx6.__stackDetails = _e;
|
|
483
|
+
return SliderTsx6;
|
|
484
|
+
}({
|
|
485
|
+
_worklet_3836629690946_init_data,
|
|
486
|
+
stepWidth,
|
|
487
|
+
xSharedVal,
|
|
488
|
+
updateXSharedVal,
|
|
489
|
+
snapToStepAnimated
|
|
490
|
+
});
|
|
491
|
+
$[49] = snapToStepAnimated;
|
|
492
|
+
$[50] = stepWidth;
|
|
493
|
+
$[51] = updateXSharedVal;
|
|
494
|
+
$[52] = xSharedVal;
|
|
495
|
+
$[53] = t19;
|
|
496
|
+
} else {
|
|
497
|
+
t19 = $[53];
|
|
144
498
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
499
|
+
t13 = Gesture.Simultaneous(Gesture.LongPress().minDuration(gestureActivateDuration).maxDistance(windowWidth * 10).shouldCancelWhenOutside(false).onStart(t14).onEnd(t15), Gesture.Pan().manualActivation(true).shouldCancelWhenOutside(false).onBegin(t16).onTouchesMove(t17).onChange(t18).onEnd(t19));
|
|
500
|
+
$[18] = gestureActivateDuration;
|
|
501
|
+
$[19] = sliderWidth;
|
|
502
|
+
$[20] = snapToStepAnimated;
|
|
503
|
+
$[21] = stepWidth;
|
|
504
|
+
$[22] = thumbSize;
|
|
505
|
+
$[23] = thumbSizeHalf;
|
|
506
|
+
$[24] = touchStart;
|
|
507
|
+
$[25] = updateXSharedVal;
|
|
508
|
+
$[26] = windowWidth;
|
|
509
|
+
$[27] = xSharedVal;
|
|
510
|
+
$[28] = t13;
|
|
511
|
+
} else {
|
|
512
|
+
t13 = $[28];
|
|
513
|
+
}
|
|
514
|
+
const gesture = t13;
|
|
515
|
+
let t14;
|
|
516
|
+
if ($[54] !== isNumRange || $[55] !== processedRange || $[56] !== selectedValSharedVal || $[57] !== steps || $[58] !== thumbSize || $[59] !== thumbSizeHalf || $[60] !== totalSteps || $[61] !== trackViewRef || $[62] !== xSharedVal) {
|
|
517
|
+
t14 = () => {
|
|
518
|
+
trackViewRef.current?.measure((_x, _y, w) => {
|
|
519
|
+
const tempWidth = w - thumbSize;
|
|
520
|
+
const tempStepWidth = tempWidth / totalSteps;
|
|
521
|
+
setSliderWidth(w + thumbSize + thumbSizeHalf);
|
|
522
|
+
setTrackWidth(tempWidth);
|
|
523
|
+
setStepWidth(tempStepWidth);
|
|
524
|
+
let index;
|
|
525
|
+
if (isNumRange) {
|
|
526
|
+
const numRange_0 = processedRange;
|
|
527
|
+
const numCurrentValue = selectedValSharedVal?.get();
|
|
528
|
+
index = numCurrentValue ? (numCurrentValue - numRange_0[0]) / steps : 0;
|
|
529
|
+
} else {
|
|
530
|
+
const strRange_0 = processedRange;
|
|
531
|
+
const strCurrentValue = selectedValSharedVal?.get();
|
|
532
|
+
index = strCurrentValue ? strRange_0.indexOf(strCurrentValue) : 0;
|
|
533
|
+
}
|
|
534
|
+
xSharedVal.set(-(totalSteps - index) * tempStepWidth);
|
|
535
|
+
});
|
|
536
|
+
};
|
|
537
|
+
$[54] = isNumRange;
|
|
538
|
+
$[55] = processedRange;
|
|
539
|
+
$[56] = selectedValSharedVal;
|
|
540
|
+
$[57] = steps;
|
|
541
|
+
$[58] = thumbSize;
|
|
542
|
+
$[59] = thumbSizeHalf;
|
|
543
|
+
$[60] = totalSteps;
|
|
544
|
+
$[61] = trackViewRef;
|
|
545
|
+
$[62] = xSharedVal;
|
|
546
|
+
$[63] = t14;
|
|
547
|
+
} else {
|
|
548
|
+
t14 = $[63];
|
|
549
|
+
}
|
|
550
|
+
let t15;
|
|
551
|
+
if ($[64] !== isNumRange || $[65] !== processedRange || $[66] !== thumbSize || $[67] !== totalSteps) {
|
|
552
|
+
t15 = [thumbSize, isNumRange, processedRange, totalSteps];
|
|
553
|
+
$[64] = isNumRange;
|
|
554
|
+
$[65] = processedRange;
|
|
555
|
+
$[66] = thumbSize;
|
|
556
|
+
$[67] = totalSteps;
|
|
557
|
+
$[68] = t15;
|
|
558
|
+
} else {
|
|
559
|
+
t15 = $[68];
|
|
560
|
+
}
|
|
561
|
+
useLayoutEffect(t14, t15);
|
|
562
|
+
let t16;
|
|
563
|
+
if ($[69] !== trackActiveColor || $[70] !== trackAnimatedStyle || $[71] !== trackInactiveProps || $[72] !== trackSize) {
|
|
564
|
+
t16 = /*#__PURE__*/_jsx(AnimatedThemedView, {
|
|
565
|
+
height: trackSize,
|
|
566
|
+
backgroundColor: trackActiveColor,
|
|
567
|
+
animatedStyle: trackAnimatedStyle,
|
|
568
|
+
...trackInactiveProps
|
|
569
|
+
});
|
|
570
|
+
$[69] = trackActiveColor;
|
|
571
|
+
$[70] = trackAnimatedStyle;
|
|
572
|
+
$[71] = trackInactiveProps;
|
|
573
|
+
$[72] = trackSize;
|
|
574
|
+
$[73] = t16;
|
|
575
|
+
} else {
|
|
576
|
+
t16 = $[73];
|
|
577
|
+
}
|
|
578
|
+
let t17;
|
|
579
|
+
if ($[74] !== t16 || $[75] !== trackActiveProps || $[76] !== trackInactiveColor || $[77] !== trackSize || $[78] !== trackWidth) {
|
|
580
|
+
t17 = /*#__PURE__*/_jsx(ThemedView, {
|
|
581
|
+
position: "absolute",
|
|
582
|
+
width: trackWidth,
|
|
583
|
+
height: trackSize,
|
|
584
|
+
overflow: "hidden",
|
|
585
|
+
backgroundColor: trackInactiveColor,
|
|
586
|
+
...trackActiveProps,
|
|
587
|
+
children: t16
|
|
588
|
+
});
|
|
589
|
+
$[74] = t16;
|
|
590
|
+
$[75] = trackActiveProps;
|
|
591
|
+
$[76] = trackInactiveColor;
|
|
592
|
+
$[77] = trackSize;
|
|
593
|
+
$[78] = trackWidth;
|
|
594
|
+
$[79] = t17;
|
|
595
|
+
} else {
|
|
596
|
+
t17 = $[79];
|
|
597
|
+
}
|
|
598
|
+
let t18;
|
|
599
|
+
if ($[80] !== getMappingKey || $[81] !== processedRange || $[82] !== stepIndicator || $[83] !== stepIndicatorProps || $[84] !== stepWidth || $[85] !== thumbSize || $[86] !== thumbSizeHalf) {
|
|
600
|
+
t18 = !!stepIndicator && processedRange.map((value, index_0) => /*#__PURE__*/_jsx(ThemedSliderStepIndicator, {
|
|
601
|
+
left: index_0 * (stepWidth ?? 0) + thumbSizeHalf - sliderStepIndicatorDefaultWidth / 2,
|
|
602
|
+
height: thumbSize,
|
|
603
|
+
...stepIndicatorProps
|
|
604
|
+
}, getMappingKey(value, index_0)));
|
|
605
|
+
$[80] = getMappingKey;
|
|
606
|
+
$[81] = processedRange;
|
|
607
|
+
$[82] = stepIndicator;
|
|
608
|
+
$[83] = stepIndicatorProps;
|
|
609
|
+
$[84] = stepWidth;
|
|
610
|
+
$[85] = thumbSize;
|
|
611
|
+
$[86] = thumbSizeHalf;
|
|
612
|
+
$[87] = t18;
|
|
613
|
+
} else {
|
|
614
|
+
t18 = $[87];
|
|
615
|
+
}
|
|
616
|
+
const t19 = -thumbSizeHalf;
|
|
617
|
+
let t20;
|
|
618
|
+
if ($[88] !== t19 || $[89] !== thumbAnimatedStyle || $[90] !== thumbColor || $[91] !== thumbProps || $[92] !== thumbSize) {
|
|
619
|
+
t20 = /*#__PURE__*/_jsx(AnimatedThemedView, {
|
|
620
|
+
position: "absolute",
|
|
621
|
+
right: t19,
|
|
622
|
+
width: thumbSize,
|
|
623
|
+
aspectRatio: 1,
|
|
624
|
+
opacity: 0.8,
|
|
625
|
+
backgroundColor: thumbColor,
|
|
626
|
+
animatedStyle: thumbAnimatedStyle,
|
|
627
|
+
...thumbProps
|
|
628
|
+
});
|
|
629
|
+
$[88] = t19;
|
|
630
|
+
$[89] = thumbAnimatedStyle;
|
|
631
|
+
$[90] = thumbColor;
|
|
632
|
+
$[91] = thumbProps;
|
|
633
|
+
$[92] = thumbSize;
|
|
634
|
+
$[93] = t20;
|
|
635
|
+
} else {
|
|
636
|
+
t20 = $[93];
|
|
637
|
+
}
|
|
638
|
+
let t21;
|
|
639
|
+
if ($[94] !== sliderWrapProps || $[95] !== t17 || $[96] !== t18 || $[97] !== t20 || $[98] !== thumbSize || $[99] !== trackViewRef) {
|
|
640
|
+
t21 = /*#__PURE__*/_jsxs(ThemedView, {
|
|
149
641
|
ref: trackViewRef,
|
|
150
|
-
alignItems:
|
|
151
|
-
justifyContent:
|
|
152
|
-
alignSelf:
|
|
642
|
+
alignItems: "center",
|
|
643
|
+
justifyContent: "center",
|
|
644
|
+
alignSelf: "stretch",
|
|
153
645
|
height: thumbSize,
|
|
154
646
|
...sliderWrapProps,
|
|
155
|
-
children: [
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
...thumbProps
|
|
181
|
-
})]
|
|
182
|
-
})
|
|
183
|
-
});
|
|
647
|
+
children: [t17, t18, t20]
|
|
648
|
+
});
|
|
649
|
+
$[94] = sliderWrapProps;
|
|
650
|
+
$[95] = t17;
|
|
651
|
+
$[96] = t18;
|
|
652
|
+
$[97] = t20;
|
|
653
|
+
$[98] = thumbSize;
|
|
654
|
+
$[99] = trackViewRef;
|
|
655
|
+
$[100] = t21;
|
|
656
|
+
} else {
|
|
657
|
+
t21 = $[100];
|
|
658
|
+
}
|
|
659
|
+
let t22;
|
|
660
|
+
if ($[101] !== gesture || $[102] !== t21) {
|
|
661
|
+
t22 = /*#__PURE__*/_jsx(GestureDetector, {
|
|
662
|
+
gesture: gesture,
|
|
663
|
+
children: t21
|
|
664
|
+
});
|
|
665
|
+
$[101] = gesture;
|
|
666
|
+
$[102] = t21;
|
|
667
|
+
$[103] = t22;
|
|
668
|
+
} else {
|
|
669
|
+
t22 = $[103];
|
|
670
|
+
}
|
|
671
|
+
return t22;
|
|
184
672
|
};
|
|
185
|
-
export default
|
|
673
|
+
export default Slider;
|
|
186
674
|
//# sourceMappingURL=Slider.js.map
|